WhyCan Forum

人过留名,雁过留声,感谢各位朋友不离不弃地支持。 QQ: 516333132, 微信: whycan_cn (哇酷网/挖坑网/填坑网) admin@whycan.cn

您尚未登录。

#1 2019-07-18 20:27:15

fan12398
会员
注册时间: 2019-07-09
累计积分: 31

V3s rootfs挂载失败

板子是lichee pi zero焊接上了16M spi nor flash,按照下面链接的教程搞得。
zero.lichee.pro/spi系统杂谈
rootfs是我自己用buildroot编译的,
启动串口输出如下,看起来是rootfs挂载失败,不知到是不是我的rootfs有问题。

U-Boot SPL 2017.01-rc2-00073-gdd6e8740dc-dirty (Jul 18 2019 - 13:02:19)
DRAM: 64 MiB
Trying to boot from sunxi SPI

U-Boot 2017.01-rc2-00073-gdd6e8740dc-dirty (Jul 18 2019 - 13:02:19 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** 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-00073-gdd6e8740dc-dirty (Jul 18 2019 - 13:02:19 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** 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 
SF: Detected w25q128bv with page size 256 Bytes, erase size 4 KiB, total 16 MiB
device 0 offset 0x100000, size 0x10000
SF: 65536 bytes @ 0x100000 Read: OK
device 0 offset 0x110000, size 0x400000
SF: 4194304 bytes @ 0x110000 Read: OK
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Device Tree to 42dfa000, end 42dfff2e ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.14-licheepi-zero+ (fantl@fantl-RESCUER-R720-15IKBN) (gcc version 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4] (Linaro GCC 7.4-2019.02)) #2 SMP Thu Jul 18 19
[    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
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] random: fast init done
[    0.000000] percpu: Embedded 16 pages/cpu @c3de6000 s33740 r8192 d23604 u65536
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 15883
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2
[    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: 53512K/64036K available (6144K kernel code, 284K rwdata, 1500K rodata, 1024K init, 265K bss, 10524K 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 - 0xc0a470e0   ( 285 kB)
[    0.000000]        .bss : 0xc0a4e964 - 0xc0a90ee4   ( 266 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    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.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000019] Switching to timer-based delay loop, resolution 41ns
[    0.000186] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000440] Console: colour dummy device 80x30
[    0.000480] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000496] pid_max: default: 32768 minimum: 301
[    0.000625] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000638] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001289] CPU: Testing write buffer coherency: ok
[    0.001694] /cpus/cpu@0 missing clock-frequency property
[    0.001717] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.002189] Setting up static identity map for 0x40100000 - 0x40100060
[    0.002372] Hierarchical SRCU implementation.
[    0.002881] smp: Bringing up secondary CPUs ...
[    0.002896] smp: Brought up 1 node, 1 CPU
[    0.002905] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[    0.002913] CPU: All CPU(s) started in SVC mode.
[    0.003719] devtmpfs: initialized
[    0.007055] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.007366] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.007391] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.007574] pinctrl core: initialized pinctrl subsystem
[    0.008563] NET: Registered protocol family 16
[    0.009053] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.010219] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.010237] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.022261] SCSI subsystem initialized
[    0.022505] usbcore: registered new interface driver usbfs
[    0.022578] usbcore: registered new interface driver hub
[    0.022679] usbcore: registered new device driver usb
[    0.022937] pps_core: LinuxPPS API ver. 1 registered
[    0.022949] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.022971] PTP clock support registered
[    0.023152] Advanced Linux Sound Architecture Driver Initialized.
[    0.024824] clocksource: Switched to clocksource arch_sys_counter
[    0.034488] NET: Registered protocol family 2
[    0.035161] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.035195] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.035218] TCP: Hash tables configured (established 1024 bind 1024)
[    0.035349] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.035397] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.035613] NET: Registered protocol family 1
[    0.036343] RPC: Registered named UNIX socket transport module.
[    0.036364] RPC: Registered udp transport module.
[    0.036370] RPC: Registered tcp transport module.
[    0.036376] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.038304] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.044157] NFS: Registering the id_resolver key type
[    0.044208] Key type id_resolver registered
[    0.044217] Key type id_legacy registered
[    0.044267] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.048608] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.048632] io scheduler noop registered
[    0.048640] io scheduler deadline registered
[    0.048937] io scheduler cfq registered (default)
[    0.048948] io scheduler mq-deadline registered
[    0.048955] io scheduler kyber registered
[    0.049554] sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO
[    0.052876] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.053746] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[    0.144294] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.147454] console [ttyS0] disabled
[    0.167733] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 34, base_baud = 1500000) is a U6_16550A
[    0.764128] console [ttyS0] enabled
[    0.770387] panel-simple panel: panel supply power not found, using dummy regulator
[    0.780572] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.786395] libphy: Fixed MDIO Bus: probed
[    0.790935] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.797547] ehci-platform: EHCI generic platform driver
[    0.803044] ehci-platform 1c1a000.usb: EHCI Host Controller
[    0.808727] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[    0.816685] ehci-platform 1c1a000.usb: irq 26, io mem 0x01c1a000
[    0.844878] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[    0.851979] hub 1-0:1.0: USB hub found
[    0.855915] hub 1-0:1.0: 1 port detected
[    0.860472] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.866781] ohci-platform: OHCI generic platform driver
[    0.872335] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[    0.879055] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[    0.887035] ohci-platform 1c1a400.usb: irq 27, io mem 0x01c1a400
[    0.959851] hub 2-0:1.0: USB hub found
[    0.963680] hub 2-0:1.0: 1 port detected
[    0.971337] udc-core: couldn't find an available UDC - added [g_cdc] to list of pending drivers
[    0.981063] sun6i-rtc 1c20400.rtc: rtc core: registered rtc-sun6i as rtc0
[    0.987963] sun6i-rtc 1c20400.rtc: RTC enabled
[    0.992544] i2c /dev entries driver
[    0.997467] input: ns2009_ts as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0048/input/input0
[    1.006460] IR NEC protocol handler initialized
[    1.010996] IR RC5(x/sz) protocol handler initialized
[    1.016135] IR RC6 protocol handler initialized
[    1.020663] IR JVC protocol handler initialized
[    1.025211] IR Sony protocol handler initialized
[    1.029822] IR SANYO protocol handler initialized
[    1.034518] IR Sharp protocol handler initialized
[    1.039231] IR MCE Keyboard/mouse protocol handler initialized
[    1.045068] IR XMP protocol handler initialized
[    1.050291] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.114867] sunxi-mmc 1c0f000.mmc: base:0xc4079000 irq:24
[    1.121786] usbcore: registered new interface driver usbhid
[    1.127472] usbhid: USB HID core driver
[    1.133566] NET: Registered protocol family 17
[    1.138264] Key type dns_resolver registered
[    1.142688] Registering SWP/SWPB emulation handler
[    1.155412] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[    1.166784] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.172547] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[    1.183759] hub 3-0:1.0: USB hub found
[    1.187757] hub 3-0:1.0: 1 port detected
[    1.192825] using random self ethernet address
[    1.197407] using random host ethernet address
[    1.202751] usb0: HOST MAC 8e:c2:f5:ba:3e:7e
[    1.207231] usb0: MAC de:72:f7:d0:36:fc
[    1.211116] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[    1.218639] g_cdc gadget: g_cdc ready
[    1.223638] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:50:36 UTC (3036)
[    1.232155] vcc3v0: disabling
[    1.235190] vcc5v0: disabling
[    1.238159] ALSA device list:
[    1.241122]   No soundcards found.
[    1.245499] VFS: Cannot open root device "31:03" or unknown-block(31,3): error -19
[    1.253123] Please append a correct "root=" boot option; here are the available partitions:
[    1.261554] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,3)
[    1.269901] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.14-licheepi-zero+ #2
[    1.277198] Hardware name: Allwinner sun8i Family
[    1.281937] [<c010e894>] (unwind_backtrace) from [<c010b548>] (show_stack+0x10/0x14)
[    1.289679] [<c010b548>] (show_stack) from [<c06868e8>] (dump_stack+0x88/0x9c)
[    1.296900] [<c06868e8>] (dump_stack) from [<c011b848>] (panic+0xdc/0x248)
[    1.303777] [<c011b848>] (panic) from [<c09011dc>] (mount_block_root+0x18c/0x260)
[    1.311256] [<c09011dc>] (mount_block_root) from [<c09013d0>] (mount_root+0x120/0x128)
[    1.319165] [<c09013d0>] (mount_root) from [<c0901528>] (prepare_namespace+0x150/0x194)
[    1.327162] [<c0901528>] (prepare_namespace) from [<c0900e28>] (kernel_init_freeable+0x1c4/0x1d4)
[    1.336026] [<c0900e28>] (kernel_init_freeable) from [<c0698aa0>] (kernel_init+0x8/0x108)
[    1.344197] [<c0698aa0>] (kernel_init) from [<c0107868>] (ret_from_fork+0x14/0x2c)
[    1.351768] Rebooting in 5 seconds..

在uboot里printenv如下,

=> printenv
arch=arm
baudrate=115200
board=sunxi
board_name=sunxi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=fel mmc0 usb0 pxe dhcp 
bootargs=console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:1M(uboot)ro,64k(dtb)ro,4M(kernel)ro,-(rootfs) root=31:03 rw rootfstype=jffs2
bootcmd=sf probe 0; sf read 0x41800000 0x100000 0x10000; sf read 0x41000000 0x110000 0x400000; bootz 0x41000000 - 0x41800000
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver;
bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fi
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=2
bootm_size=0x2e00000
console=ttyS0,115200
cpu=armv7
dfu_alt_info_ram=kernel ram 0x41000000 0x800000;fdt ram 0x41800000 0x100000;ramdisk ram 0x41B00000 0x1000000
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
fdt_addr_r=0x41800000
fdtcontroladdr=43b57388
fdtfile=sun8i-v3s-licheepi-zero.dtb
kernel_addr_r=0x41000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
preboot=usb start
pxefile_addr_r=0x41A00000
ramdisk_addr_r=0x41B00000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scane
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_booe
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; e
scriptaddr=0x41900000
serial#=12c00001e4d75909
soc=sunxi
stderr=serial@01c28000
stdin=serial@01c28000
stdout=serial@01c28000
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi

Environment size: 4295/32764 bytes

最近编辑记录 fan12398 (2019-07-18 20:27:45)

离线

#2 2019-07-18 22:45:30

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 8,532

Re: V3s rootfs挂载失败

根据log你没有生成 /dev/mtd 分区, 导致没有 /dev/mtdblockX

所以根文件系统没有跑起来

在线

#3 2019-07-19 09:36:17

fan12398
会员
注册时间: 2019-07-09
累计积分: 31

Re: V3s rootfs挂载失败

晕哥 说:

根据log你没有生成 /dev/mtd 分区, 导致没有 /dev/mtdblockX

所以根文件系统没有跑起来

晕哥,生成 /dev/mtd 分区是在 dts文件里加上partition吗?
我按照 lichee zero 教程里通过bootargs传递给内核就是上面的结果了

离线

#4 2019-07-25 23:13:01

学习
会员
注册时间: 2019-07-08
累计积分: 26

Re: V3s rootfs挂载失败

fan12398 说:
晕哥 说:

根据log你没有生成 /dev/mtd 分区, 导致没有 /dev/mtdblockX

所以根文件系统没有跑起来

晕哥,生成 /dev/mtd 分区是在 dts文件里加上partition吗?
我按照 lichee zero 教程里通过bootargs传递给内核就是上面的结果了

我也有这样的问题,请问你解决了吗?

离线

#5 2019-07-25 23:24:03

awfans
会员
注册时间: 2018-04-03
累计积分: 219

Re: V3s rootfs挂载失败

1. linux 开启 CONFIG_MTD_CMDLINE_PARTS
2. 或者 linux 开启 CONFIG_MTD_OF_PARTS, 设备树里面添加 parts,

离线

#6 2019-07-25 23:35:03

学习
会员
注册时间: 2019-07-08
累计积分: 26

Re: V3s rootfs挂载失败

awfans 说:

1. linux 开启 CONFIG_MTD_CMDLINE_PARTS
2. 或者 linux 开启 CONFIG_MTD_OF_PARTS, 设备树里面添加 parts,

您好,能麻烦你说下过程吗,谢谢啦!我才刚入门不好意思好多基础都不懂。
我使用的时zero的开发板,直接使用的 https://whycan.cn/t_682.html 里的这个《 V3s主线u-boot引导官方linux,带Qt文件系统,网卡已测试.7z》 固件都不行,下面时启动的日志!

U-Boot SPL 2017.01-rc2-00073-gdd6e874 (Jul 11 2018 - 16:05:42)
DRAM: 64 MiB
Trying to boot from MMC1

U-Boot 2017.01-rc2-00073-gdd6e874 (Jul 11 2018 - 16:05:42 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 00, 00, 00
*** Warning - spi_flash_probe() failed, 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-00073-gdd6e874 (Jul 11 2018 - 16:05:42 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 00, 00, 00
*** Warning - spi_flash_probe() failed, 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
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
290 bytes read in 15 ms (18.6 KiB/s)
## Executing script at 41900000
reading uImage
2451080 bytes read in 133 ms (17.6 MiB/s)
reading script.bin
35240 bytes read in 26 ms (1.3 MiB/s)
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   Linux-3.4.39
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2451016 Bytes = 2.3 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0x1029 from environment

Starting kernel ...

▒▒    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.4.39 (qh@ubuntu) (gcc version 4.6.3 20120201 (prerelease) (crosstool-NG linaro-1.13.1-2012.02-20120222 - Linaro GCC 2012.02) ) #4 Thu Jan 11 13:00:40 CST 2018
[    0.000000] Initialized persistent memory from 41d20800-41d307ff
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait 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: 64MB = 64MB total
[    0.000000] Memory: 30376k/30376k available, 35160k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc047e000   (4568 kB)
[    0.000000]       .init : 0xc047e000 - 0xc04a1000   ( 140 kB)
[    0.000000]       .data : 0xc04a2000 - 0xc04e5f80   ( 272 kB)
[    0.000000]        .bss : 0xc04e5fa4 - 0xc0580b8c   ( 619 kB)
[    0.000000] NR_IRQS:544
[    0.000000] Architected local timer running at 24.00MHz.
[    0.000000] Switching to timer-based delay loop
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000159] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000)
[    0.000181] pid_max: default: 32768 minimum: 301
[    0.000317] Mount-cache hash table entries: 512
[    0.000871] CPU: Testing write buffer coherency: ok
[    0.001138] Setting up static identity map for 0x40359b08 - 0x40359b60
[    0.001821] devtmpfs: initialized
[    0.003486] pinctrl core: initialized pinctrl subsystem
[    0.003979] NET: Registered protocol family 16
[    0.004296] DMA: preallocated 128 KiB pool for atomic coherent allocations
[    0.004358] script_sysfs_init success
[    0.005130] gpiochip_add: registered GPIOs 0 to 223 on device: sunxi-pinctrl
[    0.006064] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver
[    0.006448] gpiochip_add: registered GPIOs 1024 to 1031 on device: axp-pinctrl
[    0.007305] persistent_ram: uncorrectable error in header
[    0.007320] persistent_ram: no valid data in buffer (sig = 0x55175517)
[    0.011241] console [ram-1] enabled
[    0.012028] Not Found clk pll_isp in script
[    0.012227] Not Found clk pll_video in script
[    0.012332] Not Found clk pll_ve in script
[    0.012523] Not Found clk pll_periph0 in script
[    0.012626] Not Found clk pll_de in script
[    0.016583] bio: create slab <bio-0> at 0
[    0.017039] pwm module init!
[    0.019302] SCSI subsystem initialized
[    0.019649] usbcore: registered new interface driver usbfs
[    0.019904] usbcore: registered new interface driver hub
[    0.020173] usbcore: registered new device driver usb
[    0.020513] twi_chan_cfg()340 - [twi0] has no twi_regulator.
[    0.020625] twi_chan_cfg()340 - [twi1] has no twi_regulator.
[    5.020024] sunxi_i2c_do_xfer()978 - [i2c0] xfer timeout (dev addr:0x34)
[    5.020150] axp20_board 0-0034: failed reading at 0x03
[    5.020371] axp20_board: probe of 0-0034 failed with error -62
[    5.020526] Linux video capture interface: v2.00
[    5.020808] gpiochip_add: gpios 1024..1028 (axp_pin) failed to register
[    5.021263] Advanced Linux Sound Architecture Driver Version 1.0.25.
[    5.022130] Switching to clocksource arch_sys_counter
[    5.029999] NET: Registered protocol family 2
[    5.029999] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    5.030352] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    5.030587] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    5.030711] TCP: Hash tables configured (established 2048 bind 2048)
[    5.030905] TCP: reno registered
[    5.031013] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    5.031215] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    5.031572] NET: Registered protocol family 1
[    5.032097] standby_mode = 1.
[    5.032205] wakeup src cnt is : 3.
[    5.032327] pmu1_enable = 0x1.
[    5.032518] pmux_id = 0x1.
[    5.032629] config_pmux_para: script_parser_fetch err.
[    5.032733] pmu2_enable = 0x0.
[    5.032926] add_sys_pwr_dm: get ldo name failed
[    5.033030] add_sys_pwr_dm: get ldo name failed
[    5.033135] add_sys_pwr_dm: get ldo name failed
[    5.033327] add_sys_pwr_dm: get ldo name failed
[    5.033431] add_sys_pwr_dm: get ldo name failed
[    5.033622] add_sys_pwr_dm: get ldo name failed
[    5.033726] add_sys_pwr_dm: get ldo name failed
[    5.033831] add_sys_pwr_dm: get ldo name failed
[    5.034022] add_sys_pwr_dm: get ldo name failed
[    5.034127] add_sys_pwr_dm: get ldo name failed
[    5.034315] after inited: sys_mask config = 0x0.
[    5.034420] dynamic_standby enalbe = 0x0.
[    5.034570] sunxi_reg_init enter
[    5.036719] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    5.036880] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    5.037262] msgmni has been set to 59
[    5.038322] io scheduler noop registered
[    5.038442] io scheduler deadline registered
[    5.038712] io scheduler cfq registered (default)
[    5.039212] [DISP]disp_module_init
[    5.039722] cmdline,disp=
[    5.040521] [DISP] disp_get_rotation_sw,line:68:disp 0 out of range? g_rot_sw=0
[    5.040733] [DISP] disp_init_connections,line:289:NULL pointer: 0, 0
[    5.043331] [DISP] Fb_map_kernel_logo,line:924:Fb_map_kernel_logo failed!
[    5.045986] [DISP] disp_sys_power_enable,line:387:some error happen, fail to get regulator
[    5.047008] [DISP]disp_module_init finish
[    5.047480] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[    5.047957] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[    5.048159] sw_uart_pm()890 - uart0 clk is already enable
[    5.048275] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n
[    5.078257] sunxi_i2c_core_process()707 - [i2c0] i2c message is NULL, err_code = 0xfe
[    5.161959] console [ttyS0] enabled
[    5.695025] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[    5.702989] spi spi0: master is unqueued, this is deprecated
[    5.709496] m25p_probe()982 - Use the Dual Mode Read.
[    5.715458] m25p80 spi0.0: found m25p05-nonjedec, expected w25q128
[    5.722440] m25p80 spi0.0: m25p05-nonjedec (64 Kbytes)
[    5.729812] partitions_register()865 - m25p80_read() ret 0, PartCnt: 0
[    5.737191] m25p80: probe of spi0.0 failed with error -22
[    5.745047] Failed to alloc md5
[    5.748682] eth0: Use random mac address
[    5.753242] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.780854] sunxi-ehci sunxi-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.789974] sunxi-ehci sunxi-ehci.1: new USB bus registered, assigned bus number 1
[    5.798700] sunxi-ehci sunxi-ehci.1: irq 104, io mem 0xf1c1a000
[    5.820030] sunxi-ehci sunxi-ehci.1: USB 0.0 started, EHCI 1.00
[    5.827402] hub 1-0:1.0: USB hub found
[    5.831827] hub 1-0:1.0: 1 port detected
[    5.836708] sunxi-ehci sunxi-ehci.1: remove, state 1
[    5.842365] usb usb1: USB disconnect, device number 1
[    5.849547] sunxi-ehci sunxi-ehci.1: USB bus 1 deregistered
[    5.865993] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    5.893165] sunxi-ohci sunxi-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
[    5.901889] sunxi-ohci sunxi-ohci.1: new USB bus registered, assigned bus number 1
[    5.910435] sunxi-ohci sunxi-ohci.1: irq 105, io mem 0xf1c1a400
[    5.974637] hub 1-0:1.0: USB hub found
[    5.978981] hub 1-0:1.0: 1 port detected
[    5.983930] sunxi-ohci sunxi-ohci.1: remove, state 1
[    5.989548] usb usb1: USB disconnect, device number 1
[    5.995921] sunxi-ohci sunxi-ohci.1: USB bus 1 deregistered
[    6.012470] Initializing USB Mass Storage driver...
[    6.018062] usbcore: registered new interface driver usb-storage
[    6.024929] USB Mass Storage support registered.
[    6.030483] file system registered
[    6.035929] android_usb gadget: Mass Storage Function, version: 2009/09/11
[    6.043729] android_usb gadget: Number of LUNs=1
[    6.049179]  lun0: LUN: removable file: (no medium)
[    6.055208] android_usb gadget: android_usb ready
[    6.060704] sunxikbd_script_init: key para not found, used default para.
[    6.069423] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0
[    6.077940] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    6.086835] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    6.095746] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    6.104481] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    6.113190] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    6.121918] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    6.130682] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    6.139575] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0
[    6.146990] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->start 0x01c20ca0, res->end 0x01c20cbf
[    6.158389] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0)
[    6.166062] wdt_enable, write reg 0xf1c20cb8 val 0x00000000
[    6.172439] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual timeout 16 sec
[    6.184389] no led_3, ignore it!
[    6.188092] no led_4, ignore it!
[    6.191804] no led_5, ignore it!
[    6.195477] no led_6, ignore it!
[    6.199257] no led_7, ignore it!
[    6.205014] usbcore: registered new interface driver usbhid
[    6.211431] usbhid: USB HID core driver
[    6.216436] ashmem: initialized
[    6.220453] logger: created 256K log 'log_main'
[    6.225768] logger: created 32K log 'log_events'
[    6.231238] logger: created 32K log 'log_radio'
[    6.236473] logger: created 32K log 'log_system'
[    6.243442] script_get_item return type err, consider it no ldo
[    6.254297] *******************Try sdio*******************
[    6.260949] asoc: sndcodec <-> sunxi-codec mapping ok
[    6.268817] TCP: cubic registered
[    6.272704] NET: Registered protocol family 17
[    6.277839] *******************Try sd *******************
[    6.284098] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    6.292912] ThumbEE CPU extension supported.
[    6.297834] Registering SWP/SWPB emulation handler
[    6.307947] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    6.317111] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    6.325697] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    6.334343] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    6.342986] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    6.351557] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    6.360394] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    6.369276] sunxi-rtc sunxi-rtc: setting system clock to 1970-01-01 04:45:35 UTC (17135)
[    6.380208] ALSA device list:
[    6.383747]   #0: audiocodec
[    6.387445] Waiting for root device /dev/mmcblk0p2...
[    6.393630] mmc0: new high speed SDHC card at address 0001
[    6.400409] mmcblk0: mmc0:0001 SD16G 29.5 GiB
[    6.406877]  mmcblk0: p1 p2
[    6.410902] mmcblk mmc0:0001: Card claimed for testing.
[    6.416932] mmc0:0001: SD16G 29.5 GiB
[    6.421338] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    6.430165] *******************sd init ok*******************
[    6.436631] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    6.445463] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    6.454104] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    6.462643] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    6.471272] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    6.479882] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    6.500934] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    6.510891] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[    6.520798] EXT4-fs (mmcblk0p2): couldn't mount RDWR because of unsupported optional features (400)
[    6.535236] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
[    6.544744] Backtrace:
[    6.547762] [<c0013410>] (dump_backtrace+0x0/0x110) from [<c0354534>] (dump_stack+0x18/0x1c)
[    6.557254]  r6:00008000 r5:c183d024 r4:c183d024 r3:00000001
[    6.564130] [<c035451c>] (dump_stack+0x0/0x1c) from [<c0354918>] (panic+0x78/0x1cc)
[    6.572834] [<c03548a0>] (panic+0x0/0x1cc) from [<c047ed20>] (mount_block_root+0x240/0x290)
[    6.582203]  r3:c1821f0c r2:00000020 r1:c1821f38 r0:c040406e
[    6.589066]  r7:c049c0b8
[    6.592081] [<c047eae0>] (mount_block_root+0x0/0x290) from [<c047edc8>] (mount_root+0x58/0x68)
[    6.601835] [<c047ed70>] (mount_root+0x0/0x68) from [<c047ef08>] (prepare_namespace+0x130/0x190)
[    6.611772]  r5:c049c0c9 r4:c04e6024
[    6.616037] [<c047edd8>] (prepare_namespace+0x0/0x190) from [<c047e94c>] (kernel_init+0x16c/0x1a8)
[    6.626170]  r5:c049c0b0 r4:00000007
[    6.630445] [<c047e7e0>] (kernel_init+0x0/0x1a8) from [<c0031df4>] (do_exit+0x0/0x66c)
[    6.639423] Rebooting in 5 seconds..

最近编辑记录 学习 (2019-07-25 23:35:46)

离线

#7 2019-07-25 23:42:57

awfans
会员
注册时间: 2018-04-03
累计积分: 219

Re: V3s rootfs挂载失败

bsp linux 3.4 对吧, 那个 flash 分区和主线可能有点不同, 好像是改代码可以实现, 添加分区代码 结构体数组.

离线

#8 2019-07-25 23:45:22

学习
会员
注册时间: 2019-07-08
累计积分: 26

Re: V3s rootfs挂载失败

awfans 说:

bsp linux 3.4 对吧, 那个 flash 分区和主线可能有点不同, 好像是改代码可以实现, 添加分区代码 结构体数组.

对呀,现在使用的是TF卡,可搜什么关键字呀? 我安装教程自己编译出来也不行,使用论坛里编译好的也不行!!

离线

#9 2019-07-26 07:28:49

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 8,532

Re: V3s rootfs挂载失败

试一试改 fex 文件: https://whycan.cn/t_682.html#p7190

在线

#10 2019-07-26 12:42:57

fan12398
会员
注册时间: 2019-07-09
累计积分: 31

Re: V3s rootfs挂载失败

学习 说:
fan12398 说:
晕哥 说:

根据log你没有生成 /dev/mtd 分区, 导致没有 /dev/mtdblockX

所以根文件系统没有跑起来

晕哥,生成 /dev/mtd 分区是在 dts文件里加上partition吗?
我按照 lichee zero 教程里通过bootargs传递给内核就是上面的结果了

我也有这样的问题,请问你解决了吗?


我使用的是16M SPI flash,主线 linux,
最终试验的结果是,参考 http://nano.lichee.pro/build_sys/build_flash.html 修改设备树dts,
然后 include/configs/sun8i.h,加入如下宏,就可以挂载上去了。注意 root=31:03。

tf卡的话 参考晕哥的这篇帖子 https://whycan.cn/t_547.html ,我照着做的,一次成功。注意dd时 of=/dev/sdb,是你自己的tf卡,别写到硬盘上去了

#define CONFIG_BOOTCOMMAND   "sf probe 0; "                           \
                             "sf read 0x41800000 0x100000 0x10000; "  \
                             "sf read 0x41000000 0x110000 0x400000; " \
                             "bootz 0x41000000 - 0x41800000"

 #define CONFIG_BOOTARGS      "console=ttyS0,115200 earlyprintk panic=5 rootwait " \
                             "root=31:03 rw rootfstype=jffs2"

最近编辑记录 fan12398 (2019-07-26 12:49:00)

离线

#11 2019-07-26 15:03:53

学习
会员
注册时间: 2019-07-08
累计积分: 26

Re: V3s rootfs挂载失败

使用TF卡终于可以进入系统了!!

直接使用论坛的《V3s主线u-boot引导官方linux,带Qt文件系统,网卡已测试.7z》
TF卡制作时按照晕哥的 https://whycan.cn/t_547.html
全部流程做完启动系统会出现 Rebooting in 5 seconds..
原来是问题是 EXT4-fs (mmcblk0p2): ouldn't mount RDWR because of unsupported optional features (400)

原因是因为我使用的系统是 Ubuntu18.04的,在使用gparted制作ext4文件分区的时候会加入旧的内核不支持的一些东西
解决办法就是制作好分区后使用 sudo tune2fs -O ^metadata_csum /dev/sdb2 去除

下面就是自己跟着教程编译一遍BSP系统了,希望不要出现问题!

感谢大家!

离线

#12 2019-07-26 15:42:03

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 8,532

Re: V3s rootfs挂载失败

emmm, 多谢分享!

在线

页脚