Commit 741e58e0 authored by Simon Glass's avatar Simon Glass
Browse files

Create a .cfg file containing the CONFIG options used to build



At present CONFIG options are split across Kconfig and board config headers
files. Also we have multiple files containing these CONFIG options.

In order to see exactly what is being used for building, create a .cfg
file which holds these options as reported by the C preprocessor.
Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 4564faea
...@@ -728,7 +728,7 @@ DO_STATIC_RELA = ...@@ -728,7 +728,7 @@ DO_STATIC_RELA =
endif endif
# Always append ALL so that arch config.mk's can add custom ones # Always append ALL so that arch config.mk's can add custom ones
ALL-y += u-boot.srec u-boot.bin System.map binary_size_check ALL-y += u-boot.srec u-boot.bin System.map u-boot.cfg binary_size_check
ALL-$(CONFIG_ONENAND_U_BOOT) += u-boot-onenand.bin ALL-$(CONFIG_ONENAND_U_BOOT) += u-boot-onenand.bin
ifeq ($(CONFIG_SPL_FSL_PBL),y) ifeq ($(CONFIG_SPL_FSL_PBL),y)
...@@ -870,6 +870,11 @@ ifndef CONFIG_SYS_UBOOT_START ...@@ -870,6 +870,11 @@ ifndef CONFIG_SYS_UBOOT_START
CONFIG_SYS_UBOOT_START := 0 CONFIG_SYS_UBOOT_START := 0
endif endif
# Create a file containing the configuration options the image was built with
quiet_cmd_cpp_cfg = CFG $@
cmd_cpp_cfg = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \
-D__ASSEMBLY__ -x assembler-with-cpp -P -dM -E -o $@ $<
MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \ MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \
-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \ -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
...@@ -900,6 +905,9 @@ u-boot.sha1: u-boot.bin ...@@ -900,6 +905,9 @@ u-boot.sha1: u-boot.bin
u-boot.dis: u-boot u-boot.dis: u-boot
$(OBJDUMP) -d $< > $@ $(OBJDUMP) -d $< > $@
u-boot.cfg: include/config.h
$(call if_changed,cpp_cfg)
ifdef CONFIG_TPL ifdef CONFIG_TPL
SPL_PAYLOAD := tpl/u-boot-with-tpl.bin SPL_PAYLOAD := tpl/u-boot-with-tpl.bin
else else
......
...@@ -149,7 +149,7 @@ endif ...@@ -149,7 +149,7 @@ endif
boot.bin: $(obj)/u-boot-spl.bin boot.bin: $(obj)/u-boot-spl.bin
$(call if_changed,mkimage) $(call if_changed,mkimage)
ALL-y += $(obj)/$(SPL_BIN).bin ALL-y += $(obj)/$(SPL_BIN).bin $(obj)/$(SPL_BIN).cfg
ifdef CONFIG_SAMSUNG ifdef CONFIG_SAMSUNG
ALL-y += $(obj)/$(BOARD)-spl.bin ALL-y += $(obj)/$(BOARD)-spl.bin
...@@ -165,6 +165,13 @@ endif ...@@ -165,6 +165,13 @@ endif
all: $(ALL-y) all: $(ALL-y)
quiet_cmd_cpp_cfg = CFG $@
cmd_cpp_cfg = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \
-D__ASSEMBLY__ -x assembler-with-cpp -P -dM -E -o $@ $<
$(obj)/$(SPL_BIN).cfg: include/config.h
$(call if_changed,cpp_cfg)
ifdef CONFIG_SAMSUNG ifdef CONFIG_SAMSUNG
ifdef CONFIG_VAR_SIZE_SPL ifdef CONFIG_VAR_SIZE_SPL
VAR_SIZE_PARAM = --vs VAR_SIZE_PARAM = --vs
......
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