diff --git a/src/m1x/Makefile b/src/m1x/Makefile index f8dc0e4..5aa7da2 100644 --- a/src/m1x/Makefile +++ b/src/m1x/Makefile @@ -10,7 +10,7 @@ all: kern arch .PHONY: kern kern: - cd kern/; make $(PASSDOWN_ARGS) + cd kern/; make $(PASSDOWN_ARGS) ARCH_TARGET=$(ARCH_TARGET) .PHONY: arch arch: diff --git a/src/m1x/kern/Makefile b/src/m1x/kern/Makefile index 03c13bb..7208058 100644 --- a/src/m1x/kern/Makefile +++ b/src/m1x/kern/Makefile @@ -19,7 +19,8 @@ CFLAGS = \ -I../include/ \ -I../foreign/flanterm/src \ -DPRINTF_DISABLE_SUPPORT_PTRDIFF_T \ - -DPRINTF_DISABLE_SUPPORT_FLOAT + -DPRINTF_DISABLE_SUPPORT_FLOAT \ + -D_M1X_ARCH="\"$(ARCH_TARGET)\"" .PHONY: all all: $(OFILES) diff --git a/src/m1x/kern/kern_init.c b/src/m1x/kern/kern_init.c index 7979181..929c98e 100644 --- a/src/m1x/kern/kern_init.c +++ b/src/m1x/kern/kern_init.c @@ -4,14 +4,34 @@ */ #include +#include #include +/* Kernel version */ +#define _M1X_VERSION "0.0.1" + +/* + * Display a boot banner on early start up + */ +static void +banner(void) +{ + printf( + "booting m1x/%s v%s...\n", + _M1X_ARCH, + _M1X_VERSION + ); +} + void kmain(void) { /* Initialize the console */ cons_init(); + /* Print the boot banner */ + banner(); + /* Initialize the BSP */ hal_cpu_init();