全志V3s荔枝派Zero板子,我用TF启动系统,bootargs里面有分区信息,
进入Linux我执行spi flash更新动作,出现权限错误
有哪位大神遇到过吗?
# flashcp mtd0_uboot.bin /dev/mtd0
flashcp: can't open '/dev/mtd0': Permission denied
离线
U-Boot SPL 2017.01-rc2-00071-gf03c1f5-dirty (Nov 18 2017 - 22:15:31)
DRAM: 64 MiB
Trying to boot from MMC1
U-Boot 2017.01-rc2-00071-gf03c1f5-dirty (Nov 18 2017 - 22:15:31 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected w25q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
SF: Warning - Only lower 16MiB accessible, Full access #define CONFIG_SPI_FLASH_BAR
*** Warning - bad CRC, using default environment
Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
U-Boot 2017.01-rc2-00071-gf03c1f5-dirty (Nov 18 2017 - 22:15:31 +0800) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM: 64 MiB
MMC: SUNXI SD/MMC: 0
SF: Detected w25q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
SF: Warning - Only lower 16MiB accessible, Full access #define CONFIG_SPI_FLASH_BAR
*** Warning - bad CRC, using default environment
Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In: serial@01c28000
Out: serial@01c28000
Err: serial@01c28000
Net: No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot: 0
reading zImage
3898688 bytes read in 625 ms (5.9 MiB/s)
reading sun8i-v3s-licheepi-zero-dock.dtb
11931 bytes read in 29 ms (401.4 KiB/s)
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42dfa000, end 42dffe9a ... OK
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.13.0-licheepi-zero+ (hexing@ubuntu) (gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04.1)) #35 SMP Sat Nov 18 22:21:37 CST 2017
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Lichee Pi Zero with Dock
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] percpu: Embedded 16 pages/cpu @c3de6000 s33920 r8192 d23424 u65536
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 15883
[ 0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,6M(kernel)ro,-(rootfs) root=/dev/mmcblk0p2 earlyprintk rw
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 53580K/64036K available (6144K kernel code, 217K rwdata, 1432K rodata, 1024K init, 262K bss, 10456K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc4000000 - 0xff800000 ( 952 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc3e89000 ( 62 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0700000 (7136 kB)
[ 0.000000] .init : 0xc0900000 - 0xc0a00000 (1024 kB)
[ 0.000000] .data : 0xc0a00000 - 0xc0a367c0 ( 218 kB)
[ 0.000000] .bss : 0xc0a3d874 - 0xc0a7f1bc ( 263 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] RCU event tracing is enabled.
[ 0.000000] RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000018] Switching to timer-based delay loop, resolution 41ns
[ 0.000181] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000414] Console: colour dummy device 80x30
[ 0.000455] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000471] pid_max: default: 32768 minimum: 301
[ 0.000590] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000604] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001214] CPU: Testing write buffer coherency: ok
[ 0.001599] /cpus/cpu@0 missing clock-frequency property
[ 0.001624] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002071] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002250] Hierarchical SRCU implementation.
[ 0.002731] smp: Bringing up secondary CPUs ...
[ 0.002745] smp: Brought up 1 node, 1 CPU
[ 0.002755] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.002762] CPU: All CPU(s) started in SVC mode.
[ 0.003532] devtmpfs: initialized
[ 0.006754] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.007049] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.007075] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.007240] pinctrl core: initialized pinctrl subsystem
[ 0.008101] random: get_random_u32 called from bucket_table_alloc+0xf0/0x250 with crng_init=0
[ 0.008239] NET: Registered protocol family 16
[ 0.008706] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.009842] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.009861] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.023881] SCSI subsystem initialized
[ 0.024197] usbcore: registered new interface driver usbfs
[ 0.024269] usbcore: registered new interface driver hub
[ 0.024367] usbcore: registered new device driver usb
[ 0.024633] pps_core: LinuxPPS API ver. 1 registered
[ 0.024646] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.024668] PTP clock support registered
[ 0.024907] Advanced Linux Sound Architecture Driver Initialized.
[ 0.026763] clocksource: Switched to clocksource arch_sys_counter
[ 0.037438] NET: Registered protocol family 2
[ 0.038036] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.038069] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.038092] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.038228] UDP hash table entries: 256 (order: 1, 8192 bytes)
[ 0.038277] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[ 0.038503] NET: Registered protocol family 1
[ 0.039115] RPC: Registered named UNIX socket transport module.
[ 0.039137] RPC: Registered udp transport module.
[ 0.039143] RPC: Registered tcp transport module.
[ 0.039149] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.041044] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.050076] NFS: Registering the id_resolver key type
[ 0.050132] Key type id_resolver registered
[ 0.050140] Key type id_legacy registered
[ 0.051147] random: fast init done
[ 0.053914] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.053939] io scheduler noop registered
[ 0.053947] io scheduler deadline registered
[ 0.054216] io scheduler cfq registered (default)
[ 0.054227] io scheduler mq-deadline registered
[ 0.054234] io scheduler kyber registered
[ 0.058702] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.127066] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.130364] console [ttyS0] disabled
[ 0.150631] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 36, base_baud = 1500000) is a U6_16550A
[ 0.733337] console [ttyS0] enabled
[ 0.758409] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 37, base_baud = 1500000) is a U6_16550A
[ 0.788958] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 38, base_baud = 1500000) is a U6_16550A
[ 0.802637] m25p80 spi32766.0: w25q256 (32768 Kbytes)
[ 0.807845] 4 cmdlinepart partitions found on MTD device spi32766.0
[ 0.814105] Creating 4 MTD partitions on "spi32766.0":
[ 0.819279] 0x000000000000-0x000000100000 : "uboot"
[ 0.824789] 0x000000100000-0x000000110000 : "dtb"
[ 0.830059] 0x000000110000-0x000000710000 : "kernel"
[ 0.835404] 0x000000710000-0x000002000000 : "rootfs"
[ 0.841242] libphy: Fixed MDIO Bus: probed
[ 0.845881] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 0.851774] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 0.857522] dwmac-sun8i 1c30000.ethernet: Will use internal PHY
[ 0.863669] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 0.869367] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 0.876582] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 0.882249] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 0.889473] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 0.894431] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 0.901406] libphy: stmmac: probed
[ 0.906865] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.913405] ehci-platform: EHCI generic platform driver
[ 0.918957] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 0.924576] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 0.932556] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[ 0.966779] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 0.974030] hub 1-0:1.0: USB hub found
[ 0.977974] hub 1-0:1.0: 1 port detected
[ 0.982528] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.988829] ohci-platform: OHCI generic platform driver
[ 0.994406] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 1.001141] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 1.009092] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[ 1.081921] hub 2-0:1.0: USB hub found
[ 1.085743] hub 2-0:1.0: 1 port detected
[ 1.093399] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[ 1.103024] input: 1c22800.lradc as /devices/platform/soc/1c22800.lradc/input/input0
[ 1.111953] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[ 1.118856] sun6i-rtc 1c20400.rtc: RTC enabled
[ 1.123409] i2c /dev entries driver
[ 1.128333] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input1
[ 1.137853] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.206811] sunxi-mmc 1c0f000.mmc: base:0xc41fe000 irq:23
[ 1.253898] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.263883] mmc0: new high speed SD card at address b368
[ 1.269757] sunxi-mmc 1c10000.mmc: base:0xc4303000 irq:24
[ 1.276186] usbcore: registered new interface driver usbhid
[ 1.281854] usbhid: USB HID core driver
[ 1.286441] mmcblk0: mmc0:b368 FFFFF 1.85 GiB
[ 1.293085] sun4i-codec 1c22c00.codec: ASoC: /soc/codec-analog@01c23000 not registered
[ 1.301138] sun4i-codec 1c22c00.codec: Failed to register our card
[ 1.307648] mmcblk0: p1 p2
[ 1.315776] NET: Registered protocol family 17
[ 1.320472] Key type dns_resolver registered
[ 1.324880] Registering SWP/SWPB emulation handler
[ 1.334182] simple-framebuffer 43e89000.framebuffer: framebuffer at 0x43e89000, 0x177000 bytes, mapped to 0xc4380000
[ 1.344893] simple-framebuffer 43e89000.framebuffer: format=x8r8g8b8, mode=800x480x32, linelength=3200
[ 1.361253] Console: switching to colour frame buffer device 100x30
[ 1.373683] simple-framebuffer 43e89000.framebuffer: fb0: simplefb registered!
[ 1.382296] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.393689] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.399536] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 1.408726] hub 3-0:1.0: USB hub found
[ 1.412599] hub 3-0:1.0: 1 port detected
[ 1.417965] using random self ethernet address
[ 1.422459] using random host ethernet address
[ 1.429121] usb0: HOST MAC 3e:e5:e0:37:fa:fd
[ 1.433437] usb0: MAC d2:75:c8:19:03:50
[ 1.437431] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.444909] g_cdc gadget: g_cdc ready
[ 1.451231] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[ 1.459734] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:00:11 UTC (11)
[ 1.468071] vcc5v0: disabling
[ 1.471048] ALSA device list:
[ 1.474011] #0: V3s Audio Codec
[ 1.479892] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.489232] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 1.737567] EXT4-fs (mmcblk0p2): recovery complete
[ 1.745266] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.753526] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.761786] devtmpfs: mounted
[ 1.766058] Freeing unused kernel memory: 1024K
[ 1.919527] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Initializing random number generator... done.
Starting network: OK
离线
看来看去, 这一行感觉有问题, 我帮你搜搜
console=ttyS0,115200 panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,6M(kernel)ro,-(rootfs) root=/dev/mmcblk0p2 earlyprintk rw
离线
我知道了, 你把ro去掉试一试
console=ttyS0,115200 panic=5 rootwait mtdparts=spi32766.0:1M(uboot),64k(dtb),6M(kernel),-(rootfs) root=/dev/mmcblk0p2 earlyprintk rw
离线
我知道了, 你把ro去掉试一试
console=ttyS0,115200 panic=5 rootwait mtdparts=spi32766.0:1M(uboot),64k(dtb),6M(kernel),-(rootfs) root=/dev/mmcblk0p2 earlyprintk rw
谢谢大神, 终于可以了,我把上面一行拷贝到 u-boot的sun8i.h,
重写编译烧写u-boot到tf卡,重启,可以擦写spi flash了。
离线