[coreboot-gerrit] New patch to review for coreboot: build system: actually provide revision information in defconfig

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Fri Nov 27 12:37:58 CET 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12558

-gerrit

commit 1800c7045a984dfcbfaa29f6f574417a3256c312
Author: Patrick Georgi <pgeorgi at chromium.org>
Date:   Fri Nov 27 12:36:28 2015 +0100

    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 at chromium.org>
---
 Makefile.inc | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index 5aae86b..5da7441 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -228,10 +228,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))
 
 #######################################################################



More information about the coreboot-gerrit mailing list