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>
This commit is contained in:
Patrick Georgi 2015-11-27 12:36:28 +01:00 committed by Martin Roth
parent 446c5dcd14
commit a91402fc1e
1 changed files with 6 additions and 3 deletions

View File

@ -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))
#######################################################################