summaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-11-27 12:36:28 +0100
committerMartin Roth <martinroth@google.com>2015-12-04 19:05:02 +0100
commita91402fc1ee341fca6bec6df76960f68e8b0f8ce (patch)
tree1dd703a1fa949b29976c070a4c1ccd811c404183 /Makefile.inc
parent446c5dcd14cd551ad8ad35101ab2cdd2bdd78757 (diff)
build system: actually provide revision information in defconfig
The config file added to CBFS is the short version created by defconfig. The build system tried to add a header describing the version for quite a while now, but failed because it wrote to the file, then had kconfig overwrite it with the config data. While at it, rely on build.h and its version information instead of calling git manually. Change-Id: I5e4d6c857594a55432c05bf1480973fc950f4d4a Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/12558 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 5d4017413e..4bccefb795 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -232,10 +232,13 @@ cbfs-files-processor-vsa= \
# arg1: input
# arg2: output
cbfs-files-processor-defconfig= \
- $(eval $(2): $(1) ; \
+ $(eval $(2): $(1) $(obj)/build.h; \
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 && \
+ printf "\# This image was built using coreboot " > $(2).tmp && \
+ grep "\<COREBOOT_VERSION\>" $(obj)/build.h |cut -d\" -f2 >> $(2).tmp && \
+ $(MAKE) DOTCONFIG=$(1) DEFCONFIG=$(2).tmp2 savedefconfig && \
+ cat $(2).tmp2 >> $(2).tmp && \
+ rm -f $(2).tmp2 && \
\mv -f $(2).tmp $(2))
#######################################################################