Sometimes when we debug the code, we need to know which version we are working on.
Zheng
Signed-off-by: Zheng Bao zheng.bao@amd.com
Index: src/boot/hardwaremain.c =================================================================== --- src/boot/hardwaremain.c (revision 4080) +++ src/boot/hardwaremain.c (working copy) @@ -58,7 +58,7 @@ post_code(0x39);
- printk_notice("coreboot-%s%s %s %s...\n", + printk_notice("coreboot-%s-r%s %s %s...\n", coreboot_version, coreboot_extra_version, coreboot_build, (boot_complete)?"rebooting":"booting");
Index: src/config/Options.lb =================================================================== --- src/config/Options.lb (revision 4080) +++ src/config/Options.lb (working copy) @@ -103,7 +103,7 @@ comment "coreboot version" end define COREBOOT_EXTRA_VERSION - default "" + default "$(shell if [ -x /usr/bin/svnversion ]; then /usr/bin/svnversion $(TOP); fi)" export used format ""%s"" comment "coreboot extra version" Index: src/arch/i386/lib/console.c =================================================================== --- src/arch/i386/lib/console.c (revision 4080) +++ src/arch/i386/lib/console.c (working copy) @@ -30,6 +30,7 @@ static const char console_test[] = "\r\n\r\ncoreboot-" COREBOOT_VERSION + "-r" COREBOOT_EXTRA_VERSION " " COREBOOT_BUILD
On Tue, Apr 7, 2009 at 12:06 AM, Bao, Zheng Zheng.Bao@amd.com wrote:
Sometimes when we debug the code, we need to know which version we are working on.
I like the idea. I'd like it better if it were part of the version string instead of the extraversion.
Myles
Zheng
Signed-off-by: Zheng Bao zheng.bao@amd.com
Index: src/boot/hardwaremain.c
--- src/boot/hardwaremain.c (revision 4080) +++ src/boot/hardwaremain.c (working copy) @@ -58,7 +58,7 @@
post_code(0x39);
- printk_notice("coreboot-%s%s %s %s...\n",
- printk_notice("coreboot-%s-r%s %s %s...\n",
coreboot_version, coreboot_extra_version, coreboot_build, (boot_complete)?"rebooting":"booting");
Index: src/config/Options.lb
--- src/config/Options.lb (revision 4080) +++ src/config/Options.lb (working copy) @@ -103,7 +103,7 @@ comment "coreboot version" end define COREBOOT_EXTRA_VERSION
- default ""
- default "$(shell if [ -x /usr/bin/svnversion ]; then
/usr/bin/svnversion $(TOP); fi)" export used format ""%s"" comment "coreboot extra version" Index: src/arch/i386/lib/console.c =================================================================== --- src/arch/i386/lib/console.c (revision 4080) +++ src/arch/i386/lib/console.c (working copy) @@ -30,6 +30,7 @@ static const char console_test[] = "\r\n\r\ncoreboot-" COREBOOT_VERSION
- "-r"
COREBOOT_EXTRA_VERSION " " COREBOOT_BUILD
-- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
OK. It is moved to version string.
Zheng
Signed-off-by: Zheng Bao zheng.bao@amd.com
-----Original Message----- From: Myles Watson [mailto:mylesgw@gmail.com] Sent: Wednesday, April 08, 2009 2:05 AM To: Bao, Zheng Cc: coreboot@coreboot.org Subject: Re: [coreboot] show the version of code we are running
On Tue, Apr 7, 2009 at 12:06 AM, Bao, Zheng Zheng.Bao@amd.com wrote:
Sometimes when we debug the code, we need to know which version we are working on.
I like the idea. I'd like it better if it were part of the version string instead of the extraversion.
Myles
Zheng
Signed-off-by: Zheng Bao zheng.bao@amd.com
Index: src/boot/hardwaremain.c
--- src/boot/hardwaremain.c (revision 4080) +++ src/boot/hardwaremain.c (working copy) @@ -58,7 +58,7 @@
post_code(0x39);
- printk_notice("coreboot-%s%s %s %s...\n",
- printk_notice("coreboot-%s-r%s %s %s...\n",
coreboot_version, coreboot_extra_version, coreboot_build, (boot_complete)?"rebooting":"booting");
Index: src/config/Options.lb
--- src/config/Options.lb (revision 4080) +++ src/config/Options.lb (working copy) @@ -103,7 +103,7 @@ comment "coreboot version" end define COREBOOT_EXTRA_VERSION
- default ""
- default "$(shell if [ -x /usr/bin/svnversion ]; then
/usr/bin/svnversion $(TOP); fi)" export used format ""%s"" comment "coreboot extra version" Index: src/arch/i386/lib/console.c =================================================================== --- src/arch/i386/lib/console.c (revision 4080) +++ src/arch/i386/lib/console.c (working copy) @@ -30,6 +30,7 @@ static const char console_test[] = "\r\n\r\ncoreboot-" COREBOOT_VERSION
- "-r"
COREBOOT_EXTRA_VERSION " " COREBOOT_BUILD
-- coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
On Tue, Apr 7, 2009 at 10:12 PM, Bao, Zheng Zheng.Bao@amd.com wrote:
OK. It is moved to version string.
Zheng
Signed-off-by: Zheng Bao zheng.bao@amd.com
Jumping to coreboot. coreboot-2.0.0-r4085M-GRUB2 Wed Apr 8 09:10:50 MDT 2009 booting...
Acked-by: Myles Watson mylesgw@gmail.com
Thanks, Myles
On 08.04.2009 17:16, Myles Watson wrote:
On Tue, Apr 7, 2009 at 10:12 PM, Bao, Zheng Zheng.Bao@amd.com wrote:
OK. It is moved to version string.
Zheng
Signed-off-by: Zheng Bao zheng.bao@amd.com
Jumping to coreboot. coreboot-2.0.0-r4085M-GRUB2 Wed Apr 8 09:10:50 MDT 2009 booting...
Acked-by: Myles Watson mylesgw@gmail.com
Can we please extend this to work for those using git mirroring as well (not me)?
I have a matching command line somewhere. Let me dig it up.
Regards, Carl-Daniel
On Wed, Apr 8, 2009 at 9:18 AM, Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
On 08.04.2009 17:16, Myles Watson wrote:
On Tue, Apr 7, 2009 at 10:12 PM, Bao, Zheng Zheng.Bao@amd.com wrote:
OK. It is moved to version string.
Zheng
Signed-off-by: Zheng Bao zheng.bao@amd.com
Jumping to coreboot. coreboot-2.0.0-r4085M-GRUB2 Wed Apr 8 09:10:50 MDT 2009 booting...
Acked-by: Myles Watson mylesgw@gmail.com
Can we please extend this to work for those using git mirroring as well (not me)?
I have a matching command line somewhere. Let me dig it up.
I'm trying to find which revision broke my cold boot and this would have been nice to have. I think it should go in. You can update it for git later.
Thanks, Myles
On 22.04.2009 23:38, Myles Watson wrote:
On Wed, Apr 8, 2009 at 9:18 AM, Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
On 08.04.2009 17:16, Myles Watson wrote:
On Tue, Apr 7, 2009 at 10:12 PM, Bao, Zheng Zheng.Bao@amd.com wrote:
OK. It is moved to version string.
Zheng
Signed-off-by: Zheng Bao zheng.bao@amd.com
Jumping to coreboot. coreboot-2.0.0-r4085M-GRUB2 Wed Apr 8 09:10:50 MDT 2009 booting...
Acked-by: Myles Watson mylesgw@gmail.com
Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Committed in revision 4191.
Can we please extend this to work for those using git mirroring as well (not me)?
I have a matching command line somewhere. Let me dig it up.
I'm trying to find which revision broke my cold boot and this would have been nice to have. I think it should go in. You can update it for git later.
True. The following line is not as precise as svnversion, but at least it will give you the last svn revision in the git history. git log|grep git-svn-id|cut -f 2 -d@|cut -f 1 -d" "|sort -g|tail -1
The following patch hooks up git mirrored svn revisions and adds some error checking to the svnrevision call.
If a .svn directory exists in the top level directory and the svnversion utility is available, we use svnversion. Otherwise, if a .git directory exists in the top level directory and the git utility is available, we use git log.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: LinuxBIOSv2-svngitrevision/src/config/Options.lb =================================================================== --- LinuxBIOSv2-svngitrevision/src/config/Options.lb (Revision 4192) +++ LinuxBIOSv2-svngitrevision/src/config/Options.lb (Arbeitskopie) @@ -96,8 +96,11 @@ export always comment "Objcopy command" end + +# Try to determine svn revision first. +# If that fails, try last svn revision in git log. define COREBOOT_VERSION - default "2.0.0-r$(shell if [ -f `which svnversion` ]; then svnversion $(TOP); fi)" + default "2.0.0-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 always format ""%s"" comment "coreboot version"
On Wed, Apr 22, 2009 at 6:24 PM, Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
On 22.04.2009 23:38, Myles Watson wrote:
On Wed, Apr 8, 2009 at 9:18 AM, Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
On 08.04.2009 17:16, Myles Watson wrote:
On Tue, Apr 7, 2009 at 10:12 PM, Bao, Zheng Zheng.Bao@amd.com wrote:
OK. It is moved to version string.
Zheng
Signed-off-by: Zheng Bao zheng.bao@amd.com
Jumping to coreboot. coreboot-2.0.0-r4085M-GRUB2 Wed Apr 8 09:10:50 MDT 2009 booting...
Acked-by: Myles Watson mylesgw@gmail.com
Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Committed in revision 4191.
Can we please extend this to work for those using git mirroring as well (not me)?
I have a matching command line somewhere. Let me dig it up.
I'm trying to find which revision broke my cold boot and this would have been nice to have. I think it should go in. You can update it for git later.
True. The following line is not as precise as svnversion, but at least it will give you the last svn revision in the git history. git log|grep git-svn-id|cut -f 2 -d@|cut -f 1 -d" "|sort -g|tail -1
The following patch hooks up git mirrored svn revisions and adds some error checking to the svnrevision call.
If a .svn directory exists in the top level directory and the svnversion utility is available, we use svnversion. Otherwise, if a .git directory exists in the top level directory and the git utility is available, we use git log.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Acked-by: Myles Watson mylesgw@gmail.com
Thanks, Myles
Index: LinuxBIOSv2-svngitrevision/src/config/Options.lb
--- LinuxBIOSv2-svngitrevision/src/config/Options.lb (Revision 4192) +++ LinuxBIOSv2-svngitrevision/src/config/Options.lb (Arbeitskopie) @@ -96,8 +96,11 @@ export always comment "Objcopy command" end
+# Try to determine svn revision first. +# If that fails, try last svn revision in git log. define COREBOOT_VERSION
- default "2.0.0-r$(shell if [ -f `which svnversion` ]; then svnversion $(TOP); fi)"
- default "2.0.0-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 always format ""%s"" comment "coreboot version"
On 23.04.2009 14:26, Myles Watson wrote:
On Wed, Apr 22, 2009 at 6:24 PM, Carl-Daniel Hailfinger wrote:
The following patch hooks up git mirrored svn revisions and adds some error checking to the svnrevision call.
If a .svn directory exists in the top level directory and the svnversion utility is available, we use svnversion. Otherwise, if a .git directory exists in the top level directory and the git utility is available, we use git log.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Acked-by: Myles Watson mylesgw@gmail.com
Thanks, r4194.
Regards, Carl-Daniel