ia64/xen-unstable

changeset 417:a1275253dbd1

bitkeeper revision 1.201.1.1 (3eb284e4TXxmjVJxwkJfXMR3WFr5Vw)

version.h, kernel.c, Rules.mk, Makefile:
Fancy and informative banner is displayed when Xen boots.
author kaf24@scramble.cl.cam.ac.uk
date Fri May 02 14:47:00 2003 +0000 (2003-05-02)
parents 3156338887d4
children cbe60e831a04
files xen/Makefile xen/Rules.mk xen/common/kernel.c xen/include/xeno/version.h
line diff
     1.1 --- a/xen/Makefile	Thu May 01 17:48:28 2003 +0000
     1.2 +++ b/xen/Makefile	Fri May 02 14:47:00 2003 +0000
     1.3 @@ -1,6 +1,8 @@
     1.4  
     1.5  export BASEDIR := $(shell pwd)
     1.6  
     1.7 +GENERATED_FILES := include/xeno/compile.h
     1.8 +
     1.9  include Rules.mk
    1.10  
    1.11  default: $(TARGET)
    1.12 @@ -19,9 +21,9 @@ clean: delete-links
    1.13  	$(MAKE) -C net clean
    1.14  	$(MAKE) -C drivers clean
    1.15  	$(MAKE) -C arch/$(ARCH) clean
    1.16 -	rm -f *.o $(TARGET)* *~ core
    1.17 +	rm -f *.o $(TARGET)* *~ core $(GENERATED_FILES)
    1.18  
    1.19 -$(TARGET): make-links
    1.20 +$(TARGET): delete-unfresh-files make-links $(GENERATED_FILES)
    1.21  	$(MAKE) -C tools
    1.22  	$(MAKE) -C common
    1.23  	$(MAKE) -C net
    1.24 @@ -35,6 +37,23 @@ make-links: delete-links
    1.25  delete-links:
    1.26  	rm -f include/linux include/asm
    1.27  
    1.28 +# NB. kernel.o is blown away as the build date is stored statically within it
    1.29 +#     Basically it's the only file dependent on compile.h -- we blow that
    1.30 +#     dependency away for all other files in Rules.mk.
    1.31 +delete-unfresh-files:
    1.32 +	rm -f $(GENERATED_FILES) common/kernel.o
    1.33 +
    1.34 +include/xeno/compile.h:
    1.35 +	@LANG=C echo \#define XEN_COMPILE_DATE \"`date`\" > $@
    1.36 +	@LANG=C echo \#define XEN_COMPILE_TIME \"`date +%T`\" >> $@
    1.37 +	@LANG=C echo \#define XEN_COMPILE_BY \"`whoami`\" >> $@
    1.38 +	@LANG=C echo \#define XEN_COMPILE_DOMAIN \"`([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown])`\" >> $@
    1.39 +	@LANG=C echo \#define XEN_COMPILE_HOST \"`hostname`\" >> $@
    1.40 +	@LANG=C echo \#define XEN_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -1`\" >> $@
    1.41 +
    1.42 +.PHONY: $(GENERATED_FILES) make-links delete-links default debug install clean delete-unfresh-files
    1.43 +
    1.44 +
    1.45  SUBDIRS         =arch common drivers net 
    1.46  TAGS: 
    1.47  	etags `find include/asm-$(ARCH) -name '*.h'`
     2.1 --- a/xen/Rules.mk	Thu May 01 17:48:28 2003 +0000
     2.2 +++ b/xen/Rules.mk	Fri May 02 14:47:00 2003 +0000
     2.3 @@ -6,6 +6,8 @@ HDRS    := $(wildcard $(BASEDIR)/include
     2.4  HDRS    += $(wildcard $(BASEDIR)/include/scsi/*.h)
     2.5  HDRS    += $(wildcard $(BASEDIR)/include/hypervisor-ifs/*.h)
     2.6  HDRS    += $(wildcard $(BASEDIR)/include/asm-$(ARCH)/*.h)
     2.7 +# compile.h is always regenerated, but other files shouldn't be rebuilt
     2.8 +HDRS    := $(subst $(BASEDIR)/include/xeno/compile.h,,$(HDRS))
     2.9  
    2.10  C_SRCS  := $(wildcard *.c)
    2.11  S_SRCS  := $(wildcard *.S)
     3.1 --- a/xen/common/kernel.c	Thu May 01 17:48:28 2003 +0000
     3.2 +++ b/xen/common/kernel.c	Fri May 02 14:47:00 2003 +0000
     3.3 @@ -8,6 +8,8 @@
     3.4  #include <xeno/delay.h>
     3.5  #include <xeno/skbuff.h>
     3.6  #include <xeno/interrupt.h>
     3.7 +#include <xeno/compile.h>
     3.8 +#include <xeno/version.h>
     3.9  #include <asm/io.h>
    3.10  #include <asm/msr.h>
    3.11  #include <asm/uaccess.h>
    3.12 @@ -161,6 +163,19 @@ void cmain (unsigned long magic, multibo
    3.13      /* INITIALISE SERIAL LINE (printk will work okay from here on). */
    3.14      init_serial();
    3.15  
    3.16 +    /* Print the intro banner. The ASCII art is ugle since '\\' -> '\'. */
    3.17 +    printk(" __  __            _   ___    _          _        \n");
    3.18 +    printk(" \\ \\/ /___ _ __   / | / _ \\  | |__   ___| |_ __ _ \n");
    3.19 +    printk("  \\  // _ \\ '_ \\  | || | | | | '_ \\ / _ \\ __/ _` |\n");
    3.20 +    printk("  /  \\  __/ | | | | || |_| | | |_) |  __/ || (_| |\n");
    3.21 +    printk(" /_/\\_\\___|_| |_| |_(_)___/  |_.__/ \\___|\\__\\__,_|\n\n");
    3.22 +    printk(" http://www.cl.cam.ac.uk/xeno\n");
    3.23 +    printk(" University of Cambridge Computer Laboratory\n\n");
    3.24 +    printk(" Xen version %d.%d%s (%s@%s) (%s) %s\n\n",
    3.25 +           XEN_VERSION, XEN_SUBVERSION, XEN_EXTRAVERSION,
    3.26 +           XEN_COMPILE_BY, XEN_COMPILE_DOMAIN,
    3.27 +           XEN_COMPILER, XEN_COMPILE_DATE);
    3.28 +
    3.29      memcpy(&idle0_task_union, &first_task_struct, sizeof(first_task_struct));
    3.30  
    3.31      max_page = (mbi->mem_upper+1024) >> (PAGE_SHIFT - 10);
    3.32 @@ -350,7 +365,7 @@ static inline void __putstr(const char *
    3.33  void printf (const char *fmt, ...)
    3.34  {
    3.35      va_list args;
    3.36 -    char buf[1024], *p;
    3.37 +    char buf[128], *p;
    3.38      unsigned long flags;
    3.39  
    3.40      va_start(args, fmt);
    3.41 @@ -366,7 +381,7 @@ void printf (const char *fmt, ...)
    3.42  void panic(const char *fmt, ...)
    3.43  {
    3.44      va_list args;
    3.45 -    char buf[1024];
    3.46 +    char buf[128];
    3.47      unsigned long flags;
    3.48      extern void machine_restart(char *);
    3.49      
     4.1 --- a/xen/include/xeno/version.h	Thu May 01 17:48:28 2003 +0000
     4.2 +++ b/xen/include/xeno/version.h	Fri May 02 14:47:00 2003 +0000
     4.3 @@ -1,2 +1,6 @@
     4.4  #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
     4.5  #define LINUX_VERSION_CODE KERNEL_VERSION(2,4,21)
     4.6 +
     4.7 +#define XEN_VERSION      1
     4.8 +#define XEN_SUBVERSION   0
     4.9 +#define XEN_EXTRAVERSION "-beta"