summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-02-05 22:06:10 -0700
committerSimon Glass <sjg@chromium.org>2015-04-18 16:24:24 -0600
commit741e58e0fc8ecf5669ccb7cd9100c5bf68d89158 (patch)
tree9526e5df367fae9d7be21697684fb34893e1c5c9 /Makefile
parent4564faeafbf11feb839e2e3f927be2f1a919ba96 (diff)
downloadu-boot-741e58e0fc8ecf5669ccb7cd9100c5bf68d89158.tar.gz
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: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0f7d58388e..01cad3a6a2 100644
--- a/Makefile
+++ b/Makefile
@@ -728,7 +728,7 @@ DO_STATIC_RELA =
endif
# 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
ifeq ($(CONFIG_SPL_FSL_PBL),y)
@@ -870,6 +870,11 @@ ifndef CONFIG_SYS_UBOOT_START
CONFIG_SYS_UBOOT_START := 0
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 \
-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
@@ -900,6 +905,9 @@ u-boot.sha1: u-boot.bin
u-boot.dis: u-boot
$(OBJDUMP) -d $< > $@
+u-boot.cfg: include/config.h
+ $(call if_changed,cpp_cfg)
+
ifdef CONFIG_TPL
SPL_PAYLOAD := tpl/u-boot-with-tpl.bin
else