Skip to contentSkip to conversation

__HAVE_ARCH_GENERIC_BOARD controls availabilty of generic board

PATCH New Simon Glass 3 participants 9 messages Mar 8, 2013 – Mar 11, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v8 7/31 __HAVE_ARCH_GENERIC_BOARD controls availabilty of generic board

We are introducing a new unified board setup. Add a check to make sure that board config files do not define CONFIG_SYS_GENERIC_BOARD unless their architecture defines __HAVE_ARCH_GENERIC_BOARD

__HAVE_ARCH_GENERIC_BOARD will currently not be the default setting, but we can switch this later when most architecture support generic board.

---
Changes in v8:
- Switch polarity: !CONFIG_SYS_LEGACY_BOARD becomes __HAVE_ARCH_GENERIC_BOARD

Changes in v7:
- Add description of CONFIG_SYS_LEGACY_BOARD to README

Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 README    | 10 ++++++++++
 config.mk |  8 ++++++++
 2 files changed, 18 insertions(+)
README +10 -0
index 42544ce..2c36e00 100644
@@ -3211,6 +3211,16 @@ Configuration Settings:
 	If defined, don't allow the -f switch to env set override variable
 	access flags.
 
+- 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 define __HAVE_ARCH_GENERIC_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:
config.mk +8 -0
index b7cd481..9886415 100644
@@ -221,6 +221,14 @@ ifeq ($(CONFIG_SPL_BUILD),y)
 CPPFLAGS += -DCONFIG_SPL_BUILD
 endif
 
+# Does this architecture support generic board init?
+ifeq ($(__HAVE_ARCH_GENERIC_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
Signature · 1 line
1.8.1.3
#1 lore raw

PATCH v8 13/31 arm: Enable generic board support

This enables generic board support so that ARM boards can define CONFIG_SYS_GENERIC_BOARD.

---
Changes in v8:
- Define __HAVE_ARCH_GENERIC_BOARD in ARM's config.mk

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/config.mk            | 3 +++
 arch/arm/include/asm/u-boot.h | 9 +++++++++
 arch/arm/lib/Makefile         | 3 +++
 3 files changed, 15 insertions(+)
arch/arm/config.mk +3 -0
index 24b9d7c..a0c89b7 100644
@@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
 endif
 endif
 
+# Support generic board on ARM
+__HAVE_ARCH_GENERIC_BOARD := y
+
 PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
 
 # Choose between ARM/Thumb instruction sets
arch/arm/include/asm/u-boot.h +9 -0
index 2ba98bc..8e7e27b 100644
@@ -36,6 +36,12 @@
 #ifndef _U_BOOT_H_
 #define _U_BOOT_H_	1
 
+#ifdef CONFIG_SYS_GENERIC_BOARD
+/* Use the generic board which requires a unified bd_info */
+#include <asm-generic/u-boot.h>
+#else
+
+#ifndef __ASSEMBLY__
 typedef struct bd_info {
 	unsigned int	bi_baudrate;	/* serial console baudrate */
     ulong	        bi_arch_number;	/* unique id for this board */
@@ -49,6 +55,9 @@ typedef struct bd_info {
 	ulong size;
     }			bi_dram[CONFIG_NR_DRAM_BANKS];
 } bd_t;
+#endif
+
+#endif /* nCONFIG_SYS_GENERIC_BOARD */
 
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_ARM
arch/arm/lib/Makefile +3 -0
index 57111af..24c7e7a 100644
@@ -39,7 +39,10 @@ GLCOBJS	+= div0.o
 SOBJS-y += crt0.o
 
 ifndef CONFIG_SPL_BUILD
+ifndef CONFIG_SYS_GENERIC_BOARD
 COBJS-y	+= board.o
+endif
+
 COBJS-y	+= bootm.o
 COBJS-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
 SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o
Signature · 1 line
1.8.1.3
#2 lore raw

PATCH v8 13/31 arm: Enable generic board support

Quoted 52 lines · Simon Glass

This enables generic board support so that ARM boards can define CONFIG_SYS_GENERIC_BOARD.

---
Changes in v8:
- Define __HAVE_ARCH_GENERIC_BOARD in ARM's config.mk

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/config.mk            | 3 +++
 arch/arm/include/asm/u-boot.h | 9 +++++++++
 arch/arm/lib/Makefile         | 3 +++
 3 files changed, 15 insertions(+)
arch/arm/config.mk +3 -0
index 24b9d7c..a0c89b7 100644
@@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
 endif
 endif
 
+# Support generic board on ARM
+__HAVE_ARCH_GENERIC_BOARD := y
+
 PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
 
 # Choose between ARM/Thumb instruction sets
arch/arm/include/asm/u-boot.h +6 -0
index 2ba98bc..8e7e27b 100644
@@ -36,6 +36,12 @@
 #ifndef _U_BOOT_H_
 #define _U_BOOT_H_     1
 
+#ifdef CONFIG_SYS_GENERIC_BOARD
+/* Use the generic board which requires a unified bd_info */
+#include <asm-generic/u-boot.h>
+#else
+
+#ifndef __ASSEMBLY__
 typedef struct bd_info {
        unsigned int    bi_baudrate;    /* serial console baudrate */
     ulong              bi_arch_number; /* unique id for this board */

arch/arm/include/asm/u-boot.h typedef struct bd_info { · line 60

Quoted 6 lines
arch/arm/include/asm/u-boot.h +3 -0
@@ -49,6 +55,9 @@ typedef struct bd_info {
        ulong size;
     }                  bi_dram[CONFIG_NR_DRAM_BANKS];
 } bd_t;
+#endif
+
+#endif /* nCONFIG_SYS_GENERIC_BOARD */

Typo?

Quoted 24 lines
arch/arm/include/asm/u-boot.h +0 -0
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_ARM
arch/arm/lib/Makefile +3 -1
index 57111af..24c7e7a 100644
@@ -39,7 +39,10 @@ GLCOBJS      += div0.o
 SOBJS-y += crt0.o
 
 ifndef CONFIG_SPL_BUILD
+ifndef CONFIG_SYS_GENERIC_BOARD
 COBJS-y        += board.o
+endif
+
 COBJS-y        += bootm.o
 COBJS-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
 SOBJS-$(CONFIG_USE_ARCH_MEMSET) += memset.o
--

1.8.1.3

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#3 lore raw

PATCH v8 13/31 arm: Enable generic board support

Hi Otavio,

Quoted 54 lines · Otavio Salvador

Review

Quoted 35 lines · Simon Glass

This enables generic board support so that ARM boards can define CONFIG_SYS_GENERIC_BOARD.

---
Changes in v8:
- Define __HAVE_ARCH_GENERIC_BOARD in ARM's config.mk

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/config.mk            | 3 +++
 arch/arm/include/asm/u-boot.h | 9 +++++++++
 arch/arm/lib/Makefile         | 3 +++
 3 files changed, 15 insertions(+)
arch/arm/config.mk +3 -0
index 24b9d7c..a0c89b7 100644
@@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
 endif
 endif
 
+# Support generic board on ARM
+__HAVE_ARCH_GENERIC_BOARD := y
+
 PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
 
 # Choose between ARM/Thumb instruction sets
(quoted diff) +0 -0

b/arch/arm/include/asm/u-boot.h

Quoted 17 lines

index 2ba98bc..8e7e27b 100644

arch/arm/include/asm/u-boot.h +6 -0
@@ -36,6 +36,12 @@
 #ifndef _U_BOOT_H_
 #define _U_BOOT_H_     1
 
+#ifdef CONFIG_SYS_GENERIC_BOARD
+/* Use the generic board which requires a unified bd_info */
+#include <asm-generic/u-boot.h>
+#else
+
+#ifndef __ASSEMBLY__
 typedef struct bd_info {
        unsigned int    bi_baudrate;    /* serial console baudrate */
     ulong              bi_arch_number; /* unique id for this board */
@@ -49,6 +55,9 @@ typedef struct bd_info {
Quoted 9 lines

arch/arm/include/asm/u-boot.h typedef struct bd_info { · line 60

Quoted 6 lines
arch/arm/include/asm/u-boot.h +3 -0
        ulong size;
     }                  bi_dram[CONFIG_NR_DRAM_BANKS];
 } bd_t;
+#endif
+
+#endif /* nCONFIG_SYS_GENERIC_BOARD */

Typo?

The 'n' is intended to mean 'not'. Perhaps I should use ! instead?

Regards,
Simon

#4 lore raw

PATCH v8 13/31 arm: Enable generic board support

Quoted 69 lines · Simon Glass

Hi Otavio,

Quoted 55 lines · Otavio Salvador
Quoted 53 lines · Simon Glass

This enables generic board support so that ARM boards can define CONFIG_SYS_GENERIC_BOARD.

---
Changes in v8:
- Define __HAVE_ARCH_GENERIC_BOARD in ARM's config.mk

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/arm/config.mk            | 3 +++
 arch/arm/include/asm/u-boot.h | 9 +++++++++
 arch/arm/lib/Makefile         | 3 +++
 3 files changed, 15 insertions(+)
arch/arm/config.mk +3 -0
index 24b9d7c..a0c89b7 100644
@@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000
 endif
 endif
 
+# Support generic board on ARM
+__HAVE_ARCH_GENERIC_BOARD := y
+
 PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
 
 # Choose between ARM/Thumb instruction sets
arch/arm/include/asm/u-boot.h +6 -0
index 2ba98bc..8e7e27b 100644
@@ -36,6 +36,12 @@
 #ifndef _U_BOOT_H_
 #define _U_BOOT_H_     1
 
+#ifdef CONFIG_SYS_GENERIC_BOARD
+/* Use the generic board which requires a unified bd_info */
+#include <asm-generic/u-boot.h>
+#else
+
+#ifndef __ASSEMBLY__
 typedef struct bd_info {
        unsigned int    bi_baudrate;    /* serial console baudrate */
     ulong              bi_arch_number; /* unique id for this board */
@@ -49,6 +55,9 @@ typedef struct bd_info {
Quoted 8 lines

arch/arm/include/asm/u-boot.h typedef struct bd_info { · line 60

Quoted 6 lines
arch/arm/include/asm/u-boot.h +3 -0
        ulong size;
     }                  bi_dram[CONFIG_NR_DRAM_BANKS];
 } bd_t;
+#endif
+
+#endif /* nCONFIG_SYS_GENERIC_BOARD */

Typo?

Quoted 1 line

The 'n' is intended to mean 'not'. Perhaps I should use ! instead?

I didn't see this use in rest of code; for me it is fine but something to think about.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#5 lore raw

PATCH v8 13/31 arm: Enable generic board support

In reply to Simon Glass

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 53 lines · Simon Glass

Hi Otavio,

On Sat, Mar 9, 2013 at 4:31 AM, Otavio Salvador
<otavio at ossystems.com.br <mailto:[email protected]>> wrote:

Quoted 4 lines · On Fri, Mar 8, 2013 at 8:45 PM, Simon Glass <[email protected]…

This enables generic board support so that ARM boards can define CONFIG_SYS_GENERIC_BOARD.

<mailto:[email protected]>>

Quoted 2 lines

--- Changes in v8: - Define __HAVE_ARCH_GENERIC_BOARD in ARM's config.mk

<http://config.mk>

<http://config.mk>

Quoted 9 lines

Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None

arch/arm/config.mk <http://config.mk> | 3 +++
arch/arm/include/asm/u-boot.h | 9 +++++++++ arch/arm/lib/Makefile | 3 +++ 3 files changed, 15 insertions(+)

<http://config.mk> renamed from arch/arm/config.mk +0 -0

b/arch/arm/config.mk <http://config.mk>

Quoted 10 lines

index 24b9d7c..a0c89b7 100644 --- a/arch/arm/config.mk
<http://config.mk> +++ b/arch/arm/config.mk <http://config.mk> @@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000 endif endif

+# Support generic board on ARM +__HAVE_ARCH_GENERIC_BOARD := y
+ PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__

# Choose between ARM/Thumb instruction sets diff --git a/arch/arm/include/asm/u-boot.h

b/arch/arm/include/asm/u-boot.h

Quoted 5 lines

index 2ba98bc..8e7e27b 100644 --- a/arch/arm/include/asm/u-boot.h +++ b/arch/arm/include/asm/u-boot.h @@ -36,6 +36,12 @@ #ifndef
_U_BOOT_H_ #define _U_BOOT_H_ 1

Quoted 8 lines

+#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which requires a unified bd_info */ +#include <asm-generic/u-boot.h> +#else + +#ifndef __ASSEMBLY__ typedef struct bd_info { unsigned
int bi_baudrate; /* serial console baudrate */ ulong
bi_arch_number; /* unique id for this board */ @@ -49,6 +55,9 @@ typedef struct bd_info { ulong size; } bi_dram[CONFIG_NR_DRAM_BANKS]; } bd_t; +#endif + +#endif /* nCONFIG_SYS_GENERIC_BOARD */

Typo?

Quoted 1 line

The 'n' is intended to mean 'not'. Perhaps I should use ! instead?

!CONFIG is the style of the rest of the codebase. Thanks.

- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRPIpAAAoJENk4IS6UOR1WvHsP/RxMk8w1XFl6lMmsJysrdwRd 4pGVk1x1LjRpnleo3nJgQIX5e458g6oM7tra0JQ1RvbxNEZhWiJon/P0kun4gTAt CPzCNZt0JyAXTu/+MyNTALuLMwY30JSzBR6Tg1uTgrfBDcQVOlRkwCwU91oDBeQH Dbf8KYfBmOoHy3/uLu/JwEAbAOQFxb4VdTaXnwM9Vp4sDX2TiP1gyJVDT668/i07 SSwYiIE022zJKe/MSmiWzXwClUDKoKwFOsv15y+O2Wv5Dr+uSSd6uCj+tUlEBFmP uhOZPveAbhL2Myhti1j0GkZD/VSeUhHbAXH5OATQRCJHXZGLSsynxgl4fTFK1Mnn QLcYGyTWGOzba/ytlvSpCfHrQL+dh48bV8Cz3Mvj1iQyZyMRbfC6JMaZu2AFsqvE vQni+ZhuE4FIBLt7mD3e5aqDM2Z6kijpDk95sU0G6LwcUJW1KeFTnqKxTE8BjNu4 dmFsqpNXSDCkgCGdnOasEfXzGmUMy/DlwWtPxXxa/CnFcxDkrh7to9kWW5xYYrL8 zItHpvLeuZAbzHCtjJsewjCx9QXcZ+jvpSbpjUrCEAM29ifxbKukRBb6chU3XDaN KJwRIWlhtkTGXEoUmSsurQGPDD2SvDq10wgml1cQoCB9n756IQBVKruFV+dHjdgw 0TybImGlHorgFeZJh8pX
=zX5G
-----END PGP SIGNATURE-----

#6 lore raw

PATCH v8 13/31 arm: Enable generic board support

Hi Tom,

Quoted 57 lines · Tom Rini

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 53 lines · Simon Glass

Hi Otavio,

On Sat, Mar 9, 2013 at 4:31 AM, Otavio Salvador
<otavio at ossystems.com.br <mailto:[email protected]>> wrote:

Quoted 4 lines · On Fri, Mar 8, 2013 at 8:45 PM, Simon Glass <[email protected]…

This enables generic board support so that ARM boards can define CONFIG_SYS_GENERIC_BOARD.

<mailto:[email protected]>>

Quoted 2 lines

--- Changes in v8: - Define __HAVE_ARCH_GENERIC_BOARD in ARM's config.mk

<http://config.mk>

<http://config.mk>

Quoted 9 lines

Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None

arch/arm/config.mk <http://config.mk> | 3 +++
arch/arm/include/asm/u-boot.h | 9 +++++++++ arch/arm/lib/Makefile | 3 +++ 3 files changed, 15 insertions(+)

<http://config.mk> renamed from arch/arm/config.mk +0 -0

b/arch/arm/config.mk <http://config.mk>

Quoted 10 lines

index 24b9d7c..a0c89b7 100644 --- a/arch/arm/config.mk
<http://config.mk> +++ b/arch/arm/config.mk <http://config.mk> @@ -31,6 +31,9 @@ CONFIG_STANDALONE_LOAD_ADDR = 0xc100000 endif endif

+# Support generic board on ARM +__HAVE_ARCH_GENERIC_BOARD := y
+ PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__

# Choose between ARM/Thumb instruction sets diff --git a/arch/arm/include/asm/u-boot.h

b/arch/arm/include/asm/u-boot.h

Quoted 5 lines

index 2ba98bc..8e7e27b 100644 --- a/arch/arm/include/asm/u-boot.h +++ b/arch/arm/include/asm/u-boot.h @@ -36,6 +36,12 @@ #ifndef
_U_BOOT_H_ #define _U_BOOT_H_ 1

Quoted 8 lines

+#ifdef CONFIG_SYS_GENERIC_BOARD +/* Use the generic board which requires a unified bd_info */ +#include <asm-generic/u-boot.h> +#else + +#ifndef __ASSEMBLY__ typedef struct bd_info { unsigned
int bi_baudrate; /* serial console baudrate */ ulong
bi_arch_number; /* unique id for this board */ @@ -49,6 +55,9 @@ typedef struct bd_info { ulong size; } bi_dram[CONFIG_NR_DRAM_BANKS]; } bd_t; +#endif + +#endif /* nCONFIG_SYS_GENERIC_BOARD */

Typo?

Quoted 4 lines
Quoted 1 line

The 'n' is intended to mean 'not'. Perhaps I should use ! instead?

!CONFIG is the style of the rest of the codebase. Thanks.

OK, I will resend the affected patch(es).

Regards,
Simon

#7 lore raw

PATCH v8 17/31 ppc: Enable generic board support

In reply to Simon Glass

This enables generic board support so that ppc boards can define CONFIG_SYS_GENERIC_BOARD.

---
Changes in v8:
- Define __HAVE_ARCH_GENERIC_BOARD in PPC's config.mk

Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/powerpc/config.mk            | 3 +++
 arch/powerpc/include/asm/u-boot.h | 7 +++++++
 arch/powerpc/lib/Makefile         | 2 ++
 3 files changed, 12 insertions(+)
arch/powerpc/config.mk +3 -0
index b706281..e32d2bf 100644
@@ -29,6 +29,9 @@ PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections
 PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
 PLATFORM_LDFLAGS  += -n
 
+# Support generic board on PPC
+__HAVE_ARCH_GENERIC_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
arch/powerpc/include/asm/u-boot.h +7 -0
index 7229a98..951dd6a 100644
@@ -34,6 +34,11 @@
  * include/asm-ppc/u-boot.h
  */
 
+#ifdef CONFIG_SYS_GENERIC_BOARD
+/* Use the generic board which requires a unified bd_info */
+#include <asm-generic/u-boot.h>
+#else
+
 #ifndef __ASSEMBLY__
 
 typedef struct bd_info {
@@ -144,6 +149,8 @@ typedef struct bd_info {
 
 #endif /* __ASSEMBLY__ */
 
+#endif /* nCONFIG_SYS_GENERIC_BOARD */
+
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_PPC
 
arch/powerpc/lib/Makefile +2 -0
index 86cf02a..59c723b 100644
@@ -59,8 +59,10 @@ SOBJS-y	+= reloc.o
 
 COBJS-$(CONFIG_BAT_RW) += bat_rw.o
 ifndef CONFIG_SPL_BUILD
+ifndef CONFIG_SYS_GENERIC_BOARD
 COBJS-y	+= board.o
 endif
+endif
 COBJS-y	+= bootm.o
 COBJS-y	+= cache.o
 COBJS-y	+= extable.o
Signature · 1 line
1.8.1.3
#8 lore raw

PATCH v8 21/31 x86: Enable generic board support

In reply to Simon Glass

This enables generic board support so that x86 boards can define CONFIG_SYS_GENERIC_BOARD.

---
Changes in v8: None
Changes in v7: None
Changes in v6: None
Changes in v5:
- Avoid setting up gd on x86 as it is already done

Changes in v4: None
Changes in v3: None
Changes in v2: None

 arch/x86/include/asm/u-boot.h | 11 +++++++++++
 arch/x86/lib/Makefile         |  3 +++
 common/board_r.c              |  2 ++
 3 files changed, 16 insertions(+)
arch/x86/include/asm/u-boot.h +11 -0
index 2f45c7b..19c038a 100644
@@ -39,6 +39,13 @@
 #include <config.h>
 #include <compiler.h>
 
+#ifdef CONFIG_SYS_GENERIC_BOARD
+/* Use the generic board which requires a unified bd_info */
+#include <asm-generic/u-boot.h>
+#else
+
+#ifndef __ASSEMBLY__
+
 typedef struct bd_info {
 	unsigned long	bi_memstart;	/* start of DRAM memory */
 	phys_size_t	bi_memsize;	/* size	 of DRAM memory in bytes */
@@ -60,6 +67,10 @@ typedef struct bd_info {
 	}bi_dram[CONFIG_NR_DRAM_BANKS];
 } bd_t;
 
+#endif /* __ASSEMBLY__ */
+
+#endif /* nCONFIG_SYS_GENERIC_BOARD */
+
 /* For image.h:image_check_target_arch() */
 #define IH_ARCH_DEFAULT IH_ARCH_I386
 
arch/x86/lib/Makefile +3 -0
index 9b24dc5..ee89354 100644
@@ -25,7 +25,10 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(ARCH).o
 
+ifeq ($(CONFIG_SYS_GENERIC_BOARD),)
 COBJS-y	+= board.o
+endif
+
 COBJS-y	+= bootm.o
 COBJS-y	+= cmd_boot.o
 COBJS-y	+= gcc.o
common/board_r.c +2 -0
index 29eccdf..230887d 100644
@@ -509,11 +509,13 @@ static int show_model_r(void)
 #endif
 
 /* enable exceptions */
+#ifdef CONFIG_ARM
 static int initr_enable_interrupts(void)
 {
 	enable_interrupts();
 	return 0;
 }
+#endif
 
 #ifdef CONFIG_CMD_NET
 static int initr_ethaddr(void)
Signature · 1 line
1.8.1.3