
Hi:
If CPU boot from NAND (at least for AMCC Sequoia board) u-boot environment is part of u-boot image itself, see extraction from sequia.h file:
#ifdef CFG_ENV_IS_IN_NAND /* * For NAND booting the environment is embedded in the U-Boot image. Please take * look at the file board/amcc/sequoia/u-boot-nand.lds for details. */ #define CFG_ENV_SIZE CFG_NAND_BLOCK_SIZE #define CFG_ENV_OFFSET (CFG_NAND_U_BOOT_OFFS + CFG_ENV_SIZE) #define CFG_ENV_OFFSET_REDUND (CFG_ENV_OFFSET + CFG_ENV_SIZE) #endif
Such layout supported by u-boot-nand.lds as comment suggests:
/* WARNING - the following is hand-optimized to fit within */ /* the sector layout of our flash chips! XXX FIXME XXX */
cpu/ppc4xx/start.o (.text)
/* Align to next NAND block */ . = ALIGN(0x4000); common/environment.o (.ppcenv) /* Keep some space here for redundant env and potential bad env blocks */ . = ALIGN(0x10000);
The problem is that any time u-boot image is updated, its environment is lost which is not convenient if the environment differs from default one significantly.
Can I put environment elsewhere on NAND flash and what is bad in doing so?
Thanks,
Leonid.