kernel: strip down to dumb binary, expect bootloader to load into sane location and setup stack

This commit is contained in:
Nero 2019-03-27 23:07:04 +00:00
parent 6bfb0dd21e
commit a46114f6bd
2 changed files with 9 additions and 49 deletions

View file

@ -1,15 +1,15 @@
default: kernel.com
kernel.com: kernel/*.asm
boot.bin: kernel/*.asm
nasm -s -o $@ -I kernel kernel/main.asm
vbr.bin: boot/vbr.asm
nasm -s -o $@ -I lib $<
fdimage.img: vbr.bin kernel.com
fdimage.img: vbr.bin boot.bin
dd if=/dev/zero bs=512 count=720 of=$@
mformat -i $@ -f 360 -B vbr.bin -v "BOOT2B" ::
mcopy -i fdimage.img kernel.com ::boot.bin
mformat -i $@ -f 360 -B vbr.bin ::
mcopy -i fdimage.img boot.bin ::boot.bin
clean:
rm -f *.com *.bin *.img