mirror of
https://github.com/tailix/loadwarka.git
synced 2024-11-11 13:50:54 -05:00
Add main module
This commit is contained in:
parent
08af13d2f7
commit
f7de862e65
3 changed files with 11 additions and 1 deletions
3
build.sh
3
build.sh
|
@ -10,13 +10,14 @@ STAGE1_LDFLAGS='--defsym=program_start=0x7c00'
|
|||
STAGE2_LDFLAGS='--defsym=program_start=0x7e00'
|
||||
|
||||
STAGE1_OBJS="$SRC/common.o $SRC/stage1.o"
|
||||
STAGE2_OBJS="$SRC/common.o $SRC/stage2.o"
|
||||
STAGE2_OBJS="$SRC/common.o $SRC/stage2.o $SRC/main.o"
|
||||
|
||||
./clean.sh
|
||||
|
||||
${CROSS}gcc -c $SRC/common.S -o $SRC/common.o
|
||||
${CROSS}gcc -c $SRC/stage1.S -o $SRC/stage1.o
|
||||
${CROSS}gcc -c $SRC/stage2.S -o $SRC/stage2.o
|
||||
${CROSS}gcc -c $SRC/main.c -o $SRC/main.o
|
||||
|
||||
${CROSS}ld -T$SRC/linker.ld -o $SRC/stage1.bin $STAGE1_LDFLAGS $STAGE1_OBJS
|
||||
${CROSS}ld -T$SRC/linker.ld -o $SRC/stage2.bin $STAGE2_LDFLAGS $STAGE2_OBJS
|
||||
|
|
7
src/x86/main.c
Normal file
7
src/x86/main.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
int main()
|
||||
{
|
||||
}
|
|
@ -21,4 +21,6 @@ _start:
|
|||
mov $newline, %si
|
||||
call print_str
|
||||
|
||||
call main
|
||||
|
||||
ljmp $0, $hang
|
||||
|
|
Loading…
Reference in a new issue