diff --git a/Makefile.target b/Makefile.target index 8362294..f94f450 100644 --- a/Makefile.target +++ b/Makefile.target @@ -38,8 +38,6 @@ AS_FLAGS+= -g 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)/forth/version.fs: $(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: diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..d3827e7 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.0 diff --git a/arch/ppc/briq/init.c b/arch/ppc/briq/init.c index 0fbaaa1..5328f51 100644 --- a/arch/ppc/briq/init.c +++ b/arch/ppc/briq/init.c @@ -61,7 +61,8 @@ entry( void ) 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(); diff --git a/arch/ppc/mol/init.c b/arch/ppc/mol/init.c index 94b6e99..f115271 100644 --- a/arch/ppc/mol/init.c +++ b/arch/ppc/mol/init.c @@ -57,7 +57,8 @@ entry( void ) 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(); diff --git a/arch/ppc/pearpc/init.c b/arch/ppc/pearpc/init.c index 06c83e5..d9a5f42 100644 --- a/arch/ppc/pearpc/init.c +++ b/arch/ppc/pearpc/init.c @@ -64,7 +64,8 @@ entry( void ) 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(); diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c index 33633e6..0865d1b 100644 --- a/arch/ppc/qemu/init.c +++ b/arch/ppc/qemu/init.c @@ -461,7 +461,8 @@ arch_of_init( void ) 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'; diff --git a/arch/unix/unix.c b/arch/unix/unix.c index a2038b6..d434444 100644 --- a/arch/unix/unix.c +++ b/arch/unix/unix.c @@ -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 @@ int main(int argc, char *argv[]) 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; diff --git a/config/scripts/switch-arch b/config/scripts/switch-arch index 0a63af0..dfb9a6c 100755 --- a/config/scripts/switch-arch +++ b/config/scripts/switch-arch @@ -93,6 +93,8 @@ if test "x$HOSTARCH" = "x"; then 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 @@ for RULES_ARCH in $*; do 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 diff --git a/include/mconfig.h b/include/mconfig.h index 2edfc4e..0a4decf 100644 --- a/include/mconfig.h +++ b/include/mconfig.h @@ -41,9 +41,6 @@ /* Define to 1 if you have the 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 diff --git a/include/openbios/config.h b/include/openbios/config.h index f9fd66e..917ddd6 100644 --- a/include/openbios/config.h +++ b/include/openbios/config.h @@ -22,7 +22,6 @@ #include "asm/types.h" #define PROGRAM_NAME "OpenBIOS" -#define PROGRAM_VERSION VERSION #ifndef BOOTSTRAP diff --git a/kernel/bootstrap.c b/kernel/bootstrap.c index b3840cc..48bb413 100644 --- a/kernel/bootstrap.c +++ b/kernel/bootstrap.c @@ -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 @@ int main(int argc, char *argv[]) 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; diff --git a/modules/elfnote.c b/modules/elfnote.c index 01fdf74..f46c881 100644 --- a/modules/elfnote.c +++ b/modules/elfnote.c @@ -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 @@ struct elf_image_note { 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 @@ const struct elf_image_note elf_image_notes .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 @@ const char *program_version = elf_image_notes.version; .int EIN_PROGRAM_VERSION 1: .asciz "ELFBoot" 2: .align 4 -3: .asciz PROGRAM_VERSION +3: .asciz OPENBIOS_VERSION_STR 4: .align 4