Patchwork [U-Boot,v4,13/27] Define CONFIG_SYS_LEGACY_BOARD everywhere

login
register
mail settings
Submitter Simon Glass
Date March 15, 2012, 2:16 a.m.
Message ID <1331777784-8528-14-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/146821/
State Deferred, archived
Headers show

Comments

Simon Glass - March 15, 2012, 2:16 a.m.
We are introducing a new unified board setup and we want this to
be the default. So we need to opt all architectures out first.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 README                    |   11 +++++++++++
 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 +++
 config.mk                 |    8 ++++++++
 15 files changed, 58 insertions(+), 0 deletions(-)

Patch

diff --git a/README b/README
index 8964672..f471627 100644
--- a/README
+++ b/README
@@ -2770,6 +2770,17 @@  Configuration Settings:
 	cases. This setting can be used to tune behaviour; see
 	lib/hashtable.c for details.
 
+- CONFIG_SYS_GENERIC_BOARD
+	This selects the architecture-generic board system instead of the
+	architecture-specific board files. It is intended to move boards
+	to this new framework over time. Defining this will disable the
+	arch/foo/lib/board.c file and use common/board_f.c and
+	common/board_r.c instead. To use this option your architecture
+	must support it (i.e. must NOT define CONFIG_SYS_LEGACY_BOARD in
+	its config.mk file). If you find problems enabling this option on
+	your board please report the problem and send patches!
+
+
 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..31e9ef9 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -33,6 +33,9 @@  endif
 
 PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
 
+# Move to unified board system later
+CONFIG_SYS_LEGACY_BOARD := y
+
 # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
 PF_CPPFLAGS_ARM := $(call cc-option,-marm,)
 
diff --git a/arch/avr32/config.mk b/arch/avr32/config.mk
index d8e7ebb..6eb00f6 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
+
+# Move to unified board system later
+CONFIG_SYS_LEGACY_BOARD := y
diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk
index 3595aa2..972afb1 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
 
+# Move to unified board system later
+CONFIG_SYS_LEGACY_BOARD := 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..11ad9a5 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
+
+# Move to unified board system later
+CONFIG_SYS_LEGACY_BOARD := y
diff --git a/arch/microblaze/config.mk b/arch/microblaze/config.mk
index abea70b..119a596 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__
+
+# Move to unified board system later
+CONFIG_SYS_LEGACY_BOARD := y
diff --git a/arch/mips/config.mk b/arch/mips/config.mk
index 6ab8acd..8f5305e 100644
--- a/arch/mips/config.mk
+++ b/arch/mips/config.mk
@@ -27,6 +27,9 @@  CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds
 
 PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
 
+# Move to unified board system later
+CONFIG_SYS_LEGACY_BOARD := y
+
 #
 # From Linux arch/mips/Makefile
 #
diff --git a/arch/nds32/config.mk b/arch/nds32/config.mk
index c589829..f989053 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
+
+# Move to unified board system later
+CONFIG_SYS_LEGACY_BOARD := y
diff --git a/arch/nios2/config.mk b/arch/nios2/config.mk
index 7b03ed8..0172f70 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
+
+# Move to unified board system later
+CONFIG_SYS_LEGACY_BOARD := y
diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index a307154..e6203dd 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -29,6 +29,9 @@  PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections
 PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
 PLATFORM_LDFLAGS  += -n
 
+# Move to unified board system later
+CONFIG_SYS_LEGACY_BOARD := y
+
 #
 # When cross-compiling on NetBSD, we have to define __PPC__ or else we
 # will pick up a va_list declaration that is incompatible with the
diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk
index 2ec1bb7..38c97d9 100644
--- a/arch/sandbox/config.mk
+++ b/arch/sandbox/config.mk
@@ -19,3 +19,6 @@ 
 
 PLATFORM_CPPFLAGS += -DCONFIG_SANDBOX -D__SANDBOX__
 PLATFORM_LIBS += -lrt
+
+# Move to unified board system later
+CONFIG_SYS_LEGACY_BOARD := y
diff --git a/arch/sh/config.mk b/arch/sh/config.mk
index 07ff8b9..0c21ef5 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
+
+# Move to unified board system later
+CONFIG_SYS_LEGACY_BOARD := y
diff --git a/arch/sparc/config.mk b/arch/sparc/config.mk
index cae7478..b98a173 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__
+
+# Move to unified board system later
+CONFIG_SYS_LEGACY_BOARD := y
diff --git a/arch/x86/config.mk b/arch/x86/config.mk
index 23cacff..7be3036 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))
+
+# Move to unified board system later
+CONFIG_SYS_LEGACY_BOARD := y
diff --git a/config.mk b/config.mk
index ddaa477..a936f1f 100644
--- a/config.mk
+++ b/config.mk
@@ -206,6 +206,14 @@  ifeq ($(CONFIG_SPL_BUILD),y)
 CPPFLAGS += -DCONFIG_SPL_BUILD
 endif
 
+# Does this architecture support generic board init?
+ifneq ($(CONFIG_SYS_LEGACY_BOARD),)
+ifneq ($(CONFIG_SYS_GENERIC_BOARD),)
+$(error Your architecture does not support generic board. Please undefined \
+CONFIG_SYS_GENERIC_BOARD in your board config file)
+endif
+endif
+
 ifneq ($(RESET_VECTOR_ADDRESS),)
 CPPFLAGS += -DRESET_VECTOR_ADDRESS=$(RESET_VECTOR_ADDRESS)
 endif