[U-Boot] [PATCH RFC] mpc8572ds relocatable

Ed Swarthout Ed.Swarthout at freescale.com
Mon Sep 8 10:26:52 CEST 2008


Fixes boot crash from bad string pointers in get_table_entry_name
when flash is erased or differs from current u-boot image.

Signed-off-by: Ed Swarthout <Ed.Swarthout at freescale.com>
---

Fix was pointed out by Peter Tyser in Image.c get_table_entry_name thread.

This redoes Grant Likey's relocation change, but leaves control to each board.
This also fixes the "mii dump" command when flash is erased.
Tested with gcc 4.2

 board/freescale/mpc8572ds/config.mk  |    1 +
 board/freescale/mpc8572ds/u-boot.lds |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/board/freescale/mpc8572ds/config.mk b/board/freescale/mpc8572ds/config.mk
index 5b32186..8b3651b 100644
--- a/board/freescale/mpc8572ds/config.mk
+++ b/board/freescale/mpc8572ds/config.mk
@@ -30,3 +30,4 @@ endif
 PLATFORM_CPPFLAGS += -DCONFIG_E500=1
 PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
 PLATFORM_CPPFLAGS += -DCONFIG_MPC8572=1
+PLATFORM_CPPFLAGS += -mrelocatable -DCONFIG_RELOC_FIXUP_WORKS
diff --git a/board/freescale/mpc8572ds/u-boot.lds b/board/freescale/mpc8572ds/u-boot.lds
index a05ece5..79fb41f 100644
--- a/board/freescale/mpc8572ds/u-boot.lds
+++ b/board/freescale/mpc8572ds/u-boot.lds
@@ -58,7 +58,7 @@ SECTIONS
   .text      :
   {
     *(.text)
-    *(.fixup)
+/*  *(.fixup)*/
     *(.got1)
    } :text
     _etext = .;
-- 
1.5.6.5



More information about the U-Boot mailing list