This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Ubiattach error NAND Flash

Other Parts Discussed in Thread: AM3354

 
 
Hi,
 
I have a custom AM3354 board with NAND flash.I have partitioned NAND as below.
 
NAND device: Manufacturer ID: 0x01, Chip ID: 0xda (AMD S34ML02G1)
[    1.005125] Creating 2 MTD partitions on "omap2-nand.0":
[    1.010695] 0x000000000000-0x000001e00000 : "Kernel"
[    1.025525] 0x000001e00000-0x000010000000 : "File System"
 
I have created ubifs filesystem by the following command and have writen to flash memory.
 
Commands:  
 
mkfs.ubifs -v -x zlib -m 2048 -e 126976 -c 1808 -r filesystem/ ubifs.img
ubinize -v -o rootfs.ubi.img -m 2048 -p 128KiB -s 2048 -O 2048 ubinize.cfg
flash_eraseall /dev/mtd1
ubiformat /dev/mtd1 -s 2048 -O 2048 -f rootfs.ubi.img
 
Then I am trying to attach it by the following command ..
 
root@am335x-evm:/# ubiattach -p /dev/mtd1
[  134.472430] UBI: attaching mtd1 to ubi0
[  134.476445] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[  134.483035] UBI: logical eraseblock size:    126976 bytes
[  134.488648] UBI: smallest flash I/O unit:    2048
[  134.493555] UBI: VID header offset:          2048 (aligned 2048)
[  134.499800] UBI: data offset:                4096
[  136.569656] UBI: max. sequence number:       0
[  136.608791] UBI: volume 0 ("rootfs") re-sized from 1652 to 1786 LEBs
[  136.621517] UBI: attached mtd1 to ubi0
[  136.625433] UBI: MTD device name:            "File System"
[  136.631185] UBI: MTD device size:            226 MiB
[  136.636347] UBI: number of good PEBs:        1808
[  136.641250] UBI: number of bad PEBs:         0
[  136.645868] UBI: number of corrupted PEBs:   0
[  136.650486] UBI: max. allowed volumes:       128
[  136.655298] UBI: wear-leveling threshold:    4096
[  136.660187] UBI: number of internal volumes: 1
[  136.664816] UBI: number of user volumes:     1
[  136.669434] UBI: available PEBs:             0
[  136.674063] UBI: total number of reserved PEBs: 1808
[  136.679224] UBI: number of PEBs reserved for bad PEB handling: 18
[  136.685571] UBI: max/mean erase counter: 0/0
[  136.690009] UBI: image sequence number:  1781768097
[  136.695463] UBI: background thread "ubi_bgt0d" started, PID 1181
UBI device number 0, total 1808 LEBs (229572608 bytes, 218.9 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
root@am335x-evm:/# [  136.743859] UBI: run torture test for PEB 1805
[  136.863328] UBI error: torture_peb: read problems on freshly erased PEB 1805, must be bad
[  136.871878] UBI error: erase_worker: failed to erase PEB 1805, error -5
[  136.878762] UBI: mark PEB 1805 as bad
[  136.883191] UBI: 17 PEBs left in the reserve
[  136.921910] UBI: run torture test for PEB 1
[  137.039804] UBI error: torture_peb: read problems on freshly erased PEB 1, must be bad
[  137.048099] UBI error: erase_worker: failed to erase PEB 1, error -5
[  137.054726] UBI: mark PEB 1 as bad
[  137.059047] UBI: 16 PEBs left in the reserve
 
I am getting the above error.Every time I am trying to attach ,It creates bad block to NAND.Why I am getting the above error and how to remove it.
 
thanks,  
 
Tapas