Changeset ba22dcb in mainline


Ignore:
Timestamp:
2005-11-08T14:26:48Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c6861f4
Parents:
6e259d5
Message:

include svn revision and build time in the kernel

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r6e259d5 rba22dcb  
    4747#
    4848
    49 DEFS = -DARCH=$(ARCH) -DRELEASE=\"$(RELEASE)\" -DNAME=\"$(NAME)\"
     49DEFS = -DARCH=$(ARCH) -DRELEASE=\"$(RELEASE)\" "-DNAME=\"$(NAME)\""
    5050CFLAGS = -fno-builtin -fomit-frame-pointer -Werror-implicit-function-declaration -Wmissing-prototypes -Werror -O3 -nostdlib -nostdinc -Igeneric/include/
    5151LFLAGS = -M
    52 AFLAGS =
     52AFLAGS =
     53
     54ifdef TAG
     55        DEFS += "-DTAG=\"$(TAG)\""
     56endif
    5357
    5458## Setup kernel configuration
  • build.ia32

    r6e259d5 rba22dcb  
    5353done
    5454
    55 make all "ARCH=$ARCH" $ARGS
     55TAG="`svnversion . 2> /dev/null`"
     56TIMESTAMP="`date "+%Y-%m-%d %H:%M:%S" 2> /dev/null`"
     57if [ -z "$TAG" ]; then
     58        TAG="built on $TIMESTAMP"
     59else
     60        TAG="revision $TAG (built on $TIMESTAMP)"
     61fi
     62
     63make all "ARCH=$ARCH" "TAG=$TAG" $ARGS
  • generic/src/main/main.c

    r6e259d5 rba22dcb  
    6262#include <typedefs.h>
    6363
    64 char *project = "SPARTAN kernel release " RELEASE " (" NAME ")";
     64char *project = "SPARTAN kernel";
     65#ifdef TAG
     66        char *revision = RELEASE " (" NAME ") " TAG;
     67#else
     68        char *revision = RELEASE " (" NAME ")";
     69#endif
    6570char *copyright = "Copyright (C) 2001-2005 Jakub Jermar\nCopyright (C) 2005 HelenOS project";
    6671
     
    154159        arch_post_mm_init();
    155160
    156         printf("%s\n%s\n", project, copyright);
     161        printf("%s %s\n%s\n", project, revision, copyright);
    157162        printf("%P: hardcoded_ktext_size=%dK, hardcoded_kdata_size=%dK\n",
    158163                config.base, hardcoded_ktext_size/1024, hardcoded_kdata_size/1024);
Note: See TracChangeset for help on using the changeset viewer.