unsupported subpages: how to be sure/fix ?
Hello,
I got the infamous -74 error with the 2-planes OneNand chip I'm using when trying to create a UBI Volume
(Below are the boot messages after flashing a ubinized image ; but I had the same error with the trio ubiformat/ubiattach/ubimkvol. If I understand the "programming ubinized images" well, though, using uboot to flash ubinized images may also create problems, right ?).
So I ran the pagetest and subpagetest (detailed results below) and got a -74 error during the subpagetest. (I also got a ecc error during the pagetest, but I guess it's due to u-boot way of erasing ?)
I then used ubiformat/attach/mkvol/updatevol.
When specifying a VID header offset of 4096 (the page size according to the MTD subsystem) (and modifying the LEB size in the mkfs.ubifs command accordingly), everything works fine.
So: According to he FAQ, a possibility is that the chip doesn't support subpages properly. How could I make sure of that ? Is it a bug ?
Cheers,
David.
----------
* Boot log:
[ 0.000000] Kernel command line: mem=512M console=ttyO2,115200n8
omapfb.mode=dvi:1024x768MR-16@60 mpurate=110 mtdparts=omap2-onenand:0x280000(Bootloader)ro,0x400000(Kernel),-(UBI) ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs
[...]
[ 4.290191] mtdoops: mtd device (mtddev=name/number) must be supplied [ 4.302062] OneNAND driver initializing [ 4.307891] omap2-onenand omap2-onenand: initializing on CS0, phys base 0x20000000, virtual base e0880000 [ 4.318603] Muxed OneNAND(DDP) 512MB 1.8V 16-bit (0x58) [ 4.324188] OneNAND version = 0x0031 [ 4.337799] Scanning device for bad blocks [ 4.562805] OneNAND eraseblock 1812 is an initial bad block [ 4.586090] OneNAND eraseblock 1954 is an initial bad block [ 4.821655] OneNAND eraseblock 3860 is an initial bad block [ 4.845001] OneNAND eraseblock 4002 is an initial bad block [ 4.851348] OneNAND eraseblock 4003 is an initial bad block [ 4.868835] 3 cmdlinepart partitions found on MTD device omap2-onenand [ 4.876037] Creating 3 MTD partitions on "omap2-onenand": [ 4.882049] 0x000000000000-0x000000280000 : "Bootloader" [ 4.904785] mtd: Giving out device 0 to Bootloader [ 4.933532] 0x000000280000-0x000000680000 : "Kernel" [ 4.950256] mtd: Giving out device 1 to Kernel [ 4.970245] 0x000000680000-0x000020000000 : "UBI" [ 5.045166] mtd: Giving out device 2 to UBI [ 5.081085] UBI: attaching mtd2 to ubi0 [ 5.085601] UBI: physical eraseblock size: 262144 bytes (256 KiB) [ 5.092498] UBI: logical eraseblock size: 258048 bytes [ 5.098449] UBI: smallest flash I/O unit: 4096 [ 5.103485] UBI: sub-page size: 1024 [ 5.108673] UBI: VID header offset: 1024 (aligned 1024) [ 5.115264] UBI: data offset: 4096 [ 5.387451] UBI: max. sequence number: 0 [ 5.473144] onenand_write_ops_nolock: verify failed -74 [ 5.478881] UBI error: ubi_io_write: error -74 while writing 1024 bytes to PEB 26:1024, written 0 bytes [ 5.489135] UBI warning: ubi_eba_write_leb: failed to write VID header to LEB 2147479551:0, PEB 26 [ 5.498901] UBI warning: ubi_ro_mode: switch to read-only mode [ 5.505401] UBI error: autoresize: cannot auto-resize volume 0 [ 5.539733] UBI error: ubi_init: cannot attach mtd2
* mtd_pagetest test:
ended with 1 error (ecc are not all 0xff) (I don't have the exact message anymore, sorry)
* mtd_subpages test:
[ 1532.438568] onenand_write_ops_nolock: verify failed -74 [ 1532.444488] mtd_subpagetest: error: write failed at 0x400 [ 1532.450286] mtd_subpagetest: write size: 0x400 [ 1532.455413] mtd_subpagetest: written: 0x0 [ 1532.460113] mtd_subpagetest: error -74 occurred
Signature · 4 lines
David Wagner, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Quoted 5 lines · David Wagner
Hello,
I got the infamous -74 error with the 2-planes OneNand chip I'm using when trying to create a UBI Volume
[...]
Hello again,
I found in the documentation that VERIFY_NAND_WRITES could also cause errors when dealing with subpages of a 2KiB-pages NAND (the onenand i'm using has them). (The warning in the documentation is about -5 errors, though).
I disabled it and the errors also disappeared.
But the time of writing of this warning is 2.6.26 ; is it still relevant ? If so, I would be interested to try and fix it (I'm doing an internship which subject is MTDs)
Signature · 4 lines
David Wagner, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com