Other Parts Discussed in Thread: AM3517
Hello,
I'm trying to convert an existing filesystem from JFFS2 to UBIFS format from the detailed steps at: processors.wiki.ti.com/index.php/UBIFS_Support. The build process went well: my Linux workstation runs Ubuntu 10.04 and I used mkfs.ubifs version1.5. I flashed the NAND memory chip with u-boot and set environment variables to link with the UBIFS file system.
Note that the instructions tells the User to swich to BCH8 ECC before flashing the UBI image, but without telling the command explicitly. I set nandecc to BCH8_sw anyway before flashing.
Now this is where it hurts: the kernel reports ECC errors when it boots: things start nicely as I power my EVM board on:
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Linux version 2.6.37 (marc@Linux) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #40 Thu Aug 9 16:18:44 EDT 2012
[ 0.000000] CPU: ARMv7 Processor [411fc087] revision 7 (ARMv7), cr=10c53c7f
[ 0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine: OMAP3517/AM3517 EVM
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] AM3517 ES1.0 (l2cache iva sgx neon isp )
[ 0.000000] SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x10000
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
[ 0.000000] Kernel command line: console=ttyO2,115200n8 noinitrd ip=off mem=256M rootwait=1 rw ubi.mtd=4,2048 root=ubi0:rootfs init=/init rootfstype=ubifs
(...)
Two secons later, the boot process hits several UBI snags: ECC errors (-74): please note that I got rid of the mtdoops message in subsequent attemps, but I still don't know why I still get ECC errors.
[ 2.306152] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 2.314270] omap2-nand driver initializing
[ 2.319305] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xbc (Micron )
[ 2.326477] Creating 5 MTD partitions on "omap2-nand.0":
[ 2.332122] 0x000000000000-0x000000080000 : "xloader-nand"
[ 2.348632] 0x000000080000-0x000000240000 : "uboot-nand"
[ 2.362884] 0x000000240000-0x000000280000 : "params-nand"
[ 2.376098] 0x000000280000-0x000000780000 : "linux-nand"
[ 2.391693] 0x000000780000-0x000020000000 : "rootfs-nand"
[ 2.672912] UBI: attaching mtd4 to ubi0
[ 2.677093] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 2.683776] UBI: logical eraseblock size: 126976 bytes
[ 2.689483] UBI: smallest flash I/O unit: 2048
[ 2.694427] UBI: sub-page size: 512
[ 2.699310] UBI: VID header offset: 2048 (aligned 2048)
[ 2.705657] UBI: data offset: 4096
[ 2.711425] UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
[ 2.721862] [<c003ff68>] (unwind_backtrace+0x0/0xec) from [<c026174c>] (ubi_io_read+0x1b4/0x248)
[ 2.731140] [<c026174c>] (ubi_io_read+0x1b4/0x248) from [<c0261d90>] (ubi_io_read_ec_hdr+0x6c/0x3c0)
[ 2.741058] [<c0261d90>] (ubi_io_read_ec_hdr+0x6c/0x3c0) from [<c0265824>] (ubi_scan+0x1ec/0xc04)
[ 2.750457] [<c0265824>] (ubi_scan+0x1ec/0xc04) from [<c025bfbc>] (ubi_attach_mtd_dev+0x680/0xdec)
[ 2.759948] [<c025bfbc>] (ubi_attach_mtd_dev+0x680/0xdec) from [<c0021854>] (ubi_init+0x1c8/0x2dc)
[ 2.769439] [<c0021854>] (ubi_init+0x1c8/0x2dc) from [<c00353b8>] (do_one_initcall+0xc8/0x1a0)
[ 2.778533] [<c00353b8>] (do_one_initcall+0xc8/0x1a0) from [<c0008690>] (kernel_init+0x94/0x14c)
[ 2.787811] [<c0008690>] (kernel_init+0x94/0x14c) from [<c003b1b0>] (kernel_thread_exit+0x0/0x8)
(...)
The kernel carries on and initializes the remaining modules. Once done, it crashes and burns when it mounts the file system root.
[ 27.844604] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 27.853393] [<c003ff68>] (unwind_backtrace+0x0/0xec) from [<c035d39c>] (panic+0x54/0x180)
[ 27.862030] [<c035d39c>] (panic+0x54/0x180) from [<c0009168>] (mount_block_root+0x1d0/0x210)
[ 27.870971] [<c0009168>] (mount_block_root+0x1d0/0x210) from [<c00092ec>] (prepare_namespace+0x88/0x1bc)
[ 27.880981] [<c00092ec>] (prepare_namespace+0x88/0x1bc) from [<c0008708>] (kernel_init+0x10c/0x14c)
[ 27.890533] [<c0008708>] (kernel_init+0x10c/0x14c) from [<c003b1b0>] (kernel_thread_exit+0x0/0x8)
What could be the problem? Is it because the NAND device might have bad blocks? I can't guarantee that it is free of them.
Thanks!
Yves