uart.o\
vectors.o\
vm.o\
+ \
+ vers.o\
# Cross-compiling (e.g., on Mac OS X)
# TOOLPREFIX = i386-jos-elf
vectors.S: vectors.pl
perl vectors.pl > vectors.S
+vers.h: .git/HEAD
+ echo "#define XV6_BUILD_STRING \"$$(git describe --dirty --always)\"" > $@
+
+vers.c : vers.h
+
ULIB = ulib.o usys.o printf.o umalloc.o
_%: %.o $(ULIB)
static void mpmain(void) __attribute__((noreturn));
extern char end[]; // first address after kernel loaded from ELF file
+// If we're not linked with a greeting message routine, don't try.
+void __attribute__((weak))
+announce_startup(void) { ; }
+
// Bootstrap processor starts running C code here.
// Allocate a real stack and switch to it, first
// doing some setup required for memory allocator to work.
binit(); // buffer cache
fileinit(); // file table
ideinit(); // disk
+ announce_startup();
if(!ismp)
timerinit(); // uniprocessor timer
startothers(); // start other processors
--- /dev/null
+#include "types.h"
+#include "defs.h"
+#include "vers.h"
+
+void
+announce_startup(void)
+{
+ cprintf("The better part of valor is discretion,\n");
+ cprintf("in the which better part I have sav'd my life\n");
+ cprintf(" -- Henry IV, Part 1, Act 5, Scene 4\n");
+
+ cprintf("xv6 build " XV6_BUILD_STRING " initialized...\n");
+}