[coreboot] [PATCH]: Report svnversion in Kconfig mode

Bao, Zheng Zheng.Bao at amd.com
Sun Feb 21 03:32:26 CET 2010


Finding out the svnversion we are working on is quite important,
I think. The whole string is copied from original newconfig.

Signed-off-by: Zheng Bao <zheng.bao at amd.com>


Index: Makefile
===================================================================
--- Makefile	(revision 5133)
+++ Makefile	(working copy)
@@ -253,7 +253,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)\"\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_EXTRA_VERSION
\"$(COREBOOT_EXTRA_VERSION)\"\n" >> $(obj)/build.ht
 	printf "#define COREBOOT_BUILD \"`LANG= date`\"\n" >>
$(obj)/build.ht
 	printf "\n" >> $(obj)/build.ht
-------------- next part --------------
A non-text attachment was scrubbed...
Name: report_svnversion.patch
Type: application/octet-stream
Size: 1101 bytes
Desc: report_svnversion.patch
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20100221/6da688d6/attachment.obj>


More information about the coreboot mailing list