[U-Boot] [PATCH] stxamc8548: make environment use one of the smaller "boot" blocks in flash
oakad at yahoo.com
oakad at yahoo.com
Tue Aug 4 13:01:37 CEST 2009
From: Alex Dubov <oakad at yahoo.com>
Put environment into .ppcenv section aligned on a smaller "boot" eraseblock
boundary near flash end.
Signed-off-by: Alex Dubov <oakad at yahoo.com>
---
board/stx/stxamc8548/u-boot.lds | 11 ++++++++++-
include/configs/stxamc8548.h | 3 ++-
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/board/stx/stxamc8548/u-boot.lds b/board/stx/stxamc8548/u-boot.lds
index 57c4e51..6b46c60 100644
--- a/board/stx/stxamc8548/u-boot.lds
+++ b/board/stx/stxamc8548/u-boot.lds
@@ -109,16 +109,25 @@ SECTIONS
__ex_table : { *(__ex_table) }
__stop___ex_table = .;
+ .ppcenv ADDR(.text) + 0x38000 :
+ {
+ *(.ppcenv)
+ }
+
. = ALIGN(256);
+
__init_begin = .;
.text.init : { *(.text.init) }
.data.init : { *(.data.init) }
+
+
. = ALIGN(256);
__init_end = .;
+
.bootpg ADDR(.text) + 0x3f000 :
{
- cpu/mpc85xx/start.o (.bootpg)
+ cpu/mpc85xx/start.o (.bootpg)
} :text = 0xffff
.resetvec ADDR(.text) + 0x3fffc :
diff --git a/include/configs/stxamc8548.h b/include/configs/stxamc8548.h
index c01a4bb..cecd858 100644
--- a/include/configs/stxamc8548.h
+++ b/include/configs/stxamc8548.h
@@ -246,9 +246,10 @@ extern unsigned long get_clock_freq(void);
* Environment
*/
#define CONFIG_ENV_IS_IN_FLASH 1
+#define CONFIG_SYS_USE_PPCENV 1
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + 0x38000)
#define CONFIG_ENV_SECT_SIZE 0x4000 /* 16K(one sector) for env */
-#define CONFIG_ENV_SIZE 0x2000
+#define CONFIG_ENV_SIZE 0x4000
#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
#define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
--
1.5.6.4
More information about the U-Boot
mailing list