Commit b16f521a authored by Gabe Black's avatar Gabe Black Committed by Simon Glass
Browse files

x86: Allow excluding reset vector code from u-boot

When running from coreboot we don't want this code.

This version works by ifdef-ing out all of the code that would go
into those sections and all the code that refers to it. The sections are
then empty, and the linker will either leave them empty for the loader
to ignore or remove them entirely.
Signed-off-by: default avatarGabe Black <>
Signed-off-by: Simon Glass's avatarSimon Glass <>
parent 8a487a44
......@@ -231,8 +231,8 @@ endif
OBJS = $(CPUDIR)/start.o
ifeq ($(CPU),x86)
OBJS += $(CPUDIR)/start16.o
OBJS += $(CPUDIR)/resetvec.o
ifeq ($(CPU),ppc4xx)
OBJS += $(CPUDIR)/resetvec.o
......@@ -241,7 +241,7 @@ ifeq ($(CPU),mpc85xx)
OBJS += $(CPUDIR)/resetvec.o
OBJS := $(addprefix $(obj),$(OBJS))
OBJS := $(addprefix $(obj),$(OBJS) $(RESET_OBJS-))
HAVE_VENDOR_COMMON_LIB = $(if $(wildcard board/$(VENDOR)/common/Makefile),y,n)
......@@ -3664,6 +3664,10 @@ Low Level (hardware related) configuration options:
be used if available. These functions may be faster under some
conditions but may increase the binary size.
If defined, the x86 reset vector code is excluded. You will need
to do this when U-Boot is running from Coreboot.
Freescale QE/FMAN Firmware Support:
......@@ -28,12 +28,13 @@ include $(TOPDIR)/
LIB = $(obj)lib$(CPU).o
START = start.o start16.o resetvec.o
START-y = start.o
RESET_OBJS-$(CONFIG_X86_NO_RESET_VECTOR) += resetvec.o start16.o
COBJS = interrupts.o cpu.o
SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
START := $(addprefix $(obj),$(START))
START := $(addprefix $(obj),$(START-y) $(RESET_OBJS-))
all: $(obj).depend $(START) $(LIB)
......@@ -86,6 +86,8 @@ SECTIONS
__bios_start = LOADADDR(.bios);
__bios_size = SIZEOF(.bios);
* The following expressions place the 16-bit Real-Mode code and
* Reset Vector at the end of the Flash ROM
......@@ -95,4 +97,5 @@ SECTIONS
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment