[U-Boot] [PATCH v2 2/6] reboard: define CONFIG_SYS_SKIP_RELOC for all archs

Simon Glass sjg at chromium.org
Sat Dec 10 20:16:12 CET 2011


We are introducing a new generic relocation features and we want this to
be the default. So we need to opt all architectures out first. Some may
never have relocation, but those that do will eventually move over to
this generic relocation framework.

This is part of the unified board effort, but since we are only dealing
with relocation in this series, CONFIG_SYS_SKIP_RELOC is more appropriate
than CONFIG_SYS_LEGACY_BOARD.

Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v2:
- Use CONFIG_SYS_SKIP_RELOC instead of CONFIG_SYS_LEGACY_BOARD

 README                    |    4 ++++
 arch/arm/config.mk        |    3 +++
 arch/avr32/config.mk      |    3 +++
 arch/blackfin/config.mk   |    3 +++
 arch/m68k/config.mk       |    3 +++
 arch/microblaze/config.mk |    3 +++
 arch/mips/config.mk       |    3 +++
 arch/nds32/config.mk      |    3 +++
 arch/nios2/config.mk      |    3 +++
 arch/powerpc/config.mk    |    3 +++
 arch/sandbox/config.mk    |    3 +++
 arch/sh/config.mk         |    3 +++
 arch/sparc/config.mk      |    3 +++
 arch/x86/config.mk        |    3 +++
 14 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/README b/README
index e9d1891..be4bbf8 100644
--- a/README
+++ b/README
@@ -2707,6 +2707,10 @@ Configuration Settings:
 	cases. This setting can be used to tune behaviour; see
 	lib/hashtable.c for details.
 
+- CONFIG_SYS_SKIP_RELOC
+	This makes U-Boot skip relocation for those architectures which
+	don't support it. It is normally defined in arch/xxx/config.mk
+
 The following definitions that deal with the placement and management
 of environment data (variable area); in general, we support the
 following configurations:
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 45f9dca..f47d4f7 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -81,3 +81,6 @@ endif
 ifndef CONFIG_NAND_SPL
 LDFLAGS_u-boot += -pie
 endif
+
+# We use legacy relocation for now
+CONFIG_SYS_SKIP_RELOC := y
diff --git a/arch/avr32/config.mk b/arch/avr32/config.mk
index d8e7ebb..1995983 100644
--- a/arch/avr32/config.mk
+++ b/arch/avr32/config.mk
@@ -31,3 +31,6 @@ PLATFORM_RELFLAGS	+= -ffunction-sections -fdata-sections
 LDFLAGS_u-boot		= --gc-sections --relax
 
 LDSCRIPT			= $(SRCTREE)/$(CPUDIR)/u-boot.lds
+
+# We use legacy relocation for now
+CONFIG_SYS_SKIP_RELOC := y
diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk
index 3595aa2..56047c8 100644
--- a/arch/blackfin/config.mk
+++ b/arch/blackfin/config.mk
@@ -37,6 +37,9 @@ CONFIG_BFIN_BOOT_MODE := $(strip $(subst ",,$(CONFIG_BFIN_BOOT_MODE)))
 PLATFORM_RELFLAGS += -ffixed-P3 -fomit-frame-pointer -mno-fdpic
 PLATFORM_CPPFLAGS += -DCONFIG_BLACKFIN
 
+# Blackfin does not do relocation
+CONFIG_SYS_SKIP_RELOC := y
+
 LDFLAGS_FINAL += --gc-sections
 LDFLAGS += -m elf32bfin
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
diff --git a/arch/m68k/config.mk b/arch/m68k/config.mk
index 11ba334..52bfc81 100644
--- a/arch/m68k/config.mk
+++ b/arch/m68k/config.mk
@@ -29,3 +29,6 @@ PLATFORM_CPPFLAGS += -DCONFIG_M68K -D__M68K__
 PLATFORM_LDFLAGS  += -n
 PLATFORM_RELFLAGS              += -ffunction-sections -fdata-sections
 LDFLAGS_FINAL                  += --gc-sections
+
+# We use legacy relocation for now
+CONFIG_SYS_SKIP_RELOC := y
diff --git a/arch/microblaze/config.mk b/arch/microblaze/config.mk
index abea70b..7645f2e 100644
--- a/arch/microblaze/config.mk
+++ b/arch/microblaze/config.mk
@@ -29,3 +29,6 @@ CROSS_COMPILE ?= mb-
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x80F00000
 
 PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__
+
+# Microblaze does not do relocation
+CONFIG_SYS_SKIP_RELOC := y
diff --git a/arch/mips/config.mk b/arch/mips/config.mk
index 6ab8acd..832b93f 100644
--- a/arch/mips/config.mk
+++ b/arch/mips/config.mk
@@ -52,3 +52,6 @@ PLATFORM_CPPFLAGS		+= -msoft-float
 PLATFORM_LDFLAGS		+= -G 0 -static -n -nostdlib
 PLATFORM_RELFLAGS		+= -ffunction-sections -fdata-sections
 LDFLAGS_FINAL			+= --gc-sections
+
+# We use legacy relocation for now
+CONFIG_SYS_SKIP_RELOC := y
diff --git a/arch/nds32/config.mk b/arch/nds32/config.mk
index c589829..4a4499b 100644
--- a/arch/nds32/config.mk
+++ b/arch/nds32/config.mk
@@ -33,3 +33,6 @@ PLATFORM_RELFLAGS	+= -gdwarf-2
 PLATFORM_CPPFLAGS	+= -DCONFIG_NDS32 -D__nds32__ -G0 -ffixed-10 -fpie
 
 LDFLAGS_u-boot		= --gc-sections --relax
+
+# We use legacy relocation for now
+CONFIG_SYS_SKIP_RELOC := y
diff --git a/arch/nios2/config.mk b/arch/nios2/config.mk
index 7b03ed8..cde7f82 100644
--- a/arch/nios2/config.mk
+++ b/arch/nios2/config.mk
@@ -31,3 +31,6 @@ PLATFORM_CPPFLAGS += -G0
 
 LDFLAGS_FINAL += --gc-sections
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
+
+# NIOS2 does not do relocation
+CONFIG_SYS_SKIP_RELOC := y
diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index a307154..eba562f 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -42,3 +42,6 @@ endif
 ifeq ($(CROSS_COMPILE),powerpc-openbsd-)
 PLATFORM_CPPFLAGS+= -D__PPC__
 endif
+
+# We use legacy relocation for now
+CONFIG_SYS_SKIP_RELOC := y
diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk
index ab33026..8a3198e 100644
--- a/arch/sandbox/config.mk
+++ b/arch/sandbox/config.mk
@@ -18,3 +18,6 @@
 # MA 02111-1307 USA
 
 PLATFORM_CPPFLAGS += -DCONFIG_SANDBOX -D__SANDBOX__
+
+# Sandbox does not do relocation
+CONFIG_SYS_SKIP_RELOC := y
diff --git a/arch/sh/config.mk b/arch/sh/config.mk
index 07ff8b9..48a7b37 100644
--- a/arch/sh/config.mk
+++ b/arch/sh/config.mk
@@ -31,3 +31,6 @@ endif
 PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
 PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym reloc_dst=$(CONFIG_SYS_TEXT_BASE)
 LDFLAGS_FINAL = --gc-sections
+
+# SH does not do relocation
+CONFIG_SYS_SKIP_RELOC := y
diff --git a/arch/sparc/config.mk b/arch/sparc/config.mk
index cae7478..032659c 100644
--- a/arch/sparc/config.mk
+++ b/arch/sparc/config.mk
@@ -26,3 +26,6 @@ CROSS_COMPILE ?= sparc-elf-
 CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000 -L $(gcclibdir) -T sparc.lds
 
 PLATFORM_CPPFLAGS += -DCONFIG_SPARC -D__sparc__
+
+# Sparc does not do relocation
+CONFIG_SYS_SKIP_RELOC := y
diff --git a/arch/x86/config.mk b/arch/x86/config.mk
index 23cacff..11f3d18 100644
--- a/arch/x86/config.mk
+++ b/arch/x86/config.mk
@@ -48,3 +48,6 @@ NORMAL_LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
 PREFIXED_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/$(shell basename $(NORMAL_LIBGCC))
 
 export USE_PRIVATE_LIBGCC=$(shell dirname $(PREFIXED_LIBGCC))
+
+# We use legacy relocation for now
+CONFIG_SYS_SKIP_RELOC := y
-- 
1.7.3.1



More information about the U-Boot mailing list