Qiang Li - Mpu Se

Linux patch to support 8GB NAND flash on iMX53 (MT29F64G08AJABA(8GB), 2CE) -blog archive

Discussion created by Qiang Li - Mpu Se Employee on Apr 13, 2012
Latest reply on Jun 24, 2012 by Qiang Li - Mpu Se

The default Linux BSP has issues to support the 8GB NAND, the attached is the patch to fix it, all modified codes are marked with flag "qiang_debug".

 

 

 

Both uboot. kernel and mtd-utilis need be updated.

 

In Uboot, "nand erase" can erase the whole NAND.

 

Nand partition in mx53_evk.c is:
static struct mtd_partition nand_flash_partitions[] = {
/* MX53 ROM require the boot FCB/DBBT support which need
* more space to store such info on NAND boot partition.
* 16M should cover all kind of NAND boot support on MX53.
*/
   {
    .name = "bootloader",
    .offset = 0,
    .size = 16 * 1024 * 1024},
   {
    .name = "nand.kernel",
    .offset = MTDPART_OFS_APPEND,
    .size = 5 * 1024 * 1024},
   {
    .name = "nand.rootfs",
    .offset = MTDPART_OFS_APPEND,
    .size = 256 * 1024 * 1024},
   {
    .name = "nand.userfs1",
    .offset = MTDPART_OFS_APPEND,
    .size = 256 * 1024 * 1024},
   {
    .name = "nand.userfs2",
    .offset = MTDPART_OFS_APPEND,
    .size = MTDPART_SIZ_FULL},
};

 

In linux rootfs, I used the followed commands for NAND:
flash_eraseall /dev/mtd2
ubiattach /dev/ubi_ctrl -m 2 -d 2
ubimkvol /dev/ubi2 -n 0 -N rootfs -m
mkdir -p /mnt/ubi2; mount -t ubifs ubi2_0 /mnt/ubi2

 

flash_eraseall /dev/mtd3
ubiattach /dev/ubi_ctrl -m 3 -d 3
ubimkvol /dev/ubi3 -n 0 -N userfs1 -m
mkdir -p /mnt/ubi3; mount -t ubifs ubi3_0 /mnt/ubi3

 

flash_eraseall /dev/mtd4
ubiattach /dev/ubi_ctrl -m 4 -d 4
ubimkvol /dev/ubi4 -n 0 -N userfs2 -m
mkdir -p /mnt/ubi4; mount -t ubifs ubi4_0 /mnt/ubi4

Original Attachment has been moved to: R10.3.2-Code-update-for-large-NAND_0413.zip

Outcomes