From 492a07593b3d74d4b10fce95e5229cbd4535b1cb Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Mon, 13 Jul 2015 20:43:28 +0200 Subject: 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 Reviewed-on: http://review.coreboot.org/10908 Reviewed-by: Stefan Reinauer Tested-by: build bot (Jenkins) --- Makefile.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makefile.inc') 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 -- cgit v1.2.3