TI中文支持网
TI专业的中文技术问题搜集分享网站

AM3352: 制作ubifs文件系统,nand flash启动,挂载文件系统失败 VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19

Part Number:AM3352Other Parts Discussed in Thread:TPS65910,

TI fae及各位大侠好:

当前使用am3352平台,搭配镁光ddr3 SCB13H2G160AF(256MB),镁光nand flash MX30LF4G18AC MT29F4G08ABADA (512MB),PMIC为tps65910

编译sdk07.03.00, linux内核为5.4.106,完成内核升级,由3.2.0升级为5.4.106,其中u-boot为之前版本u-boot 2012;

前期使用网络文件系统,系统启动正常;当前把对应base文件系统制作为ubifs文件系统,通过sd卡烧录flash系统,启动失败,提示如下:

VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19

1. u-boot分区设置如下:

dfu_alt_info=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;kernel part 0 7;rootfs part 0 8

mtdparts=mtdparts=omap2-nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),128k(SPL.backup3),1536k(u-boot),3584k(u-boot-logo),8m(kernel),80m(rootfs),-(filesystem)

2. mtd分区如下:

ZQ1500# mtdpart

device nand0 <omap2-nand.0>, # parts = 9
#: name size offset mask_flags
0: SPL 0x00020000 0x00000000 0
1: SPL.backup1 0x00020000 0x00020000 0
2: SPL.backup2 0x00020000 0x00040000 0
3: SPL.backup3 0x00020000 0x00060000 0
4: u-boot 0x00180000 0x00080000 0
5: u-boot-logo 0x00380000 0x00200000 0
6: kernel 0x00800000 0x00580000 0
7: rootfs 0x05000000 0x00d80000 0
8: filesystem 0x1a280000 0x05d80000 0

active partition: nand0,0 – (SPL) 0x00020000 @ 0x00000000

3. ubifs文件系统制作如下:

$cd ti-processor-sdk-linux-am335x-evm-07.03.00.005/filesystem

$mkfs.ubifs -r tisdk-base-image-am335x-evm -F -m 2048 -e 126976 -c 448 -o ubifs.img

$ubinize -o ubi.img -m 2048 -p 128KiB -s 512 -O 2048 ubinize.cfg

对应ubinize.cfg配置文件如下:

[ubifs]
mode=ubi
image=rootfs.img 
vol_id=0
vol_size=56MiB 
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize

4. 关于VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19错误,网友有说是mkfs.ubifs -c参数,擦除block块数不能太大,太大容易挂载文件系统失败;

我的文件系统ubifs.img为41M左右,未压缩的base文件系统为75M左右,文件系统rootfs分配空间80M;

这里-c参数有设置为最小的320(取vol_size为40MiB),最大的640(取vol_size为80MiB),中间值430(取vol_size为80MiB),都不成功;

mkfs.ubifs 参数-c计算如下:

-c(vol_size * 1024) / 128KiB (-p参数 ) = 640 //vol_size 80MB

5. u-boot命令,通道加载sd卡里面固件,烧录到flash当中,命令如下:

//设置环境变量参数
setenv bootargs root=ubi0:rootfs rw ubi.mtd=NAND.rootfs,2048 rootfstype=ubifs ip=none console=ttyO0,115200n8 debug earlyprintk=serial vram=50M
setenv ipaddr 192.168.7.235
setenv gatewayip 192.168.7.1
setenv netmask 255.255.255.0

//加载u-boot固件
fatload mmc 0 0x82000000 nand_boot/MLO;nand erase 0x0 0x80000;nand write 0x82000000 0x0 0x20000;nand write 0x82000000 0x20000 0x20000;nand write 0x82000000 0x40000 0x20000;nand write 0x82000000 0x60000 0x20000
fatload mmc 0 0x82000000 nand_boot/u-boot.img;nand erase 0x80000 0x180000;nand write 0x82000000 0x80000 $filesize

//加载dtb,uImage
fatload mmc 0 0x82000000 nand_boot/am335x-evm.dtb;nandecc sw;nand erase 0x560000 0x20000;nand write 0x82000000 0x560000 $filesizefatload mmc 0 0x82000000 nand_boot/uImage;nandecc sw;nand erase 0x580000 0x800000;nand write 0x82000000 0x580000 $filesize

//加载ubifs文件系统
fatload mmc 0 0x82000000 nand_boot/ubi.img;nandecc sw;nand erase 0xd80000 0x5000000;nand write 0x82000000 0xd80000 $filesize

//读取dtb和uImage,并启动系统
nand read.uImage 0x80007fc0 0x580000 0x500000 //uImage 最新区间设置
nand read 0x80F80000 0x560000 0x20000 //dtb

bootm 0x80007fc0 – 0x80F80000

请问还有哪方面原因导致?网上有找到类似问题,没找到解决方案,多谢各位!!

6. 系统启动失败日志如下:

close
## Booting kernel from Legacy Image at 80007fc0 …
Image Name: Linux-5.4.106-g023faefa70
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4940288 Bytes = 4.7 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum … OK
## Flattened Device Tree blob at 80f80000
Booting using the fdt blob at 0x80f80000
XIP Kernel Image … OK
OK
Loading Device Tree to 8fafa000, end 8fb0bfac … OK

Starting zq kernel …

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.106-g023faefa70 (root@df131f57a6ff) (gcc version 9.2.1 20191025 (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10))) #15 PREEMPT Thu Jan 13 14:25:24 CST 2022
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: TI AM335x EVM
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 48 MiB at 0x8c800000
[ 0.000000] On node 0 totalpages: 65280
[ 0.000000] Normal zone: 574 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 65280 pages, LIFO batch:15
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM335X ES2.1 (sgx neon)
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64706
[ 0.000000] Kernel command line: root=ubi0:rootfs rw ubi.mtd=NAND.rootfs,2048 rootfstype=ubifs ip=none console=ttyO0,115200n8 debug earlyprintk=serial vram=50M
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 194164K/261120K available (9216K kernel code, 300K rwdata, 3216K rodata, 1024K init, 260K bss, 17804K reserved, 49152K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] IRQ: Found an INTC at 0x(ptrval) (revision 5.0) with 128 interrupts
[ 0.000000] random: get_random_bytes called from start_kernel+0x2b4/0x470 with crng_init=0
[ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[ 0.000018] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000042] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000053] OMAP clocksource: timer1 at 24000000 Hz
[ 0.000363] timer_probe: no matching timers found
[ 0.000573] Console: colour dummy device 80×30
[ 0.000616] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[ 0.000623] This ensures that you still see kernel messages. Please
[ 0.000629] update your kernel commandline.
[ 0.000687] Calibrating delay loop… 718.02 BogoMIPS (lpj=3590144)
[ 0.118870] pid_max: default: 32768 minimum: 301
[ 0.119134] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.119151] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.120219] CPU: Testing write buffer coherency: ok
[ 0.120297] CPU0: Spectre v2: using BPIALL workaround
[ 0.121291] Setting up static identity map for 0x80100000 – 0x80100060
[ 0.121470] rcu: Hierarchical SRCU implementation.
[ 0.121566] EFI services will not be available.
[ 0.121997] devtmpfs: initialized
[ 0.135070] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 0.135530] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.135557] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.139871] pinctrl core: initialized pinctrl subsystem
[ 0.140814] DMI not present or invalid.
[ 0.141359] NET: Registered protocol family 16
[ 0.144163] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.172019] l3-aon-clkctrl:0000:0: failed to disable
[ 0.174389] cpuidle: using governor ladder
[ 0.174428] cpuidle: using governor menu
[ 0.194587] No ATAGs?
[ 0.194600] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.215679] debugfs: Directory '49000000.edma' with parent 'dmaengine' already present!
[ 0.215722] edma 49000000.edma: TI EDMA DMA engine driver
[ 0.216538] reg-fixed-voltage fixedregulator0: GPIO lookup for consumer (null)
[ 0.216554] reg-fixed-voltage fixedregulator0: using device tree for GPIO lookup
[ 0.216584] of_get_named_gpiod_flags: can't parse 'gpios' property of node '/fixedregulator0[0]'
[ 0.216605] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator0[0]'
[ 0.216622] reg-fixed-voltage fixedregulator0: using lookup tables for GPIO lookup
[ 0.216635] reg-fixed-voltage fixedregulator0: No GPIO consumer (null) found
[ 0.217901] iommu: Default domain type: Translated
[ 0.220764] SCSI subsystem initialized
[ 0.221341] mc: Linux media interface: v0.10
[ 0.221390] videodev: Linux video capture interface: v2.00
[ 0.221510] pps_core: LinuxPPS API ver. 1 registered
[ 0.221519] pps_core: Software ver. 5.3.6 – Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.221544] PTP clock support registered
[ 0.221583] EDAC MC: Ver: 3.0.0
[ 0.223009] Advanced Linux Sound Architecture Driver Initialized.
[ 0.224533] clocksource: Switched to clocksource timer1
[ 0.234275] thermal_sys: Registered thermal governor 'fair_share'
[ 0.234287] thermal_sys: Registered thermal governor 'bang_bang'
[ 0.234309] thermal_sys: Registered thermal governor 'step_wise'
[ 0.234317] thermal_sys: Registered thermal governor 'user_space'
[ 0.234324] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.235156] NET: Registered protocol family 2
[ 0.236025] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.236060] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[ 0.236091] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[ 0.236122] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.236253] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.236277] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.236454] NET: Registered protocol family 1
[ 0.237153] RPC: Registered named UNIX socket transport module.
[ 0.237167] RPC: Registered udp transport module.
[ 0.237173] RPC: Registered tcp transport module.
[ 0.237180] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.237904] PCI: CLS 0 bytes, default 64
[ 0.239074] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[ 0.240534] Initialise system trusted keyrings
[ 0.240869] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[ 0.247108] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.248019] NFS: Registering the id_resolver key type
[ 0.248071] Key type id_resolver registered
[ 0.248079] Key type id_legacy registered
[ 0.248132] ntfs: driver 2.1.32 [Flags: R/O].
[ 0.294421] Key type asymmetric registered
[ 0.294445] Asymmetric key parser 'x509' registered
[ 0.294624] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
[ 0.294639] io scheduler mq-deadline registered
[ 0.294648] io scheduler kyber registered
[ 0.300749] gpio gpiochip0: (gpio-0-31): added GPIO chardev (254:0)
[ 0.300865] gpiochip_setup_dev: registered GPIOs 0 to 31 on device: gpiochip0 (gpio-0-31)
[ 0.300926] OMAP GPIO hardware version 0.1
[ 0.327073] gpio gpiochip1: (gpio-32-63): added GPIO chardev (254:1)
[ 0.327193] gpiochip_setup_dev: registered GPIOs 32 to 63 on device: gpiochip1 (gpio-32-63)
[ 0.330075] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[ 0.347726] gpio gpiochip2: (gpio-64-95): added GPIO chardev (254:2)
[ 0.347846] gpiochip_setup_dev: registered GPIOs 64 to 95 on device: gpiochip2 (gpio-64-95)
[ 0.349413] gpio gpiochip3: (gpio-96-127): added GPIO chardev (254:3)
[ 0.349509] gpiochip_setup_dev: registered GPIOs 96 to 127 on device: gpiochip3 (gpio-96-127)
[ 0.359392] pinctrl-single 44e10800.pinmux: 142 pins, size 568
[ 0.364342] pwm-backlight backlight: GPIO lookup for consumer enable
[ 0.364366] pwm-backlight backlight: using device tree for GPIO lookup
[ 0.364422] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/backlight[0]' – status (0)
[ 0.364622] gpio gpiochip0: Persistence not supported for GPIO 7
[ 0.364633] no flags found for enable
[ 0.364675] pwm-backlight backlight: backlight supply power not found, using dummy regulator
[ 0.423724] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
[ 0.429231] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
[ 1.218531] printk: console [ttyS0] enabled
[ 1.224662] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 46, base_baud = 3000000) is a 8250
[ 1.236729] omap_rng 48310000.rng: Random Number Generator ver. 20
[ 1.244763] random: fast init done
[ 1.248478] random: crng init done
[ 1.253374] tilcdc-panel panel: GPIO lookup for consumer enable
[ 1.260014] tilcdc-panel panel: using device tree for GPIO lookup
[ 1.266215] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/panel[0]' – status (0)
[ 1.275577] gpio gpiochip2: Persistence not supported for GPIO 1
[ 1.281622] tilcdc-panel panel: found enable GPIO
[ 1.287037] OF: graph: no port node found in /ocp/interconnect@48000000/segment@300000/target-module@e000/lcdc@0
[ 1.297633] OF: graph: no port node found in /ocp/interconnect@48000000/segment@300000/target-module@e000/lcdc@0
[ 1.308386] OF: graph: no port node found in /ocp/interconnect@48000000/segment@300000/target-module@e000/lcdc@0
[ 1.318663] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.325322] [drm] No driver support for vblank timestamp query.
[ 1.346326] [drm] Initialized tilcdc 1.0.0 20121205 for 4830e000.lcdc on minor 0
[ 1.359939] tilcdc 4830e000.lcdc: fb0: tilcdcdrmfb frame buffer device
[ 1.384784] brd: module loaded
[ 1.396542] loop: module loaded
[ 1.406482] mdio_bus fixed-0: GPIO lookup for consumer reset
[ 1.412189] mdio_bus fixed-0: using lookup tables for GPIO lookup
[ 1.418433] mdio_bus fixed-0: No GPIO consumer reset found
[ 1.423969] libphy: Fixed MDIO Bus: probed
[ 1.432645] mdio_bus 4a101000.mdio: GPIO lookup for consumer reset
[ 1.438962] mdio_bus 4a101000.mdio: using device tree for GPIO lookup
[ 1.445474] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/interconnect@4a000000/segment@0/target-module@100000/ethernet@0/mdio@1000[0]'
[ 1.460260] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/interconnect@4a000000/segment@0/target-module@100000/ethernet@0/mdio@1000[0]'
[ 1.474952] mdio_bus 4a101000.mdio: using lookup tables for GPIO lookup
[ 1.481597] mdio_bus 4a101000.mdio: No GPIO consumer reset found
[ 1.544568] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[ 1.552268] libphy: 4a101000.mdio: probed
[ 1.557319] mdio_bus 4a101000.mdio:00: GPIO lookup for consumer reset
[ 1.563800] mdio_bus 4a101000.mdio:00: using device tree for GPIO lookup
[ 1.570654] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/interconnect@4a000000/segment@0/target-module@100000/ethernet@0/mdio@1000/ethernet-phy@0[0]'
[ 1.586811] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/interconnect@4a000000/segment@0/target-module@100000/ethernet@0/mdio@1000/ethernet-phy@0[0]'
[ 1.602848] mdio_bus 4a101000.mdio:00: using lookup tables for GPIO lookup
[ 1.609812] mdio_bus 4a101000.mdio:00: No GPIO consumer reset found
[ 1.616754] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[ 1.626188] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[ 1.632575] cpsw 4a100000.ethernet: ALE Table size 1024
[ 1.637957] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[ 1.645219] cpsw 4a100000.ethernet: Detected MACID = b0:7e:11:b4:ad:ae
[ 1.654049] i2c /dev entries driver
[ 1.660835] cpuidle: enable-method property 'ti,am3352' found operations
[ 1.668403] sdhci: Secure Digital Host Controller Interface driver
[ 1.674676] sdhci: Copyright(c) Pierre Ossman
[ 1.680513] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
[ 1.686614] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[ 1.693221] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/ocp/interconnect@48000000/segment@0/target-module@60000/mmc@0[0]' – status (0)
[ 1.707062] gpio gpiochip0: Persistence not supported for GPIO 15
[ 1.713194] omap_gpio 44e07000.gpio: Could not set line 15 debounce to 200000 microseconds (-22)
[ 1.722038] omap_hsmmc 48060000.mmc: Got CD GPIO
[ 1.726692] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
[ 1.732725] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[ 1.739463] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/interconnect@48000000/segment@0/target-module@60000/mmc@0[0]'
[ 1.752604] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/interconnect@48000000/segment@0/target-module@60000/mmc@0[0]'
[ 1.765638] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
[ 1.772371] omap_hsmmc 48060000.mmc: No GPIO consumer wp found
[ 1.785169] omap_hsmmc 47810000.mmc: GPIO lookup for consumer cd
[ 1.791218] omap_hsmmc 47810000.mmc: using device tree for GPIO lookup
[ 1.797949] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/target-module@47810000/mmc@0[0]'
[ 1.808590] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/target-module@47810000/mmc@0[0]'
[ 1.819121] omap_hsmmc 47810000.mmc: using lookup tables for GPIO lookup
[ 1.825874] omap_hsmmc 47810000.mmc: No GPIO consumer cd found
[ 1.831737] omap_hsmmc 47810000.mmc: GPIO lookup for consumer wp
[ 1.837784] omap_hsmmc 47810000.mmc: using device tree for GPIO lookup
[ 1.844353] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/target-module@47810000/mmc@0[0]'
[ 1.854950] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/target-module@47810000/mmc@0[0]'
[ 1.865447] omap_hsmmc 47810000.mmc: using lookup tables for GPIO lookup
[ 1.872178] omap_hsmmc 47810000.mmc: No GPIO consumer wp found
[ 1.878351] omap_hsmmc 47810000.mmc: RX DMA channel request failed
[ 1.894781] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.901981] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.909944] hidraw: raw HID events driver (C) Jiri Kosina
[ 1.919535] NET: Registered protocol family 10
[ 1.925631] Segment Routing with IPv6
[ 1.929417] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 1.936331] NET: Registered protocol family 17
[ 1.941227] Key type dns_resolver registered
[ 1.945897] omap_voltage_late_init: Voltage driver support not added
[ 1.953002] Loading compiled-in X.509 certificates
[ 1.972910] omap-gpmc 50000000.gpmc: GPMC revision 6.0
[ 1.978301] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
[ 1.984463] gpiochip_find_base: found new base at 510
[ 1.989956] gpio gpiochip4: (omap-gpmc): added GPIO chardev (254:4)
[ 1.996392] gpiochip_setup_dev: registered GPIOs 510 to 511 on device: gpiochip4 (omap-gpmc)
[ 2.006175] omap2-nand 8000000.nand: GPIO lookup for consumer rb
[ 2.012225] omap2-nand 8000000.nand: using device tree for GPIO lookup
[ 2.018900] of_get_named_gpiod_flags: parsed 'rb-gpios' property of node '/ocp/gpmc@50000000/nand@0,0[0]' – status (0)
[ 2.029889] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xdc
[ 2.036290] nand: Macronix MX30LF4G18AC
[ 2.040144] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 2.047847] nand: WARNING: omap2-nand.0: the ECC used on your system is too weak compared to the one required by the NAND chip
[ 2.059410] 9 fixed-partitions partitions found on MTD device omap2-nand.0
[ 2.066335] Creating 9 MTD partitions on "omap2-nand.0":
[ 2.071679] 0x000000000000-0x000000020000 : "NAND.SPL"
[ 2.078961] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"
[ 2.086537] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"
[ 2.093907] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"
[ 2.101378] 0x000000080000-0x000000200000 : "NAND.u-boot"
[ 2.108995] 0x000000200000-0x000000580000 : "NAND.u-boot-logo"
[ 2.118060] 0x000000580000-0x000000d80000 : "NAND.kernel"
[ 2.128798] 0x00000d800000-0x000012800000 : "NAND.rootfs"
[ 2.173530] 0x000005d80000-0x000020000000 : "NAND.filesystem"
[ 2.404830] tps65910 0-002d: No interrupt support, no core IRQ
[ 2.410926] tps65910-gpio tps65910-gpio: ti,en-gpio-sleep not specified
[ 2.417663] gpiochip_find_base: found new base at 504
[ 2.423000] gpio gpiochip5: (tps65910): added GPIO chardev (254:5)
[ 2.429344] gpiochip_setup_dev: registered GPIOs 504 to 509 on device: gpiochip5 (tps65910)
[ 2.442061] vrtc: supplied by vbat
[ 2.447028] vio: supplied by vbat
[ 2.452121] vdd_mpu: supplied by vbat
[ 2.457595] vdd_core: supplied by vbat
[ 2.464006] vdig1: supplied by vbat
[ 2.468889] vdig2: supplied by vbat
[ 2.473722] vpll: supplied by vbat
[ 2.478501] vdac: supplied by vbat
[ 2.483249] vaux1: supplied by vbat
[ 2.488138] vaux2: supplied by vbat
[ 2.492975] vaux33: supplied by vbat
[ 2.497936] vmmc: supplied by vbat
[ 2.502597] vbb: supplied by vbat
[ 2.506649] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[ 2.513737] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 400 kHz
[ 2.523405] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
[ 2.529653] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[ 2.536332] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/ocp/interconnect@48000000/segment@0/target-module@60000/mmc@0[0]' – status (0)
[ 2.550212] gpio gpiochip0: Persistence not supported for GPIO 15
[ 2.556368] omap_gpio 44e07000.gpio: Could not set line 15 debounce to 200000 microseconds (-22)
[ 2.565210] omap_hsmmc 48060000.mmc: Got CD GPIO
[ 2.569850] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
[ 2.575896] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
[ 2.582468] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/interconnect@48000000/segment@0/target-module@60000/mmc@0[0]'
[ 2.595599] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/interconnect@48000000/segment@0/target-module@60000/mmc@0[0]'
[ 2.608630] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
[ 2.615377] omap_hsmmc 48060000.mmc: No GPIO consumer wp found
[ 2.649111] ubi0: attaching mtd7
[ 2.685360] mmc0: host does not support reading read-only switch, assuming write-enable
[ 2.695352] mmc0: Problem switching card into high-speed mode!
[ 2.701772] mmc0: new SDHC card at address 0001
[ 2.710398] mmcblk0: mmc0:0001 SD16G 14.5 GiB
[ 2.721789] mmcblk0: p1
[ 2.778156] ubi0: scanning is finished
[ 2.781937] ubi0: empty MTD device detected
[ 2.813657] ubi0: attached mtd7 (name "NAND.rootfs", size 80 MiB)
[ 2.819864] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[ 2.826787] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[ 2.833516] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[ 2.840561] ubi0: good PEBs: 639, bad PEBs: 1, corrupted PEBs: 0
[ 2.846684] ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
[ 2.853940] ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 771018508
[ 2.863047] ubi0: available PEBs: 556, total reserved PEBs: 83, PEBs reserved for bad PEB handling: 79
[ 2.872436] ubi0: background thread "ubi_bgt0d" started, PID 70
[ 2.878968] hctosys: unable to open rtc device (rtc0)
[ 2.886353] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 2.903564] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 2.911413] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 2.922282] ALSA device list:
[ 2.926325] No soundcards found.
[ 2.930658] cfg80211: failed to load regulatory.db
[ 2.939086] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
[ 2.948276] Please append a correct "root=" boot option; here are the available partitions:
[ 2.957686] 0100 65536 ram0
[ 2.957690] (driver?)
[ 2.964561] 0101 65536 ram1
[ 2.964564] (driver?)
[ 2.970693] 0102 65536 ram2
[ 2.970695] (driver?)
[ 2.976898] 0103 65536 ram3
[ 2.976901] (driver?)
[ 2.983922] 0104 65536 ram4
[ 2.983924] (driver?)
[ 2.991001] 0105 65536 ram5
[ 2.991004] (driver?)
[ 2.998061] 0106 65536 ram6
[ 2.998064] (driver?)
[ 3.005104] 0107 65536 ram7
[ 3.005107] (driver?)
[ 3.012125] 0108 65536 ram8
[ 3.012128] (driver?)
[ 3.019170] 0109 65536 ram9
[ 3.019173] (driver?)
[ 3.026218] 010a 65536 ram10
[ 3.026220] (driver?)
[ 3.033281] 010b 65536 ram11
[ 3.033283] (driver?)
[ 3.040409] 010c 65536 ram12
[ 3.040411] (driver?)
[ 3.047543] 010d 65536 ram13
[ 3.047545] (driver?)
[ 3.054536] 010e 65536 ram14
[ 3.054539] (driver?)
[ 3.060754] 010f 65536 ram15
[ 3.060756] (driver?)
[ 3.067027] 1f00 128 mtdblock0
[ 3.067030] (driver?)
[ 3.074485] 1f01 128 mtdblock1
[ 3.074488] (driver?)
[ 3.081979] 1f02 128 mtdblock2
[ 3.081982] (driver?)
[ 3.089457] 1f03 128 mtdblock3
[ 3.089460] (driver?)
[ 3.096941] 1f04 1536 mtdblock4
[ 3.096944] (driver?)
[ 3.104396] 1f05 3584 mtdblock5
[ 3.104399] (driver?)
[ 3.111869] 1f06 8192 mtdblock6
[ 3.111872] (driver?)
[ 3.119359] 1f07 81920 mtdblock7
[ 3.119362] (driver?)
[ 3.126832] 1f08 428544 mtdblock8
[ 3.126835] (driver?)
[ 3.134287] b300 15187968 mmcblk0
[ 3.134291] driver: mmcblk
[ 3.142041] b301 15183872 mmcblk0p1 d705f04c-01
[ 3.142044]
[ 3.149779] Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 3.158093] —[ end Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]—

Shine:

我把您的帖子升级到英文e2e,请关注下面帖子的回复。https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1069166/am3352-kernel-panic—not-syncing-vfs-unable-to-mount-root-fs-on-unknown-block-0-0

,

Shine:

请看下面工程师的回复,看一下是不是ECC的问题。

One concern I see is below:

Shine said:
[ 2.047847] nand: WARNING: omap2-nand.0: the ECC used on your system is too weak compared to the one required by the NAND chip

Have you made sure to match the ECC scheme used in U-Boot and that used by the kernel?

Our documentation for creating UBIFS on TI boards is here:

https://software-dl.ti.com/processor-sdk-linux/esd/docs/latest/linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND.html

Maybe that will provide some insight into some setting that we've found to work well.

,

chamberlain:

好的,收到,我验证看下。

,

Shine:

好的。

,

chamberlain:

你好,当前已验证,保证u-boot和kernel是同样的ecc校验方式,即为ecc bch校验方式,系统已无如下警告:

nand: WARNING: omap2-nand.0: the ECC used on your system is too weak compared to the one required by the NAND chip

但是还是失败。我把做的修改,英文叙述一遍,帮忙转发英文e2e,多谢。

Hello:

the u-boot use NAND ECC BCH; 

I check the kernel source code and the menuconfig,and open the kernel 5.4 MTD_NAND_ECC_SW_BCH config;

and the dts am335x-evm.dts is as follows:

&gpmc { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&nandflash_pins_s0>; ranges = <0 0 0x08000000 0x1000000>; /* CS0: 16MB for NAND */ nand@0,0 { compatible = "ti,omap2-nand"; reg = <0 0 4>; /* CS0, offset 0, IO size 4 */ interrupt-parent = <&gpmc>; interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */ <1 IRQ_TYPE_NONE>; /* termcount */ rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */ ti,nand-xfer-type = "prefetch-dma"; ti,nand-ecc-opt = "sw"; //ti,nand-ecc-opt = "bch8"; ti,elm-id = <&elm>;

then burning the ubifs to nand flash, it also fail, but without the following warning:

 nand: WARNING: omap2-nand.0: the ECC used on your system is too weak compared to the one required by the NAND chip

 the new log as follows:

[ 1.963598] omap-gpmc 50000000.gpmc: GPMC revision 6.0[ 1.968995] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000[ 1.975159] gpiochip_find_base: found new base at 510[ 1.980646] gpio gpiochip4: (omap-gpmc): added GPIO chardev (254:4)[ 1.987098] gpiochip_setup_dev: registered GPIOs 510 to 511 on device: gpiochip4 (omap-gpmc)[ 1.996892] omap2-nand 8000000.nand: GPIO lookup for consumer rb[ 2.002941] omap2-nand 8000000.nand: using device tree for GPIO lookup[ 2.009614] of_get_named_gpiod_flags: parsed 'rb-gpios' property of node '/ocp/gpmc@50000000/nand@0,0[0]' – status (0)[ 2.020607] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xdc[ 2.027012] nand: Macronix MX30LF4G18AC[ 2.030866] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64[ 2.040360] 9 fixed-partitions partitions found on MTD device omap2-nand.0[ 2.047329] Creating 9 MTD partitions on "omap2-nand.0":[ 2.052678] 0x000000000000-0x000000020000 : "NAND.SPL"[ 2.059987] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"[ 2.067561] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"[ 2.074918] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"[ 2.082401] 0x000000080000-0x000000200000 : "NAND.u-boot"[ 2.090028] 0x000000200000-0x000000580000 : "NAND.u-boot-spl-os"[ 2.099256] 0x000000580000-0x000000d80000 : "NAND.kernel"[ 2.109991] 0x00000d800000-0x000012800000 : "NAND.rootfs"[ 2.154616] 0x000005d80000-0x000020000000 : "NAND.filesystem"[ 2.385558] tps65910 0-002d: No interrupt support, no core IRQ[ 2.391650] tps65910-gpio tps65910-gpio: ti,en-gpio-sleep not specified[ 2.398374] gpiochip_find_base: found new base at 504[ 2.403703] gpio gpiochip5: (tps65910): added GPIO chardev (254:5)[ 2.410047] gpiochip_setup_dev: registered GPIOs 504 to 509 on device: gpiochip5 (tps65910)[ 2.422752] vrtc: supplied by vbat[ 2.427730] vio: supplied by vbat[ 2.432843] vdd_mpu: supplied by vbat[ 2.438332] vdd_core: supplied by vbat[ 2.444760] vdig1: supplied by vbat[ 2.449634] vdig2: supplied by vbat[ 2.454472] vpll: supplied by vbat[ 2.459252] vdac: supplied by vbat[ 2.464007] vaux1: supplied by vbat[ 2.468894] vaux2: supplied by vbat[ 2.473742] vaux33: supplied by vbat[ 2.478703] vmmc: supplied by vbat[ 2.483378] vbb: supplied by vbat[ 2.487423] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz[ 2.494528] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 400 kHz[ 2.504190] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd[ 2.510437] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup[ 2.517112] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/ocp/interconnect@48000000/segment@0/target-module@60000/mmc@0[0]' – status (0)[ 2.530993] gpio gpiochip0: Persistence not supported for GPIO 15[ 2.537148] omap_gpio 44e07000.gpio: Could not set line 15 debounce to 200000 microseconds (-22)[ 2.545989] omap_hsmmc 48060000.mmc: Got CD GPIO[ 2.550632] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp[ 2.556678] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup[ 2.563251] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/interconnect@48000000/segment@0/target-module@60000/mmc@0[0]'[ 2.576382] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/interconnect@48000000/segment@0/target-module@60000/mmc@0[0]'[ 2.589414] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup[ 2.596161] omap_hsmmc 48060000.mmc: No GPIO consumer wp found[ 2.629803] ubi0: attaching mtd7[ 2.666044] mmc0: host does not support reading read-only switch, assuming write-enable[ 2.676094] mmc0: Problem switching card into high-speed mode![ 2.682293] mmc0: new SDHC card at address 0001[ 2.690292] mmcblk0: mmc0:0001 SD16G 14.5 GiB[ 2.702100] mmcblk0: p1[ 2.779640] ubi0: scanning is finished[ 2.783423] ubi0: empty MTD device detected[ 2.815912] ubi0: attached mtd7 (name "NAND.rootfs", size 80 MiB)[ 2.822052] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes[ 2.829112] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512[ 2.835868] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096[ 2.842860] ubi0: good PEBs: 639, bad PEBs: 1, corrupted PEBs: 0[ 2.848924] ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128[ 2.856196] ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 941190370[ 2.865309] ubi0: available PEBs: 556, total reserved PEBs: 83, PEBs reserved for bad PEB handling: 79[ 2.874667] ubi0: background thread "ubi_bgt0d" started, PID 70[ 2.881194] hctosys: unable to open rtc device (rtc0)[ 2.889615] cfg80211: Loading compiled-in X.509 certificates for regulatory database[ 2.908333] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'[ 2.915060] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2[ 2.924798] cfg80211: failed to load regulatory.db[ 2.932887] ALSA device list:[ 2.936928] No soundcards found.[ 2.946158] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19[ 2.954208] Please append a correct "root=" boot option; here are the available partitions:[ 2.963627] 0100 65536 ram0[ 2.963631] (driver?)[ 2.970773] 0101 65536 ram1[ 2.970776] (driver?)[ 2.977910] 0102 65536 ram2[ 2.977913] (driver?)[ 2.984975] 0103 65536 ram3

,

Shine:

已更新,请关注工程师的回复。

,

Shine:

请看一下工程师的回复。

Could they take a look here:

https://www.ti2k.com/wp-content/uploads/ti2k/DeyiSupport_DSP_ubifs.html

and turn on some additional debug, especially around mounting?

Or, can they boot to an initramfs and try mounting the partition on a running system to see if they get any additional debug clues?

,

chamberlain:

好的,收到。节前放假比较早,才看到消息。

我对照2个方案建议进行验证下,多谢。

赞(0)
未经允许不得转载:TI中文支持网 » AM3352: 制作ubifs文件系统,nand flash启动,挂载文件系统失败 VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19
分享到: 更多 (0)

© 2024 TI中文支持网   网站地图 鲁ICP备2022002796号-1