[coreboot-gerrit] New patch to review for coreboot: version: allow stating the coreboot revision in .coreboot-version

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Mon Jul 13 20:45:05 CEST 2015


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

-gerrit

commit 9d34d1f3f426cd2abb32893c12f3b3548b30d02a
Author: Patrick Georgi <pgeorgi at chromium.org>
Date:   Mon Jul 13 20:43:28 2015 +0200

    version: allow stating the coreboot revision in .coreboot-version
    
    If .git doesn't exist, try to fetch the coreboot version from a file, before
    falling back to a hard-code.
    
    Change-Id: Idee8019c9a2b766fe69535367614c5254498335a
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
---
 .gitignore   | 1 +
 Makefile.inc | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index f7447b4..770a62d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 .config
 .config.old
+.coreboot-version
 .xcompile
 .ccwrap
 build/
diff --git a/Makefile.inc b/Makefile.inc
index 3995fbc..347e07b 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -23,7 +23,9 @@ GIT:=$(shell [ -d "$(top)/.git" ] && command -v git)
 # misleadingly named, this is the coreboot version
 export KERNELVERSION := $(strip $(if $(GIT),\
 	$(shell git describe --dirty --always || git describe),\
-	4.0$(KERNELREVISION)))
+	$(if $(wildcard $(top)/.coreboot-version),\
+		$(shell cat $(top)/.coreboot-version),\
+		coreboot-unknown$(KERNELREVISION))))
 
 #######################################################################
 # Basic component discovery



More information about the coreboot-gerrit mailing list