diff options
author | Patrick Georgi <pgeorgi@chromium.org> | 2015-07-13 20:43:28 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-07-13 21:00:59 +0200 |
commit | 492a07593b3d74d4b10fce95e5229cbd4535b1cb (patch) | |
tree | fc45469bb37f770976b9baf2938e27f20e6d64d8 | |
parent | 260a01f2cb025bcac6e4670be00ea29b95e53174 (diff) | |
download | coreboot-staging-492a07593b3d74d4b10fce95e5229cbd4535b1cb.zip coreboot-staging-492a07593b3d74d4b10fce95e5229cbd4535b1cb.tar.gz |
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-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.inc | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -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 |