Use the platform framework for tools as well
This commit is contained in:
parent
64e9615a93
commit
b27bab4ff2
15
tools/init.c
15
tools/init.c
|
@ -4,23 +4,12 @@
|
|||
|
||||
|
||||
|
||||
#include <stddef.h>
|
||||
#include "drivers/bus.h"
|
||||
#include "drivers/clock.h"
|
||||
#include "drivers/console.h"
|
||||
|
||||
#define TOOLS_BUS "tty"
|
||||
#define TOOLS_CLOCK "sys"
|
||||
#define TOOLS_CONSOLE "stdio"
|
||||
#include <kernel/platform.h>
|
||||
|
||||
|
||||
/* init */
|
||||
int init(void)
|
||||
{
|
||||
ukBus * bus;
|
||||
|
||||
bus = bus_init(NULL, TOOLS_BUS);
|
||||
console_init(bus, TOOLS_CONSOLE);
|
||||
clock_init(NULL, TOOLS_CLOCK);
|
||||
platform_init();
|
||||
return 0;
|
||||
}
|
||||
|
|
4
tools/platform.conf
Normal file
4
tools/platform.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
#tools
|
||||
tty bus
|
||||
stdio console at tty bus
|
||||
sys clock
|
|
@ -1,4 +1,4 @@
|
|||
targets=crtbegin.o,crtend.o,crti.o,crtn.o,start.o,uKernel
|
||||
targets=crtbegin.o,crtend.o,crti.o,crtn.o,platform.c,start.o,uKernel
|
||||
cppflags_force=-nostdinc -isystem ../include -I../src
|
||||
cflags_force=`../tools/platform.sh -V NATIVE_CFLAGS -C "$$ARCH"`
|
||||
cflags=-W -Wall -g -O2
|
||||
|
@ -24,13 +24,18 @@ sources=crti.S
|
|||
type=object
|
||||
sources=crtn.S
|
||||
|
||||
[platform.c]
|
||||
type=script
|
||||
script=../src/kernel/platform.sh
|
||||
depends=platform.conf,../src/kernel/platform.sh
|
||||
|
||||
[start.o]
|
||||
type=object
|
||||
sources=start.S
|
||||
|
||||
[uKernel]
|
||||
type=binary
|
||||
sources=bus.c,clock.c,console.c,init.c,main.c
|
||||
sources=bus.c,clock.c,console.c,init.c,platform.c,main.c
|
||||
ldflags=$(OBJDIR)crti.o $(OBJDIR)crtbegin.o $(OBJDIR)start.o $(OBJDIR)../src/lib/libuKernel.a $(OBJDIR)../src/drivers/clock/sys.o $(OBJDIR)../src/drivers/console/stdio.o $(OBJDIR)crtend.o $(OBJDIR)crtn.o `$(CC) -print-libgcc-file-name`
|
||||
depends=$(OBJDIR)crtbegin.o,$(OBJDIR)crtend.o,$(OBJDIR)start.o,$(OBJDIR)../src/lib/libuKernel.a,$(OBJDIR)../src/drivers/clock/sys.o,$(OBJDIR)../src/drivers/console/stdio.o
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user