[PATCH 2/3] NOR Flash Support (U-Boot env)

Werner Almesberger werner at openmoko.org
Thu Dec 20 18:37:36 CET 2007

Andy Green wrote:
> Adapt default env to boot from /dev/mtdblock5 and specify physmap-flash
> for nor at start of kernel commandline

Hmm, hard-coding the NAND partitions doesn't work, since their size
depends on the presence of bad blocks.

So the correct procedure for updating the environment is to read the
current environment (with the device-specific "mtdparts" variable),
make the desired changes, then write it back. This is what envedit.pl

You could also try to re-generate mtdparts from bad block data, but
then you'd have to distinguish between the original bad blocks (which
affect the partition size) and any blocks that may have gone bad
later (which don't).

- Werner

More information about the openmoko-kernel mailing list