Define ENV_ADDR as MONITOR_BASE + MONITOR_LEN. Fix environment sector size (NOR: 32Kb for first four sectors and 128Kb for other; OneNAND: 128Kb).
Last but not least: we have MONITOR_LEN = 0x40000 and one sector for environment (size = 0x20000), so the kernel may start from 0x00060000 only. v2: rebased against for-wd-master branch Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevets...@gmail.com> --- include/configs/vpac270.h | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/configs/vpac270.h b/include/configs/vpac270.h index eb2dc93..c81d567 100644 --- a/include/configs/vpac270.h +++ b/include/configs/vpac270.h @@ -45,7 +45,7 @@ "if ide reset && fatload ide 0 0xa4000000 uImage; then " \ "bootm 0xa4000000; " \ "fi; " \ - "bootm 0x40000;" + "bootm 0x60000;" #define CONFIG_BOOTARGS "console=tty0 console=ttyS0,115200" #define CONFIG_TIMESTAMP #define CONFIG_BOOTDELAY 2 /* Autoboot delay */ @@ -214,7 +214,12 @@ #define CONFIG_SYS_FLASH_PROTECTION 1 #define CONFIG_ENV_IS_IN_FLASH 1 -#define CONFIG_ENV_SECT_SIZE 0x4000 + +/* + * if (CONFIG_SYS_MONITOR_LEN <= 0x18000) CONFIG_ENV_SECT_SIZE = 0x8000; + * else CONFIG_ENV_SECT_SIZE = 0x20000 + */ +#define CONFIG_ENV_SECT_SIZE 0x20000 #elif defined(CONFIG_CMD_ONENAND) /* OneNAND */ #define CONFIG_SYS_NO_FLASH @@ -231,7 +236,7 @@ #define CONFIG_SYS_MONITOR_BASE 0x0 #define CONFIG_SYS_MONITOR_LEN 0x40000 -#define CONFIG_ENV_ADDR 0x40000 +#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) #define CONFIG_ENV_SIZE 0x4000 /* -- 1.7.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot