env_nand_oob.patch
commitc0593972b650cdc6bb995214ccb83f7758656252
authorHarald Welte <laforge@openmoko.org>
Fri, 11 Apr 2008 13:26:37 +0000 (11 14:26 +0100)
committerwarmcat <andy@warmcat.com>
Fri, 11 Apr 2008 13:26:37 +0000 (11 14:26 +0100)
treea80dd0ae3d2aaae9c1d6b7369655b0bfce894334
parent450f7c4bb2888744684567a848d948e817c0e44c
env_nand_oob.patch
This patch adds support for CFG_ENV_OFFSET_PATCHED and
CFG_ENV_OFFSET_OOB.

Both try to solve the problem of fixing the environment location in NAND flash
at compile time, which doesn't work well if the NAND flash has a bad block at
exactly that location.

CFG_ENV_OFFSET_PATCHED puts the environment in a global variable.  You can then
use the linker script to put that variable to a fixed location in the u-boot
image.  Then you can use bianry patching during the production flash process.

The idea of CFG_ENV_OFFSET_OOB is to store the environment offset in the NAND
OOB data of block 0.  We can do this in case the vendor makes a guarantee that
block 0 never is a factory-default bad block.

Signed-off-by: Harald Welte <laforge@openmoko.org>
common/Makefile
common/cmd_dynenv.c [new file with mode: 0644]
common/env_nand.c
common/environment.c
include/environment.h