m1x: Add minimal boot banner
Signed-off-by: Ian Moffett <ian@mirocom.org>
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user