[U-Boot] [PATCH 1/2] Make mpc8572ds, mpc8544ds, mpc8536ds relocatable
Ed Swarthout
Ed.Swarthout at freescale.com
Thu Oct 9 08:27:17 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.
Remove .fixup from .text section since __fixup_entries is only calculated
from .reloc section.
Signed-off-by: Ed Swarthout <Ed.Swarthout at freescale.com>
---
tested with freescale-powerpc-linux-gnu-4.2-171.i686.rpm
Patch #2 is needed only if x86 emulation is used for video bios.
Compiling the x86 bios emulator with -mrelocatable removes the need
to force the function pointer tables into got2. see patch #2
board/freescale/mpc8536ds/config.mk | 1 +
board/freescale/mpc8536ds/u-boot.lds | 1 -
board/freescale/mpc8544ds/config.mk | 1 +
board/freescale/mpc8544ds/u-boot.lds | 1 -
board/freescale/mpc8572ds/config.mk | 1 +
board/freescale/mpc8572ds/u-boot.lds | 1 -
6 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/board/freescale/mpc8536ds/config.mk b/board/freescale/mpc8536ds/config.mk
index 9775ff4..b293583 100644
--- a/board/freescale/mpc8536ds/config.mk
+++ b/board/freescale/mpc8536ds/config.mk
@@ -30,3 +30,4 @@ endif
PLATFORM_CPPFLAGS += -DCONFIG_E500=1
PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
PLATFORM_CPPFLAGS += -DCONFIG_MPC8536=1
+PLATFORM_CPPFLAGS += -mrelocatable -DCONFIG_RELOC_FIXUP_WORKS
diff --git a/board/freescale/mpc8536ds/u-boot.lds b/board/freescale/mpc8536ds/u-boot.lds
index 901f633..54f9fbc 100644
--- a/board/freescale/mpc8536ds/u-boot.lds
+++ b/board/freescale/mpc8536ds/u-boot.lds
@@ -58,7 +58,6 @@ SECTIONS
.text :
{
*(.text)
- *(.fixup)
*(.got1)
} :text
_etext = .;
diff --git a/board/freescale/mpc8544ds/config.mk b/board/freescale/mpc8544ds/config.mk
index 85663ef..b5071f2 100644
--- a/board/freescale/mpc8544ds/config.mk
+++ b/board/freescale/mpc8544ds/config.mk
@@ -30,3 +30,4 @@ endif
PLATFORM_CPPFLAGS += -DCONFIG_E500=1
PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
PLATFORM_CPPFLAGS += -DCONFIG_MPC8544=1
+PLATFORM_CPPFLAGS += -mrelocatable -DCONFIG_RELOC_FIXUP_WORKS
diff --git a/board/freescale/mpc8544ds/u-boot.lds b/board/freescale/mpc8544ds/u-boot.lds
index a05ece5..6477c69 100644
--- a/board/freescale/mpc8544ds/u-boot.lds
+++ b/board/freescale/mpc8544ds/u-boot.lds
@@ -58,7 +58,6 @@ SECTIONS
.text :
{
*(.text)
- *(.fixup)
*(.got1)
} :text
_etext = .;
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..6477c69 100644
--- a/board/freescale/mpc8572ds/u-boot.lds
+++ b/board/freescale/mpc8572ds/u-boot.lds
@@ -58,7 +58,6 @@ SECTIONS
.text :
{
*(.text)
- *(.fixup)
*(.got1)
} :text
_etext = .;
--
1.5.6.5
More information about the U-Boot
mailing list