2019-03-31 15:22:24 +02:00
|
|
|
FD_CYLINDERS = 40
|
|
|
|
FD_HEADS = 2
|
|
|
|
FD_SECTORS = 9
|
|
|
|
|
2019-04-20 23:02:35 +02:00
|
|
|
default: kernel.rom
|
2019-03-24 19:30:49 +01:00
|
|
|
|
2019-04-20 23:02:35 +02:00
|
|
|
kernel.rom: kernel/*.asm
|
|
|
|
nasm -s -o $@ -I kernel kernel/main.asm && ./fix-rom.sh $@
|
2019-03-25 09:51:37 +01:00
|
|
|
|
2019-03-31 15:22:24 +02:00
|
|
|
boot/%.bin: boot/%.asm
|
2019-03-25 09:51:37 +01:00
|
|
|
nasm -s -o $@ -I lib $<
|
|
|
|
|
2019-04-20 23:02:35 +02:00
|
|
|
fdimage.img: boot/floppy.bin kernel.rom
|
2019-03-31 15:22:24 +02:00
|
|
|
dd if=/dev/zero bs=512 count=$$(( $(FD_CYLINDERS) * $(FD_HEADS) * $(FD_SECTORS) )) of=$@
|
|
|
|
mformat -i $@ -t $(FD_CYLINDERS) -h $(FD_HEADS) -n $(FD_SECTORS) -B boot/floppy.bin ::
|
2019-04-20 23:02:35 +02:00
|
|
|
mcopy -i $@ kernel.rom ::kernel.rom
|
2019-03-24 19:30:49 +01:00
|
|
|
|
|
|
|
clean:
|
2019-04-20 23:02:35 +02:00
|
|
|
rm -f *.com *.bin *.rom *.img boot/*.bin
|