We're developing an android tablet, derived from the am3517evm eval board. Our tablet uses NAND to store the firmware. We burn the board's NAND in our development lab successfully, but now we're exploring approaches for burning the NAND in the factory as well as by a customer when installing updates. So, we're looking for ideas on the best approach for this. We realize many others have the same need so have been down this path, but we haven't yet seen a good description of the options.
During our development phase, we started by using the TI flash tool, and later used u-boot and the Linux, like this:
- To burn u-boot and the kernel, we boot into u-boot, and use the u-boot 'nand erase' and 'nand write' commands for the burns.
- To burn the root file system, we boot into Linux, mount the NAND file system partition as yaffs2, and then untar our file system into that partition. This takes over an hour.
This approach gets us by for development, but it's too cumbersome and slow for use by either our factory, or for later updates by our customers. So, we're now looking for alternatives that are simpler and faster. I'm aware that Android has a recovery tool, and we're looking at that, even though it's not directly supported by the TI distribution. For a first cut, we're also looking for a simpler (and admittedly less flexible) approach to get us going, presumably leveraging existing utilities.
Our thinking is to program the NAND by running scripts from Linux, booted from an SD card. We would store our u-boot, kernel, and rootfs images somewhere on the SD card, along with the scripts. The scripts would call up utilities to perform the NAND erase and burn procedure.
My questions are:
- Is using a Linux boot with scripts a good approach for burning the NAND?
- How would the scripts go about their business? Are there existing utilities, like perhaps something in MTD Utilities, that could accomplish the erase and burns? I'm assuming the flash_eraseall tool works for the erase part of this, but am not sure about the burn part.
- Or, do we need to write some C code and call kernel NAND routines that already exist.
- For the root file system, I'm hoping we would do a one-time burn onto NAND to produce a 'golden image', using the mount and untar procedure we're currently using. Then, we would copy that partition to a simple file of unformatted bytes, which could then be quickly burned to other boards using a byte level burn, rather than the slow yaffs2 level burn.
- What other sources for information, other than this forum, might provide other ideas?
Thanks,
Ron