summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-07-13 20:43:28 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-07-13 21:00:59 +0200
commit492a07593b3d74d4b10fce95e5229cbd4535b1cb (patch)
treefc45469bb37f770976b9baf2938e27f20e6d64d8
parent260a01f2cb025bcac6e4670be00ea29b95e53174 (diff)
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@chromium.org> Reviewed-on: http://review.coreboot.org/10908 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
-rw-r--r--.gitignore1
-rw-r--r--Makefile.inc4
2 files changed, 4 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index f7447b49a2..770a62d126 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 3995fbc1d8..347e07baf3 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