From 8b5c04ecadbb2e8fc26befbf9d09777191f14e01 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 25 Mar 2026 07:59:47 -0400 Subject: [PATCH] m1x: Add minimal boot banner Signed-off-by: Ian Moffett --- src/m1x/Makefile | 2 +- src/m1x/kern/Makefile | 3 ++- src/m1x/kern/kern_init.c | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) 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();