Hi
I'm trying to use ubi file system on Samsung NAND flash(K9F2G08U0B) of AM335X custom board.
when I flashed ubi image to Micron NAND(MT29F2G08ABA) on u-boot prompt, everything was fine.
After changing NAND flash to K9F2G08U0B on the same board, it shows the following message.
Could you give some hints?
The followings are commands and config to generate ubi image.
Thanks.
#mkfs.ubifs -V
mkfs.ubifs 1.4.8
#mkfs.ubifs -vv -r working/ -F -o ubifs.img -m 2048 -e 126976 -c 1580
#ubinize -vv -o ubi.img -m 2048 -p 128KiB -s 512 -O 2048 ubinize.cfg
[ubifs]
mode=ubi
image=ubifs.img
vol_id=0
vol_size=192MiB
vol_type=dynamic
vol_name=rootfs
vol_flags=autoresize
U-Boot#mmc rescan;mw.b 0x82000000 0xff 0x1400000;fatload mmc 0 0x82000000 ubi.img;nand erase 0x780000 0xf880000;nandecc hw 2;nand write.i 0x82000000 0x780000 0x1400000
Starting kernel ...
:
:
[ 0.000000] Kernel command line: console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=7,2048 noinitrd rootfstype=ubifs rootwait=1 ip=none
:
:
[ 1.308624] NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
[ 1.318176] Creating 8 MTD partitions on "omap2-nand.0":
[ 1.323791] 0x000000000000-0x000000020000 : "SPL"
[ 1.330718] 0x000000020000-0x000000040000 : "SPL.backup1"
[ 1.338195] 0x000000040000-0x000000060000 : "SPL.backup2"
[ 1.345611] 0x000000060000-0x000000080000 : "SPL.backup3"
[ 1.353118] 0x000000080000-0x000000260000 : "U-Boot"
[ 1.360809] 0x000000260000-0x000000280000 : "U-Boot Env"
[ 1.368103] 0x000000280000-0x000000780000 : "Kernel"
[ 1.377044] 0x000000780000-0x000010000000 : "File System"
[ 1.489593] UBI: attaching mtd7 to ubi0
[ 1.493682] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 1.500305] UBI: logical eraseblock size: 126976 bytes
[ 1.506011] UBI: smallest flash I/O unit: 2048
[ 1.510986] UBI: sub-page size: 512
[ 1.515838] UBI: VID header offset: 2048 (aligned 2048)
[ 1.522186] UBI: data offset: 4096
[ 2.721923] UBI: max. sequence number: 0
[ 2.760772] UBI: volume 0 ("rootfs") re-sized from 1586 to 1939 LEBs
[ 2.768798] UBI: attached mtd7 to ubi0
[ 2.772766] UBI: MTD device name: "File System"
[ 2.778594] UBI: MTD device size: 248 MiB
[ 2.783813] UBI: number of good PEBs: 1981
[ 2.788787] UBI: number of bad PEBs: 7
[ 2.793487] UBI: number of corrupted PEBs: 0
[ 2.798156] UBI: max. allowed volumes: 128
[ 2.803039] UBI: wear-leveling threshold: 4096
[ 2.808013] UBI: number of internal volumes: 1
[ 2.812683] UBI: number of user volumes: 1
[ 2.817382] UBI: available PEBs: 0
[ 2.822052] UBI: total number of reserved PEBs: 1981
[ 2.827301] UBI: number of PEBs reserved for bad PEB handling: 38
[ 2.833740] UBI: max/mean erase counter: 1/0
[ 2.838256] UBI: image sequence number: 2000509254
[ 2.843536] UBI: background thread "ubi_bgt0d" started, PID 546
[ 2.858734] CAN device driver interface
[ 2.862762] CAN bus driver for Bosch D_CAN controller 1.0
[ 2.937988] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
[ 2.944519] davinci_mdio davinci_mdio.0: detected phy mask fff1
[ 3.067779] davinci_mdio.0: probed
[ 3.367828] usbcore: registered new interface driver cdc_ether
[ 3.374206] usbcore: registered new interface driver cdc_eem
[ 3.380310] UBI error: ubi_io_write: error -5 while writing 512 bytes to PEB 530:0, written 0 bytes
[ 3.389892] Backtrace:
[ 3.392517] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c041b1f0>] (dump_stack+0x18/0x1c)
[ 3.401428] r6:00000212 r5:00000000 r4:cf9ce000 r3:c05efcc8
[ 3.407440] [<c041b1d8>] (dump_stack+0x0/0x1c) from [<c02754a0>] (ubi_io_write+0x428/0x494)
[ 3.416290] [<c0275078>] (ubi_io_write+0x0/0x494) from [<c0275784>] (ubi_io_write_ec_hdr+0x138/0x194)
[ 3.426025] [<c027564c>] (ubi_io_write_ec_hdr+0x0/0x194) from [<c0276d68>] (erase_worker+0x1a0/0x688)
[ 3.435760] r7:cf9ce000 r6:cfa75a88 r5:00000000 r4:01000000
[ 3.441772] [<c0276bc8>] (erase_worker+0x0/0x688) from [<c02761fc>] (do_work+0x7c/0xf0)
[ 3.450225] [<c0276180>] (do_work+0x0/0xf0) from [<c0277afc>] (ubi_thread+0xf0/0x190)
[ 3.458496] r6:cf9ce470 r5:cf9ce000 r4:cfaa0000 r3:00000000
[ 3.464508] [<c0277a0c>] (ubi_thread+0x0/0x190) from [<c005550c>] (kthread+0x90/0x94)
[ 3.472808] [<c005547c>] (kthread+0x0/0x94) from [<c003fc68>] (do_exit+0x0/0x67c)
[ 3.480712] r6:c003fc68 r5:c005547c r4:cf81deb8
[ 3.486663] UBI error: erase_worker: failed to erase PEB 530, error -5
[ 3.493591] UBI: mark PEB 530 as bad
[ 3.497619] usbcore: registered new interface driver dm9601
[ 3.503601] cdc_ncm: 04-Aug-2011
[ 3.507263] usbcore: registered new interface driver cdc_ncm
[ 3.513244] Initializing USB Mass Storage driver...
[ 3.518737] usbcore: registered new interface driver usb-storage
[ 3.525054] USB Mass Storage support registered.
[ 3.530578] mousedev: PS/2 mouse device common for all mice
[ 3.537963] omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
[ 3.544708] omap_rtc: already running
[ 3.548828] i2c /dev entries driver
[ 3.553039] Linux video capture interface: v2.00
[ 3.558380] usbcore: registered new interface driver uvcvideo
[ 3.564453] USB Video Class driver (1.1.1)
[ 3.569641] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 3.576446] UBI error: ubi_io_mark_bad: cannot mark PEB 530 bad, error -5
[ 3.583648] UBI warning: ubi_ro_mode: switch to read-only mode
[ 3.589813] Backtrace:
[ 3.592437] [<c0017978>] (dump_backtrace+0x0/0x110) from [<c041b1f0>] (dump_stack+0x18/0x1c)
[ 3.601348] r6:cfa75a88 r5:00000000 r4:fffffffb r3:c05efcc8
[ 3.607360] [<c041b1d8>] (dump_stack+0x0/0x1c) from [<c0276fe0>] (erase_worker+0x418/0x688)
[ 3.616210] [<c0276bc8>] (erase_worker+0x0/0x688) from [<c02761fc>] (do_work+0x7c/0xf0)
[ 3.624664] [<c0276180>] (do_work+0x0/0xf0) from [<c0277afc>] (ubi_thread+0xf0/0x190)
[ 3.632934] r6:cf9ce470 r5:cf9ce000 r4:cfaa0000 r3:00000000
[ 3.638946] [<c0277a0c>] (ubi_thread+0x0/0x190) from [<c005550c>] (kthread+0x90/0x94)
[ 3.647216] [<c005547c>] (kthread+0x0/0x94) from [<c003fc68>] (do_exit+0x0/0x67c)
[ 3.655120] r6:c003fc68 r5:c005547c r4:cf81deb8
[ 3.660034] UBI error: do_work: work failed with error code -5
[ 3.666168] UBI error: ubi_thread: ubi_bgt0d: work failed with error code -5
[ 3.675598] cpuidle: using governor ladder
:
:
: