Simplify the userland kernel as well
This commit is contained in:
parent
58e0cad31a
commit
5b900d2c7c
|
@ -67,6 +67,9 @@ _start:
|
||||||
call __stack_chk_setup
|
call __stack_chk_setup
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* call the global constructors */
|
||||||
|
call _init
|
||||||
|
|
||||||
/* run the userland kernel */
|
/* run the userland kernel */
|
||||||
push $0x0
|
push $0x0
|
||||||
push $0x0
|
push $0x0
|
||||||
|
|
21
tools/init.c
Normal file
21
tools/init.c
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/* $Id$ */
|
||||||
|
/* Copyright (c) 2018 Pierre Pronchery <khorben@defora.org> */
|
||||||
|
/* This file is part of DeforaOS uKernel */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include "drivers/bus.h"
|
||||||
|
#include "drivers/console.h"
|
||||||
|
|
||||||
|
#define TOOLS_BUS "tty"
|
||||||
|
#define TOOLS_CONSOLE "stdio"
|
||||||
|
|
||||||
|
|
||||||
|
int _init(void)
|
||||||
|
{
|
||||||
|
ukBus * bus;
|
||||||
|
|
||||||
|
bus = bus_init(TOOLS_BUS);
|
||||||
|
console_init(bus, TOOLS_CONSOLE);
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -2,10 +2,4 @@
|
||||||
/* Copyright (c) 2018 Pierre Pronchery <khorben@defora.org> */
|
/* Copyright (c) 2018 Pierre Pronchery <khorben@defora.org> */
|
||||||
/* This file is part of DeforaOS uKernel */
|
/* This file is part of DeforaOS uKernel */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define KERNEL_BUS "tty"
|
|
||||||
#define KERNEL_CONSOLE "stdio"
|
|
||||||
|
|
||||||
|
|
||||||
#include "../src/kernel/main.c"
|
#include "../src/kernel/main.c"
|
||||||
|
|
|
@ -14,7 +14,7 @@ sources=start.S
|
||||||
|
|
||||||
[uKernel]
|
[uKernel]
|
||||||
type=binary
|
type=binary
|
||||||
sources=bus.c,console.c,main.c
|
sources=bus.c,console.c,init.c,main.c
|
||||||
ldflags=$(OBJDIR)start.o $(OBJDIR)../src/lib/libuKernel.a `$(CC) -print-libgcc-file-name`
|
ldflags=$(OBJDIR)start.o $(OBJDIR)../src/lib/libuKernel.a `$(CC) -print-libgcc-file-name`
|
||||||
depends=$(OBJDIR)start.o,$(OBJDIR)../src/lib/libuKernel.a
|
depends=$(OBJDIR)start.o,$(OBJDIR)../src/lib/libuKernel.a
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user