Author: blueswirl Date: 2009-08-02 20:20:53 +0200 (Sun, 02 Aug 2009) New Revision: 533
Added: trunk/openbios-devel/VERSION Modified: trunk/openbios-devel/Makefile.target trunk/openbios-devel/arch/ppc/briq/init.c trunk/openbios-devel/arch/ppc/mol/init.c trunk/openbios-devel/arch/ppc/pearpc/init.c trunk/openbios-devel/arch/ppc/qemu/init.c trunk/openbios-devel/arch/unix/unix.c trunk/openbios-devel/config/scripts/switch-arch trunk/openbios-devel/include/mconfig.h trunk/openbios-devel/include/openbios/config.h trunk/openbios-devel/kernel/bootstrap.c trunk/openbios-devel/modules/elfnote.c Log: Improve version number handling
Signed-off-by: Blue Swirl blauwirbel@gmail.com
Modified: trunk/openbios-devel/Makefile.target =================================================================== --- trunk/openbios-devel/Makefile.target 2009-08-02 16:59:05 UTC (rev 532) +++ trunk/openbios-devel/Makefile.target 2009-08-02 18:20:53 UTC (rev 533) @@ -38,8 +38,6 @@
all: versions dictionaries host-libraries target-libraries host-executables target-executables
-VERSION := "1.0" - versions: $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs
$(ODIR)/forth/version.fs: @@ -51,8 +49,7 @@ $(ODIR)/target/include/openbios-version.h: @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \ ( echo "#define OPENBIOS_BUILD_DATE "$$DATE"" ; \ - echo "#define OPENBIOS_VERSION_STR "$(VERSION)"" ; \ - echo "#define OPENBIOS_RELEASE "$(VERSION)"" ; ) \ + echo "#define OPENBIOS_VERSION_STR "$(VERSION)"" ; ) \ > $(dir $@)/openbios-version.h
info:
Added: trunk/openbios-devel/VERSION =================================================================== --- trunk/openbios-devel/VERSION (rev 0) +++ trunk/openbios-devel/VERSION 2009-08-02 18:20:53 UTC (rev 533) @@ -0,0 +1 @@ +1.0
Modified: trunk/openbios-devel/arch/ppc/briq/init.c =================================================================== --- trunk/openbios-devel/arch/ppc/briq/init.c 2009-08-02 16:59:05 UTC (rev 532) +++ trunk/openbios-devel/arch/ppc/briq/init.c 2009-08-02 18:20:53 UTC (rev 533) @@ -61,7 +61,8 @@
printk("\n"); printk("=============================================================\n"); - printk("OpenBIOS %s [%s]\n", OPENBIOS_RELEASE, OPENBIOS_BUILD_DATE ); + printk(PROGRAM_NAME " " OPENBIOS_VERSION_STR " [%s]\n", + OPENBIOS_BUILD_DATE);
ofmem_init(); initialize_forth();
Modified: trunk/openbios-devel/arch/ppc/mol/init.c =================================================================== --- trunk/openbios-devel/arch/ppc/mol/init.c 2009-08-02 16:59:05 UTC (rev 532) +++ trunk/openbios-devel/arch/ppc/mol/init.c 2009-08-02 18:20:53 UTC (rev 533) @@ -57,7 +57,8 @@
printk("\n"); printk("=============================================================\n"); - printk("OpenBIOS %s [%s]\n", OPENBIOS_RELEASE, OPENBIOS_BUILD_DATE ); + printk(PROGRAM_NAME " " OPENBIOS_VERSION_STR " [%s]\n", + OPENBIOS_BUILD_DATE);
ofmem_init(); initialize_forth();
Modified: trunk/openbios-devel/arch/ppc/pearpc/init.c =================================================================== --- trunk/openbios-devel/arch/ppc/pearpc/init.c 2009-08-02 16:59:05 UTC (rev 532) +++ trunk/openbios-devel/arch/ppc/pearpc/init.c 2009-08-02 18:20:53 UTC (rev 533) @@ -64,7 +64,8 @@
printk("\n"); printk("=============================================================\n"); - printk("OpenBIOS %s [%s]\n", OPENBIOS_RELEASE, OPENBIOS_BUILD_DATE ); + printk(PROGRAM_NAME " " OPENBIOS_VERSION_STR " [%s]\n", + OPENBIOS_BUILD_DATE);
ofmem_init(); initialize_forth();
Modified: trunk/openbios-devel/arch/ppc/qemu/init.c =================================================================== --- trunk/openbios-devel/arch/ppc/qemu/init.c 2009-08-02 16:59:05 UTC (rev 532) +++ trunk/openbios-devel/arch/ppc/qemu/init.c 2009-08-02 18:20:53 UTC (rev 533) @@ -461,7 +461,8 @@
printk("\n"); printk("=============================================================\n"); - printk("OpenBIOS %s [%s]\n", OPENBIOS_RELEASE, OPENBIOS_BUILD_DATE ); + printk(PROGRAM_NAME " " OPENBIOS_VERSION_STR " [%s]\n", + OPENBIOS_BUILD_DATE);
fw_cfg_read(FW_CFG_SIGNATURE, buf, 4); buf[4] = '\0';
Modified: trunk/openbios-devel/arch/unix/unix.c =================================================================== --- trunk/openbios-devel/arch/unix/unix.c 2009-08-02 16:59:05 UTC (rev 532) +++ trunk/openbios-devel/arch/unix/unix.c 2009-08-02 18:20:53 UTC (rev 533) @@ -32,6 +32,7 @@ #include "openbios/stack.h" #include "unix/plugins.h" #include "openbios/bindings.h" +#include "openbios-version.h"
#include "blk.h"
@@ -415,11 +416,12 @@
switch (c) { case 'V': - printk(BANNER "Version " VERSION "\n"); + printk(BANNER "Version " OPENBIOS_VERSION_STR "\n"); return 0; case 'h': case '?': - printk(BANNER "Version " VERSION "\n" USAGE, argv[0]); + printk(BANNER "Version " OPENBIOS_VERSION_STR "\n" + USAGE, argv[0]); return 0; case 'v': verbose = 1;
Modified: trunk/openbios-devel/config/scripts/switch-arch =================================================================== --- trunk/openbios-devel/config/scripts/switch-arch 2009-08-02 16:59:05 UTC (rev 532) +++ trunk/openbios-devel/config/scripts/switch-arch 2009-08-02 18:20:53 UTC (rev 533) @@ -93,6 +93,8 @@ archname fi
+VERSION=`head VERSION` + echo "Configuring OpenBIOS on $HOSTARCH for $*" for RULES_ARCH in $*; do ARCH=`echo $RULES_ARCH | sed s/cross-//g` @@ -173,6 +175,7 @@ echo "AS_FLAGS=$AS_FLAGS" >> $ODIR/config.mak echo "HOSTARCH?=$HOSTARCH" >> $ODIR/config.mak echo "CROSSCFLAGS=$CROSSCFLAGS" >> $ODIR/config.mak + echo "VERSION="$VERSION"" >> $ODIR/config.mak ln -s $SRCDIR/config/xml/rules.xml $ODIR/rules.xml ln -s $SRCDIR/config/examples/${RULES_ARCH}_config.xml $ODIR/config.xml ln -s ../Makefile.target $ODIR/Makefile
Modified: trunk/openbios-devel/include/mconfig.h =================================================================== --- trunk/openbios-devel/include/mconfig.h 2009-08-02 16:59:05 UTC (rev 532) +++ trunk/openbios-devel/include/mconfig.h 2009-08-02 18:20:53 UTC (rev 533) @@ -41,9 +41,6 @@ /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1
-/* Minor OpenBIOS version */ -#define MINOR_VERSION 0 - /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT ""
@@ -59,15 +56,9 @@ /* Define to the version of this package. */ #define PACKAGE_VERSION ""
-/* Patchlevel */ -#define PATCH_LEVEL RC1 - /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1
-/* Version */ -#define VERSION "1.0" - /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #define YYTEXT_POINTER 1
Modified: trunk/openbios-devel/include/openbios/config.h =================================================================== --- trunk/openbios-devel/include/openbios/config.h 2009-08-02 16:59:05 UTC (rev 532) +++ trunk/openbios-devel/include/openbios/config.h 2009-08-02 18:20:53 UTC (rev 533) @@ -22,7 +22,6 @@ #include "asm/types.h"
#define PROGRAM_NAME "OpenBIOS" -#define PROGRAM_VERSION VERSION
#ifndef BOOTSTRAP
Modified: trunk/openbios-devel/kernel/bootstrap.c =================================================================== --- trunk/openbios-devel/kernel/bootstrap.c 2009-08-02 16:59:05 UTC (rev 532) +++ trunk/openbios-devel/kernel/bootstrap.c 2009-08-02 18:20:53 UTC (rev 533) @@ -27,6 +27,7 @@ #include "openbios/kernel.h" #include "dict.h" #include "cross.h" +#include "openbios-version.h"
#define MEMORY_SIZE (1024*1024) /* 1M ram for hosted system */ @@ -992,11 +993,12 @@
switch (c) { case 'V': - printk("Version " VERSION "\n"); + printk("Version " OPENBIOS_VERSION_STR "\n"); return 0; case 'h': case '?': - printk("Version " VERSION "\n" USAGE, argv[0]); + printk("Version " OPENBIOS_VERSION_STR "\n" USAGE, + argv[0]); return 0; case 'v': verbose = 1;
Modified: trunk/openbios-devel/modules/elfnote.c =================================================================== --- trunk/openbios-devel/modules/elfnote.c 2009-08-02 16:59:05 UTC (rev 532) +++ trunk/openbios-devel/modules/elfnote.c 2009-08-02 18:20:53 UTC (rev 533) @@ -4,6 +4,7 @@ #include "sys_info.h" #include "asm/io.h" #include "ipchecksum.h" +#include "openbios-version.h" #define printf printk #define debug printk
@@ -19,7 +20,7 @@
Elf_Nhdr hdr1; char name1[sizeof(ELF_NOTE_BOOT)]; - char version[sizeof(PROGRAM_VERSION)]; + char version[sizeof(OPENBIOS_VERSION_STR)];
Elf_Nhdr hdr2; char name2[sizeof(ELF_NOTE_BOOT)]; @@ -39,11 +40,11 @@
.hdr1 = { .n_namesz = sizeof(ELF_NOTE_BOOT), - .n_descsz = sizeof(PROGRAM_VERSION), + .n_descsz = sizeof(OPENBIOS_VERSION_STR), .n_type = EIN_PROGRAM_VERSION, }, .name1 = ELF_NOTE_BOOT, - .version = PROGRAM_VERSION, + .version = OPENBIOS_VERSION_STR,
.hdr2 = { .n_namesz = sizeof(ELF_NOTE_BOOT), @@ -81,7 +82,7 @@ .int EIN_PROGRAM_VERSION 1: .asciz "ELFBoot" 2: .align 4 -3: .asciz PROGRAM_VERSION +3: .asciz OPENBIOS_VERSION_STR 4:
.align 4