diff options
author | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2003-05-02 14:47:00 +0000 |
---|---|---|
committer | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2003-05-02 14:47:00 +0000 |
commit | 19f95fd78d3ab8a5b3d009b9924ec815977f84c8 (patch) | |
tree | 952c34120e62e321c07b94cc2299caadc0a4443c | |
parent | bc368b21de560c78722a71a115f2927f3e49b37d (diff) | |
download | xen-19f95fd78d3ab8a5b3d009b9924ec815977f84c8.tar.gz xen-19f95fd78d3ab8a5b3d009b9924ec815977f84c8.tar.bz2 xen-19f95fd78d3ab8a5b3d009b9924ec815977f84c8.zip |
bitkeeper revision 1.201.1.1 (3eb284e4TXxmjVJxwkJfXMR3WFr5Vw)
version.h, kernel.c, Rules.mk, Makefile:
Fancy and informative banner is displayed when Xen boots.
-rw-r--r-- | xen/Makefile | 23 | ||||
-rw-r--r-- | xen/Rules.mk | 2 | ||||
-rw-r--r-- | xen/common/kernel.c | 19 | ||||
-rw-r--r-- | xen/include/xeno/version.h | 4 |
4 files changed, 44 insertions, 4 deletions
diff --git a/xen/Makefile b/xen/Makefile index ab2bf1cb71..1f169bdfe2 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -1,6 +1,8 @@ export BASEDIR := $(shell pwd) +GENERATED_FILES := include/xeno/compile.h + include Rules.mk default: $(TARGET) @@ -19,9 +21,9 @@ clean: delete-links $(MAKE) -C net clean $(MAKE) -C drivers clean $(MAKE) -C arch/$(ARCH) clean - rm -f *.o $(TARGET)* *~ core + rm -f *.o $(TARGET)* *~ core $(GENERATED_FILES) -$(TARGET): make-links +$(TARGET): delete-unfresh-files make-links $(GENERATED_FILES) $(MAKE) -C tools $(MAKE) -C common $(MAKE) -C net @@ -35,6 +37,23 @@ make-links: delete-links delete-links: rm -f include/linux include/asm +# NB. kernel.o is blown away as the build date is stored statically within it +# Basically it's the only file dependent on compile.h -- we blow that +# dependency away for all other files in Rules.mk. +delete-unfresh-files: + rm -f $(GENERATED_FILES) common/kernel.o + +include/xeno/compile.h: + @LANG=C echo \#define XEN_COMPILE_DATE \"`date`\" > $@ + @LANG=C echo \#define XEN_COMPILE_TIME \"`date +%T`\" >> $@ + @LANG=C echo \#define XEN_COMPILE_BY \"`whoami`\" >> $@ + @LANG=C echo \#define XEN_COMPILE_DOMAIN \"`([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown])`\" >> $@ + @LANG=C echo \#define XEN_COMPILE_HOST \"`hostname`\" >> $@ + @LANG=C echo \#define XEN_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -1`\" >> $@ + +.PHONY: $(GENERATED_FILES) make-links delete-links default debug install clean delete-unfresh-files + + SUBDIRS =arch common drivers net TAGS: etags `find include/asm-$(ARCH) -name '*.h'` diff --git a/xen/Rules.mk b/xen/Rules.mk index 4e15dde1bf..73cb501d7f 100644 --- a/xen/Rules.mk +++ b/xen/Rules.mk @@ -6,6 +6,8 @@ HDRS := $(wildcard $(BASEDIR)/include/xeno/*.h) HDRS += $(wildcard $(BASEDIR)/include/scsi/*.h) HDRS += $(wildcard $(BASEDIR)/include/hypervisor-ifs/*.h) HDRS += $(wildcard $(BASEDIR)/include/asm-$(ARCH)/*.h) +# compile.h is always regenerated, but other files shouldn't be rebuilt +HDRS := $(subst $(BASEDIR)/include/xeno/compile.h,,$(HDRS)) C_SRCS := $(wildcard *.c) S_SRCS := $(wildcard *.S) diff --git a/xen/common/kernel.c b/xen/common/kernel.c index 5ee3f2e3cb..51cfd3403f 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -8,6 +8,8 @@ #include <xeno/delay.h> #include <xeno/skbuff.h> #include <xeno/interrupt.h> +#include <xeno/compile.h> +#include <xeno/version.h> #include <asm/io.h> #include <asm/msr.h> #include <asm/uaccess.h> @@ -161,6 +163,19 @@ void cmain (unsigned long magic, multiboot_info_t *mbi) /* INITIALISE SERIAL LINE (printk will work okay from here on). */ init_serial(); + /* Print the intro banner. The ASCII art is ugle since '\\' -> '\'. */ + printk(" __ __ _ ___ _ _ \n"); + printk(" \\ \\/ /___ _ __ / | / _ \\ | |__ ___| |_ __ _ \n"); + printk(" \\ // _ \\ '_ \\ | || | | | | '_ \\ / _ \\ __/ _` |\n"); + printk(" / \\ __/ | | | | || |_| | | |_) | __/ || (_| |\n"); + printk(" /_/\\_\\___|_| |_| |_(_)___/ |_.__/ \\___|\\__\\__,_|\n\n"); + printk(" http://www.cl.cam.ac.uk/xeno\n"); + printk(" University of Cambridge Computer Laboratory\n\n"); + printk(" Xen version %d.%d%s (%s@%s) (%s) %s\n\n", + XEN_VERSION, XEN_SUBVERSION, XEN_EXTRAVERSION, + XEN_COMPILE_BY, XEN_COMPILE_DOMAIN, + XEN_COMPILER, XEN_COMPILE_DATE); + memcpy(&idle0_task_union, &first_task_struct, sizeof(first_task_struct)); max_page = (mbi->mem_upper+1024) >> (PAGE_SHIFT - 10); @@ -350,7 +365,7 @@ static inline void __putstr(const char *str) void printf (const char *fmt, ...) { va_list args; - char buf[1024], *p; + char buf[128], *p; unsigned long flags; va_start(args, fmt); @@ -366,7 +381,7 @@ void printf (const char *fmt, ...) void panic(const char *fmt, ...) { va_list args; - char buf[1024]; + char buf[128]; unsigned long flags; extern void machine_restart(char *); diff --git a/xen/include/xeno/version.h b/xen/include/xeno/version.h index a0bbfa972f..33aa587b25 100644 --- a/xen/include/xeno/version.h +++ b/xen/include/xeno/version.h @@ -1,2 +1,6 @@ #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #define LINUX_VERSION_CODE KERNEL_VERSION(2,4,21) + +#define XEN_VERSION 1 +#define XEN_SUBVERSION 0 +#define XEN_EXTRAVERSION "-beta" |