Hello,
I am trying to use UBI on top the NAND on the OMAPL138. But I am having problems. I am currently using TFTP and NFS to boot from the network. I enabled UBI and UBIFS in the kernel and cross compiled the ubi user tools. I then try to follow the steps from the ubifs FAQ.
Here are the mtd devices created by default on the EV
mtd0: 0x000000000000-0x000000020000 : "u-boot env"
mtd1: 0x000000020000-0x000000040000 : "UBL"
mtd2: 0x000000040000-0x0000000c0000 : "u-boot"
mtd3: 0x000000200000-0x000000600000 : "kernel"
mtd4: 0x000000600000-0x000020000000 : "filesystem"
Here are the 2 issues I observed.
1) There are errors when attaching the UBI device the second time (doing attach on a freshly erased/formatted mtd returns no error)
ubiattach /dev/ubi_ctrl -m 4
Then I get a series of error messages:
UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 0:0, read 64 bytes
[...]
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 2:512, read 512 bytes
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 21:512, read 512 bytes
UBI: run torture test for PEB 21
UBI: PEB 21 passed torture test, do not mark it a bad
And these last 4 lines keep getting repeated.
2) Doing a ubiformat seems to screp the bad block table used by u-boot
Ex: root# ubiformat /dev/mtd4
Then at the following boot:
NAND: NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron NAND 512MiB 3,3V 8-bit)
Bad block table not found for chip 0
Bad block table not found for chip 0
Bad block table written to 0x1ffe0000, version 0x01
Bad block table written to 0x1ffc0000, version 0x01
From what I've gathered the BBT in u-boot uses the last 4 blocks.
At first I was only trying with mtd4 so I figured reducing it's size by 4 blocks and defining a mtd5 for the BTT would work but it didn't.
I then tried formatting the mtd3 and obtained the same results.
I don't see why this is affecting the BBT table.
Any help would be appreciated
Marc