[coreboot] [commit] r6449 - trunk

repository service svn at coreboot.org
Thu Mar 17 08:47:49 CET 2011


Author: oxygene
Date: Thu Mar 17 08:47:49 2011
New Revision: 6449
URL: https://tracker.coreboot.org/trac/coreboot/changeset/6449

Log:
More complete control over KERNELVERSION variable

Allow using revision information (from svn or git) even if the version
number is changed on the command line (eg. make KERNELVERSION='11.03$(REV)')
or dropping it entirely if having that information in the coreboot binary is
not desired.

Signed-off-by: Patrick Georgi <patrick.georgi at secunet.com>
Acked-by: Stefan Reinauer <stefan.reinauer at coreboot.org>

Modified:
   trunk/Makefile.inc

Modified: trunk/Makefile.inc
==============================================================================
--- trunk/Makefile.inc	Tue Mar 15 10:52:17 2011	(r6448)
+++ trunk/Makefile.inc	Thu Mar 17 08:47:49 2011	(r6449)
@@ -19,7 +19,8 @@
 
 #######################################################################
 # misleadingly named, this is the coreboot version
-export KERNELVERSION      := 4.0
+REV=-r$(shell if [ -d $(top)/.svn -a -f "`which svnversion`" ]; then svnversion $(top); else if [ -d $(top)/.git -a -f "`which git`" ]; then git --git-dir=/$(top)/.git log|grep git-svn-id|cut -f 2 -d@|cut -f 1 -d' '|sort -g|tail -1; fi; fi)
+export KERNELVERSION      := 4.0$(REV)
 
 #######################################################################
 # Basic component discovery
@@ -123,7 +124,7 @@
 	printf "/* build system definitions (autogenerated) */\n" > $(obj)/build.ht
 	printf "#ifndef __BUILD_H\n" >> $(obj)/build.ht
 	printf "#define __BUILD_H\n\n" >> $(obj)/build.ht
-	printf "#define COREBOOT_VERSION \"$(KERNELVERSION)-r$(shell if [ -d $(top)/.svn -a -f "`which svnversion`" ]; then svnversion $(top); else if [ -d $(top)/.git -a -f "`which git`" ]; then git --git-dir=/$(top)/.git log|grep git-svn-id|cut -f 2 -d@|cut -f 1 -d' '|sort -g|tail -1; fi; fi)\"\n" >> $(obj)/build.ht
+	printf "#define COREBOOT_VERSION \"$(KERNELVERSION)\"\n" >> $(obj)/build.ht
 	printf "#define COREBOOT_EXTRA_VERSION \"$(COREBOOT_EXTRA_VERSION)\"\n" >> $(obj)/build.ht
 	printf "#define COREBOOT_BUILD \"`LANG= date`\"\n" >> $(obj)/build.ht
 	printf "\n" >> $(obj)/build.ht




More information about the coreboot mailing list