Changeset 940cac0 in mainline


Ignore:
Timestamp:
2005-12-07T17:17:20Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4acac843
Parents:
54257ba
Message:

better way of placing revision, timestamp and arch in banner

Files:
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r54257ba r940cac0  
    5050AFLAGS =
    5151
    52 ifdef TAG
    53         DEFS += "-DTAG=\"$(TAG)\""
     52ifdef REVISION
     53        DEFS += "-DREVISION=\"$(REVISION)\""
     54endif
     55
     56ifdef TIMESTAMP
     57        DEFS += "-DTIMESTAMP=\"$(TIMESTAMP)\""
    5458endif
    5559
     
    139143GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES)))
    140144
    141 .PHONY: all clean config links depend boot
     145.PHONY: all build clean config links depend boot
    142146
    143147all:
    144148        tools/config.py default
    145         $(MAKE) -C . real_all
    146 
    147 real_all: kernel.bin boot disasm
     149        $(MAKE) -C . build
     150
     151build: kernel.bin boot disasm
    148152
    149153config:
  • generic/include/debug.h

    r54257ba r940cac0  
    4848#endif
    4949
     50#define STRING(arg) STRING_ARG(arg)
     51#define STRING_ARG(arg) #arg
     52
    5053#endif
  • generic/src/main/main.c

    r54257ba r940cac0  
    3131#include <print.h>
    3232#include <panic.h>
     33#include <debug.h>
    3334#include <config.h>
    3435#include <time/clock.h>
     
    6465
    6566char *project = "SPARTAN kernel";
    66 char *release = RELEASE " (" NAME ")";
    67 #ifdef TAG
    68         char *rr_delimiter = "\n";
    69         char *revision = TAG;
     67char *copyright = "Copyright (C) 2001-2005 HelenOS project";
     68char *release = RELEASE;
     69char *name = NAME;
     70char *arch = STRING(ARCH);
     71
     72#ifdef REVISION
     73        char *revision = ", revision " REVISION;
    7074#else
    71         char *rr_delimiter = "";
    7275        char *revision = "";
    7376#endif
    74 char *copyright = "Copyright (C) 2001-2005 HelenOS project";
     77
     78#ifdef TIMESTAMP
     79        char *timestamp = " on " TIMESTAMP;
     80#else
     81        char *timestamp = "";
     82#endif
     83
    7584
    7685config_t config;
     
    173182        arch_post_mm_init();
    174183
    175         printf("%s, release %s%s%s\n%s\n", project, release, rr_delimiter, revision, copyright);
     184        printf("%s, release %s (%s)%s\nBuild%s for %s\n%s\n", project, release, name, revision, timestamp, arch, copyright);
    176185        printf("%P: hardcoded_ktext_size=%dK, hardcoded_kdata_size=%dK\n",
    177186                config.base, hardcoded_ktext_size/1024, hardcoded_kdata_size/1024);
  • kernel.config

    r54257ba r940cac0  
    99@ "sparc64" Sun UltraSPARC
    1010! ARCH (choice)
    11 
    12 % SHELLCMD TAG tools/buildtag $ARCH
    1311
    1412# IA32 Compiler
  • tools/config.py

    r54257ba r940cac0  
    66import os
    77import re
     8import commands
    89
    910INPUT = 'kernel.config'
     
    377378            # Set title of the dialog window
    378379            dlg.set_title(line[2:].strip())
    379        
     380
     381    outf.write('\n')
     382    outf.write('REVISION=%s\n' % commands.getoutput('svnversion . 2> /dev/null'))
     383    outf.write('TIMESTAMP=%s\n' % commands.getoutput('date "+%Y-%m-%d %H:%M:%S"'))
    380384    outf.close()
    381385    f.close()
Note: See TracChangeset for help on using the changeset viewer.