Initialize the platform directly
This commit is contained in:
parent
b6157e0035
commit
2dc44905d9
|
@ -65,6 +65,13 @@ auxv_done:
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* initialize the platform */
|
||||||
|
#ifdef __PIC__
|
||||||
|
call platform_init
|
||||||
|
#else
|
||||||
|
call platform_init
|
||||||
|
#endif
|
||||||
|
|
||||||
/* run the userland kernel */
|
/* run the userland kernel */
|
||||||
#ifdef __ELF__
|
#ifdef __ELF__
|
||||||
pop %rcx
|
pop %rcx
|
||||||
|
|
|
@ -71,8 +71,8 @@ _start:
|
||||||
/* call the global constructors */
|
/* call the global constructors */
|
||||||
call _init
|
call _init
|
||||||
|
|
||||||
/* initialize the userland */
|
/* initialize the platform */
|
||||||
call init
|
call platform_init
|
||||||
|
|
||||||
/* run the userland kernel */
|
/* run the userland kernel */
|
||||||
call main
|
call main
|
||||||
|
|
15
tools/init.c
15
tools/init.c
|
@ -1,15 +0,0 @@
|
||||||
/* $Id$ */
|
|
||||||
/* Copyright (c) 2018 Pierre Pronchery <khorben@defora.org> */
|
|
||||||
/* This file is part of DeforaOS uKernel */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <kernel/platform.h>
|
|
||||||
|
|
||||||
|
|
||||||
/* init */
|
|
||||||
int init(void)
|
|
||||||
{
|
|
||||||
platform_init();
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -35,7 +35,7 @@ sources=start.S
|
||||||
|
|
||||||
[uKernel]
|
[uKernel]
|
||||||
type=binary
|
type=binary
|
||||||
sources=bus.c,clock.c,console.c,init.c,platform.c,main.c
|
sources=bus.c,clock.c,console.c,platform.c,main.c
|
||||||
ldflags=$(OBJDIR)crti.o $(OBJDIR)crtbegin.o $(OBJDIR)start.o $(OBJDIR)libk.a $(OBJDIR)crtend.o $(OBJDIR)crtn.o `$(CC) -print-libgcc-file-name`
|
ldflags=$(OBJDIR)crti.o $(OBJDIR)crtbegin.o $(OBJDIR)start.o $(OBJDIR)libk.a $(OBJDIR)crtend.o $(OBJDIR)crtn.o `$(CC) -print-libgcc-file-name`
|
||||||
depends=$(OBJDIR)crtbegin.o,$(OBJDIR)crtend.o,$(OBJDIR)start.o,$(OBJDIR)libk.a
|
depends=$(OBJDIR)crtbegin.o,$(OBJDIR)crtend.o,$(OBJDIR)start.o,$(OBJDIR)libk.a
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user