From 467e19b262d435f1820539bc0c85ed4fa31b9687 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Thu, 4 Sep 2014 23:38:33 +0200 Subject: Finally we have a 2 stage bootloader ! This one can load the ramdis up to 0xfffff :) --- Makefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 426ae78..f12c36f 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,10 @@ KERNEL_ENTRY=./boot/kernel_entry.o #master boot record asm -MBR=./boot/mbr.bin +MBR=./boot0/mbr.bin + +#stage 2 bootloader +STAGE2=./boot/stage2.bin #multiprocessor binary entry @@ -88,16 +91,17 @@ binfont.bin: data/binfont.src # master boot record, kernel binary and fool-font -FoolOS.img: $(MBR) kernel.bin $(FILLUP) +FoolOS.img: $(MBR) $(STAGE2) kernel.bin $(FILLUP) FoolData.img cp $(FILLUP) $@ - dd if=$(MBR) of=$@ bs=1 seek=0 conv=notrunc - dd if=kernel.bin of=$@ bs=1 seek=512 conv=notrunc + dd if=$(MBR) of=$@ bs=512 seek=0 conv=notrunc + dd if=$(STAGE2) of=$@ bs=512 seek=1 conv=notrunc + dd if=kernel.bin of=$@ bs=512 seek=10 conv=notrunc + dd if=FoolData.img of=$@ bs=512 seek=906 conv=notrunc binfont.img: binfont.bin cat $^ > $@ -FoolData.img: $(FILLUP) binfont.bin $(MP_BIN) - cp $(FILLUP) $@ +FoolData.img: binfont.bin $(MP_BIN) dd if=$(MP_BIN) of=$@ bs=512 seek=0 conv=notrunc dd if=binfont.bin of=$@ bs=512 seek=1 conv=notrunc @@ -112,7 +116,7 @@ run: all ############ cleanup ############ clean: - -rm *.bin *.img bochs.log $(KERNEL_ENTRY) $(ASMOBJECTS) $(OBJECTS) $(FILLUP) $(MBR) $(MP_BIN) bochs.out ne2k-tx.log ne2k-txdump.txt + -rm *.bin *.img bochs.log $(KERNEL_ENTRY) $(ASMOBJECTS) $(OBJECTS) $(FILLUP) $(MBR) $(MP_BIN) bochs.out ne2k-tx.log ne2k-txdump.txt $(STAGE2) ############ test stuff ############ stick: FoolOS.img -- cgit v1.2.3