[U-Boot] UBI issues with DM355 and Micron NAND flash

Andy Pont andy.pont at sdcsystems.com
Wed Jun 8 11:03:30 CEST 2016


Hello,

I am working on an update to a Linux configuration for a custom TI DM355
based hardware platform which uses a Micron MT29F4G08ABADAWP NAND flash
device and U-Boot 2013.07 (which I can't change).  The boards have been
deployed in the field over a number of years using the NAND flash to store
the Linux kernel and a CramFS partition and all works well with the
following settings in the board config file:

#define CONFIG_NAND_DAVINCI
#define CONFIG_SYS_NAND_CS			2
#define CONFIG_SYS_NAND_USE_FLASH_BBT
#define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
#define CONFIG_SYS_NAND_PAGE_2K
#define CONFIG_SYS_NAND_LARGEPAGE
#define CONFIG_SYS_NAND_BASE_LIST	{ 0x02000000, }
#define CONFIG_SYS_MAX_NAND_DEVICE	1
#define CONFIG_SYS_NAND_MAX_CHIPS	1

As part of the update we are moving to a UBI root file system and this is
where problems are starting.  As an initial test I am using the following
commands in U-Boot to create the UBI partition:

U-Boot> nand erase.part rootfs
U-Boot> ubi part rootfs

All appears to be well but if I reset the hardware and then rerun the "ubi
part rootfs" command then I am bombarded with errors of the following type
which never seem to end but just change in the PEB being referenced:

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 0:512,
read 512 bytes
UBI error: ubi_io_read: error -74 while reading 64 bytes from PEB 1:0, read
64 bytes
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 1:512,
read 512 bytes

The datasheet for the flash device says that in 8-bit mode a page size is
2048 + 64 bytes and as far as I can tell doesn't mention subpages and so I
am confused by the output from the "ubi part rootfs" command that states
that there are 512 byte sub-pages available:

UBI: physical eraseblock size:	131072 bytes (128 KiB)
UBI: logical eraseblock size:	129024 bytes
UBI: smallest flash I/O unit:	2048
UBI: sub-page size:		512
UBI: VID header offset:		512 (aligned 512)
UBI: data offset:		2048

I have had a look through the source but can't find anyway to disable
sub-page support or to tell it that a sub-page is the same size as the
smallest flash I/O unit.  Then again, I could be looking in completely the
wrong place.

Any thoughts...

Andy.




More information about the U-Boot mailing list