feat: creation du piggy.o

This commit is contained in:
Nicolas Hordé 2019-01-01 19:31:26 +01:00
parent edaae1d4c2
commit fda7fdc711
3 changed files with 14 additions and 4 deletions

View File

@ -13,7 +13,7 @@ COMP=gzip -5
all: system.sys all: system.sys
system.sys: system.bin voffset.h zoffset.h realmode/setup.bin system.sys: piggy.o voffset.h zoffset.h realmode/setup.bin
tools/build setup.bin system.bin zoffset.h system.sys tools/build setup.bin system.bin zoffset.h system.sys
sync sync
@ -25,6 +25,9 @@ zoffset.h: system
togit: clean indent togit: clean indent
piggy.o: piggy.S
$(ASM) $@ $^
system: systemc.o system.o ../lib/libs.o system: systemc.o system.o ../lib/libs.o
$(LINK) -T system.ld system.o ../lib/libs.o $(LINK) -T system.ld system.o ../lib/libs.o
@ -34,7 +37,8 @@ system.bin: system
system.bin.gz: system.bin system.bin.gz: system.bin
cat $^|$(COMP) > $@ cat $^|$(COMP) > $@
piggy.s: system.bin.gz piggy.S: system.bin.gz
../tools/mkpiggy $^ > $@
realmode/setup.bin: realmode/setup.bin:
make -C realmode make -C realmode
@ -48,6 +52,7 @@ system.o: system.S
clean: clean:
make -C realmode clean make -C realmode clean
$(REMOVE) system $(REMOVE) system
$(REMOVE) piggy.S
$(REMOVE) *.o $(REMOVE) *.o
$(REMOVE) *.gz $(REMOVE) *.gz
$(REMOVE) *.h $(REMOVE) *.h

View File

@ -9,8 +9,8 @@
.code32 .code32
.section ".text" .section ".text"
.global startup_32 .global start
startup_32: start:
ljmp $SEL_KERNEL_CODE,$suite ljmp $SEL_KERNEL_CODE,$suite
suite: suite:
movw $SEL_KERNEL_DATA, %ax movw $SEL_KERNEL_DATA, %ax

View File

@ -17,4 +17,9 @@ SECTIONS
.bss ALIGN(16): { .bss ALIGN(16): {
*(.bss) *(.bss)
} }
_end = .;
} }