mirror of
https://xff.cz/git/u-boot/
synced 2025-09-06 03:02:18 +02:00
x86: Enable generic board support
This enables generic board support so that x86 boards can define CONFIG_SYS_GENERIC_BOARD. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -36,6 +36,9 @@ PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_X86)
|
|||||||
PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm
|
PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm
|
||||||
PLATFORM_CPPFLAGS += -DREALMODE_BASE=0x7c0
|
PLATFORM_CPPFLAGS += -DREALMODE_BASE=0x7c0
|
||||||
|
|
||||||
|
# Support generic board on x86
|
||||||
|
__HAVE_ARCH_GENERIC_BOARD := y
|
||||||
|
|
||||||
PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden
|
PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden
|
||||||
|
|
||||||
PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions
|
PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions
|
||||||
|
@@ -39,6 +39,13 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <compiler.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 {
|
typedef struct bd_info {
|
||||||
unsigned long bi_memstart; /* start of DRAM memory */
|
unsigned long bi_memstart; /* start of DRAM memory */
|
||||||
phys_size_t bi_memsize; /* size of DRAM memory in bytes */
|
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];
|
}bi_dram[CONFIG_NR_DRAM_BANKS];
|
||||||
} bd_t;
|
} bd_t;
|
||||||
|
|
||||||
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
|
#endif /* !CONFIG_SYS_GENERIC_BOARD */
|
||||||
|
|
||||||
/* For image.h:image_check_target_arch() */
|
/* For image.h:image_check_target_arch() */
|
||||||
#define IH_ARCH_DEFAULT IH_ARCH_I386
|
#define IH_ARCH_DEFAULT IH_ARCH_I386
|
||||||
|
|
||||||
|
@@ -25,7 +25,10 @@ include $(TOPDIR)/config.mk
|
|||||||
|
|
||||||
LIB = $(obj)lib$(ARCH).o
|
LIB = $(obj)lib$(ARCH).o
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_SYS_GENERIC_BOARD),)
|
||||||
COBJS-y += board.o
|
COBJS-y += board.o
|
||||||
|
endif
|
||||||
|
|
||||||
COBJS-y += bootm.o
|
COBJS-y += bootm.o
|
||||||
COBJS-y += cmd_boot.o
|
COBJS-y += cmd_boot.o
|
||||||
COBJS-y += gcc.o
|
COBJS-y += gcc.o
|
||||||
|
@@ -507,11 +507,13 @@ static int show_model_r(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* enable exceptions */
|
/* enable exceptions */
|
||||||
|
#ifdef CONFIG_ARM
|
||||||
static int initr_enable_interrupts(void)
|
static int initr_enable_interrupts(void)
|
||||||
{
|
{
|
||||||
enable_interrupts();
|
enable_interrupts();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_CMD_NET
|
#ifdef CONFIG_CMD_NET
|
||||||
static int initr_ethaddr(void)
|
static int initr_ethaddr(void)
|
||||||
|
Reference in New Issue
Block a user