m1x: Add minimal boot banner

Signed-off-by: Ian Moffett <ian@mirocom.org>
This commit is contained in:
2026-03-25 07:59:47 -04:00
parent fa7d9c0ae8
commit 8b5c04ecad
3 changed files with 23 additions and 2 deletions

View File

@@ -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:

View File

@@ -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)

View File

@@ -4,14 +4,34 @@
*/
#include <dev/cons/cons.h>
#include <lib/printf.h>
#include <hal/cpu.h>
/* 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();