summaryrefslogtreecommitdiffstats
path: root/Makefile.inc
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2012-12-10 15:47:23 -0800
committerPatrick Georgi <patrick@georgi-clan.de>2013-03-12 10:22:44 +0100
commit6e7abcd4b58326dc2ea45f1523968d5a099bf6e1 (patch)
treed3ca85073f5e1dcd866c2742d08bc779954fb822 /Makefile.inc
parent68daf3a8757cabb4154c8e2e9712059bab603c3f (diff)
downloadcoreboot-staging-6e7abcd4b58326dc2ea45f1523968d5a099bf6e1.zip
coreboot-staging-6e7abcd4b58326dc2ea45f1523968d5a099bf6e1.tar.gz
Fix 'git describe' invocation
The 'git describe' command is used to obtain the source tree status information when building coreboot. As used this command expects git tags to be defined, so it can report the discrepancy between the current state of the tree and the latest tag. The problem is that the coreboot source tree does not have any git tags defined, so when 'git describe' is invoked, it reports "fatal: No names found, cannot describe anything.". This scary message can be seen on the console during coreboot builds. The solution is to add --always to the `git describe' invocation, which causes it to report the discrepancy with the latest sha1, if any, which is better than nothing. $ rm -rf /tmp/li && mkdir /tmp/li $ cp configs/config.link .config $ make obj=/tmp/li oldconfig $ make obj=/tmp/li $ grep COREBOOT_VERSION /tmp/li/build.h #define COREBOOT_VERSION "1623c06" $ echo '#' >> Makefile.inc $ grep COREBOOT_VERSION /tmp/li/build.h $ make obj=/tmp/li #define COREBOOT_VERSION "1623c06-dirty" $ git checkout Makefile.inc Change-Id: Ia77428b7cd765cbbd59bdbf8251b7bef489d47a5 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://review.coreboot.org/2637 Tested-by: build bot (Jenkins)
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.inc b/Makefile.inc
index ad97363..158ac44 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -19,7 +19,9 @@
#######################################################################
# misleadingly named, this is the coreboot version
-export KERNELVERSION := $(shell if [ -d "$(top)/.git" -a -f "`which git`" ]; then git describe --dirty 2>/dev/null || git describe; else echo unknown; fi)
+export KERNELVERSION := $(shell if [ -d "$(top)/.git" -a -f "`which git`" ]; \
+ then git describe --dirty --always || git describe; \
+ else echo 4.0$(KERNELREVISION); fi)
#######################################################################
# Basic component discovery
OpenPOWER on IntegriCloud