aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Kconfig6
-rw-r--r--src/arch/x86/Makefile.inc2
-rw-r--r--src/lib/master_header_pointer.c2
3 files changed, 9 insertions, 1 deletions
diff --git a/src/Kconfig b/src/Kconfig
index dc819793cf..bf48360f5e 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -1327,6 +1327,12 @@ config BOOTBLOCK_CUSTOM
# src/lib/bootblock.c#main() C entry point.
bool
+config BOOTBLOCK_IN_CBFS
+ bool
+ default y if ARCH_X86
+ help
+ Select this on platforms that have a top aligned bootblock inside cbfs.
+
config MEMLAYOUT_LD_FILE
string
default "src/mainboard/\$(CONFIG_MAINBOARD_DIR)/memlayout.ld"
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index ff35c2930f..80cd9cf826 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -101,11 +101,13 @@ $(eval $(call early_x86_stage,bootblock,elf64-x86-64))
endif
ifneq ($(CONFIG_UPDATE_IMAGE),y)
+ifeq ($(CONFIG_BOOTBLOCK_IN_CBFS),y)
$(call add_intermediate, add_bootblock, $(objcbfs)/bootblock.bin)
@printf " CBFS $(subst $(obj)/,,$(@))\n"
$(CBFSTOOL) $< add -f $(objcbfs)/bootblock.bin -n bootblock -t bootblock $(TXTIBB) -b -$(call file-size,$(objcbfs)/bootblock.bin) \
$(cbfs-autogen-attributes) $(TS_OPTIONS) $(CBFSTOOL_ADD_CMD_OPTIONS)
endif
+endif
$(call src-to-obj,bootblock,$(dir)/walkcbfs.S): $(obj)/fmap_config.h
bootblock-y += walkcbfs.S
diff --git a/src/lib/master_header_pointer.c b/src/lib/master_header_pointer.c
index b1146121c5..b2c3fe64ef 100644
--- a/src/lib/master_header_pointer.c
+++ b/src/lib/master_header_pointer.c
@@ -5,7 +5,7 @@
#include <fmap_config.h>
#include <stdint.h>
-#if ENV_X86
+#if CONFIG(BOOTBLOCK_IN_CBFS)
__attribute__((used, __section__(".header_pointer")))
#endif