Part Number: AM3354
I am trying to get a NAND part programmed before installation on a AM3354-based baseboard.
The vendor has had trouble duplicating the AM335x ECC algorithm on their NAND programmer. They were using the bin2nand source code (provided by TI) as a reference.
After all that, however, I realized that I may be able to use the bin2nand application to create an image file they can just write to the NAND directly.
I have four image files to put on the NAND: MLO, u-boot.img, uImage (Kernel), and ubi.img (Filesystem). I am able to flash these files to the NAND from Linux using the standard nandwrite/flash_erase utils.
Given this, what is the best approach to using the bin2nand tool to create a NAND image that has ECC data that is compatible with the AM3354 hardware (BCH8)? Do I need to dump the entire NAND to a single file and process that? Do I need to use a TI version of nand2bin to accomplish this? Should I create an image for each partition separately using bin2nand on each of the four image files?
Thank you for any guidance or suggestions before I have to fully reverse engineer the source code.
The NAND is partitioned (via the kernel) as (SZ_256K = 0x40000) :
{
.name = "MLO",
.offset = 0, /* mtd1 Offset = 0x0 */
.size = SZ_256K,
},
{
.name = "MLO.backup1",
.offset = MTDPART_OFS_APPEND, /* mtd2 Offset = 0x40000 */
.size = SZ_256K,
},
{
.name = "MLO.backup2",
.offset = MTDPART_OFS_APPEND, /* mtd3 Offset = 0x80000 */
.size = SZ_256K,
},
{
.name = "MLO.backup3",
.offset = MTDPART_OFS_APPEND, /* mtd4 Offset = 0xc0000 */
.size = SZ_256K,
},
{
.name = "U-Boot",
.offset = MTDPART_OFS_APPEND, /* mtd5 Offset = 0x100000 */
.size = 8 * SZ_256K,
},
{
.name = "U-Boot Env",
.offset = MTDPART_OFS_APPEND, /* mtd6 Offset = 0x300000 */
.size = 1 * SZ_256K,
},
{
.name = "Kernel",
.offset = MTDPART_OFS_APPEND, /* mtd7 Offset = 0x340000 */
.size = 20 * SZ_256K,
},
{
.name = "File System",
.offset = MTDPART_OFS_APPEND, /* mtd8 Offset = 0x840000 */
.size = MTDPART_SIZ_FULL,
},
NAND Part: MT29F4G08ABAEAWP:E
Datasheet: www.micron.com/.../mt29f4g08abaeawp