Patchworkβ More flexibility for coreboot version string

login
register
about
Submitter Patrick Georgi
Date 2011-03-08 10:05:57
Message ID <1299578757.2459.18.camel@linux-0a8x.site>
Download mbox | patch
Permalink /patch/2754/
State Accepted
Headers show

Comments

Patrick Georgi - 2011-03-08 10:05:57
Hi,

attached patch improves flexibility on coreboot version strings in the
final binary. See attachment for details.
Patrick Georgi - 2011-03-15 09:47:04
Am Dienstag, den 08.03.2011, 11:05 +0100 schrieb Georgi, Patrick:
> attached patch improves flexibility on coreboot version strings in the
> final binary. See attachment for details.
ping? (http://patchwork.coreboot.org/patch/2754/)
Stefan Reinauer - 2011-03-16 04:50:09
* Georgi, Patrick <Patrick.Georgi@secunet.com> [110308 11:05]:
> Hi,
> 
> attached patch improves flexibility on coreboot version strings in the
> final binary. See attachment for details.
> -- 
> Patrick Georgi
> SINA-Development - High Security
> secunet Security Networks AG - Mergenthalerallee 77 - 65760 Eschborn, Germany
> Phone +49 201 54 54-3610 - Fax +49 201 54 54-1325 - www.secunet.com 
> 
> Sitz: Kronprinzenstra├če 30, 45128 Essen / Amtsgericht Essen HRB 13615
> Vorstand: Dr. Rainer Baumgart (Vors.), Thomas Koelzer, Thomas Pleines
> Aufsichtsratsvorsitzender: Dr. Karsten Ottenberg

> commit 5d8fbe10ad1fb834874148a3e6adb01515362e35
> Author: Patrick Georgi <Patrick.Georgi@secunet.com>
> Date:   Tue Mar 8 10:56:34 2011 +0100
> 
>     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@secunet.com>

Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>

Patch

commit 5d8fbe10ad1fb834874148a3e6adb01515362e35
Author: Patrick Georgi <Patrick.Georgi@secunet.com>
Date:   Tue Mar 8 10:56:34 2011 +0100

    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@secunet.com>

diff --git a/Makefile.inc b/Makefile.inc

index 1d2d0dc..ed58c94 100644

--- a/Makefile.inc

+++ b/Makefile.inc

@@ -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
@@ -120,7 +121,7 @@  $(obj)/build.h: .xcompile

 	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