[U-Boot] [PATCH] ppc/85xx: Use CONFIG_SYS_MONITOR_LEN in linker script

Kumar Gala galak at kernel.crashing.org
Wed Sep 9 15:30:14 CEST 2009


Now that we set CONFIG_SYS_MONITOR_LEN properly we can use it and
TEXT_BASE to ensure that the boot page and reset vector are placed at
the proper location in the u-boot image.

We needed to cleanup the use of a C++ comment in P1_P2_RDB.h to allow
use of config.h in u-boot.lds.

Signed-off-by: Kumar Gala <galak at kernel.crashing.org>
---
 cpu/mpc85xx/u-boot.lds      |    8 +++++---
 include/configs/P1_P2_RDB.h |    1 -
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/cpu/mpc85xx/u-boot.lds b/cpu/mpc85xx/u-boot.lds
index d6e22a7..e0de0d1 100644
--- a/cpu/mpc85xx/u-boot.lds
+++ b/cpu/mpc85xx/u-boot.lds
@@ -20,6 +20,8 @@
  * MA 02111-1307 USA
  */
 
+#include <config.h>
+
 OUTPUT_ARCH(powerpc)
 /* Do we need any of these for elf?
    __DYNAMIC = 0;    */
@@ -116,17 +118,17 @@ SECTIONS
   . = ALIGN(256);
   __init_end = .;
 
-  .bootpg ADDR(.text) + 0x7f000 :
+  .bootpg ADDR(.text) + CONFIG_SYS_MONITOR_LEN - 0x1000 :
   {
     cpu/mpc85xx/start.o	(.bootpg)
   } :text = 0xffff
 
-  .resetvec ADDR(.text) + 0x7fffc :
+  .resetvec ADDR(.text) + CONFIG_SYS_MONITOR_LEN - 0x4 :
   {
     *(.resetvec)
   } :text = 0xffff
 
-  . = ADDR(.text) + 0x80000;
+  . = ADDR(.text) + CONFIG_SYS_MONITOR_LEN;
 
   __bss_start = .;
   .bss (NOLOAD)       :
diff --git a/include/configs/P1_P2_RDB.h b/include/configs/P1_P2_RDB.h
index fb46d2b..e18547b 100644
--- a/include/configs/P1_P2_RDB.h
+++ b/include/configs/P1_P2_RDB.h
@@ -208,7 +208,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
  * shorted - index 1
  */
 #define CONFIG_CONS_INDEX	1
-//#define CONFIG_CONS_INDEX	2
 #undef	CONFIG_SERIAL_SOFTWARE_FIFO
 #define CONFIG_SYS_NS16550
 #define CONFIG_SYS_NS16550_SERIAL
-- 
1.6.0.6



More information about the U-Boot mailing list