diff options
author | Patrick Georgi <pgeorgi@chromium.org> | 2015-11-25 18:47:56 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-11-29 13:04:52 +0100 |
commit | 551b3830c66bfa1241d84f7ef9f89e8408231a00 (patch) | |
tree | 8f1e9af4a9ca8c60eeec0435c4d026131e76a3c1 | |
parent | 10420ccd5494c31695bc854d35e7b452a40471a2 (diff) | |
download | coreboot-551b3830c66bfa1241d84f7ef9f89e8408231a00.tar.xz |
build system: move defconfig creation into a cbfs-files filter
That allows this special case to become a normal cbfs-files instance,
too.
Change-Id: I896ffebe4cec64c9c11605b4f09c7790e5419928
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12539
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
-rw-r--r-- | Makefile.inc | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/Makefile.inc b/Makefile.inc index 4737f924df..4eebc712d6 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -224,6 +224,17 @@ cbfs-files-processor-vsa= \ $(LD_ramstage) -m elf_i386 -e 0x60020 --section-start .data=0x60000 $(2).tmp -o $(2)) ####################################################################### +# Reduce a .config file to its minimal representation +# arg1: input +# arg2: output +cbfs-files-processor-defconfig= \ + $(eval $(2): $(1) ; \ + printf " CREATE $(2) (from $(1))\n"; \ + echo "\# This image was built using git revision" `git rev-parse HEAD` > $(2).tmp && \ + $(MAKE) DOTCONFIG=$(1) DEFCONFIG=$(2).tmp savedefconfig && \ + \mv -f $(2).tmp $(2)) + +####################################################################### # Add handler for arbitrary files in CBFS $(call add-special-class,cbfs-files) cbfs-files-handler= \ @@ -657,15 +668,6 @@ ifneq ($(CONFIG_SEABIOS_PS2_TIMEOUT),0) $(CBFSTOOL) $@.tmp add-int -i $(CONFIG_SEABIOS_PS2_TIMEOUT) -n etc/ps2-keyboard-spinup endif endif -ifeq ($(CONFIG_INCLUDE_CONFIG_FILE),y) - @printf " CONFIG $(DOTCONFIG)\n" - if [ -f $(DOTCONFIG) ]; then \ - echo "# This image was built using git revision" `git rev-parse HEAD` > $(obj)/config.tmp && \ - $(MAKE) DOTCONFIG=$(DOTCONFIG) DEFCONFIG=$(obj)/config.tmp savedefconfig && \ - $(CBFSTOOL) $@.tmp add -f $(obj)/config.tmp -n config -t raw; rm -f $(obj)/config.tmp ; fi - @printf " REVISION build.h\n" - if [ -f $(obj)/build.h ]; then $(CBFSTOOL) $@.tmp add -f $(obj)/build.h -n revision -t raw; fi -endif ifeq ($(CONFIG_CPU_INTEL_FIRMWARE_INTERFACE_TABLE),y) ifeq ($(CONFIG_CPU_MICROCODE_CBFS_GENERATE),y) @printf " UPDATE-FIT \n" @@ -701,6 +703,14 @@ cbfs-files-$(CONFIG_PXE_ROM) += pci$(CONFIG_PXE_ROM_ID).rom pci$(CONFIG_PXE_ROM_ID).rom-file := $(CONFIG_PXE_ROM_FILE) pci$(CONFIG_PXE_ROM_ID).rom-type := raw +cbfs-files-$(CONFIG_INCLUDE_CONFIG_FILE) += config +config-file := $(DOTCONFIG):defconfig +config-type := raw + +cbfs-files-$(CONFIG_INCLUDE_CONFIG_FILE) += revision +revision-file := $(obj)/build.h +revision-type := raw + cbfs-files-$(CONFIG_INCLUDE_CONFIG_FILE) += payload_config payload_config-file := $(PAYLOAD_CONFIG) payload_config-type := raw |