add kernel stub to distfiles
this way i can test if the bootloader works as intended
This commit is contained in:
parent
398395371b
commit
c51dca9949
14
Makefile
14
Makefile
@ -1,7 +1,7 @@
|
|||||||
FLOPPY = 360
|
FLOPPY = 360
|
||||||
|
|
||||||
PROGRAMS = hello.com
|
PROGRAMS = hello.com
|
||||||
DISTFILES = $(PROGRAMS)
|
DISTFILES = $(PROGRAMS) rdos86.bs
|
||||||
ROMS =
|
ROMS =
|
||||||
|
|
||||||
QEMU_ARCH = $(shell uname -m)
|
QEMU_ARCH = $(shell uname -m)
|
||||||
@ -47,12 +47,6 @@ vga11.com: cp437.bin
|
|||||||
# Bootloaders, first sector on partition
|
# Bootloaders, first sector on partition
|
||||||
%.bs: %.asm
|
%.bs: %.asm
|
||||||
$(NASM) $(NASM_ARGS) -DBASE=0x7C00 -DBOOT -o $@ $<
|
$(NASM) $(NASM_ARGS) -DBASE=0x7C00 -DBOOT -o $@ $<
|
||||||
: check boot signature
|
|
||||||
test "$$(echo $$(xxd -p -l 2 -s 510 $@))" == 55aa
|
|
||||||
|
|
||||||
# Network bootstrap protocol as used for PXE
|
|
||||||
%.0: %.asm
|
|
||||||
$(NASM) $(NASM_ARGS) -DBASE=0x7C00 -DNBP -o $@ $<
|
|
||||||
|
|
||||||
# BIOS option roms
|
# BIOS option roms
|
||||||
%.rom: rom/%.asm utils/fix-rom
|
%.rom: rom/%.asm utils/fix-rom
|
||||||
@ -65,9 +59,11 @@ fdimage.img: fat.bs $(DISTFILES)
|
|||||||
hdimage.img: mbr.bs fdimage.img
|
hdimage.img: mbr.bs fdimage.img
|
||||||
cat mbr.bs fdimage.img >$@
|
cat mbr.bs fdimage.img >$@
|
||||||
|
|
||||||
part.img: fat32.bs
|
part.img: fat32.bs $(DISTFILES)
|
||||||
dd if=/dev/zero bs=1024 count=33k of=$@
|
dd if=/dev/zero bs=1024 count=33k of=$@
|
||||||
mformat -F -i part.img -B fat32.bs ::
|
mformat -i $@ -F -B fat32.bs ::
|
||||||
|
mmd -i $@ ::rdos
|
||||||
|
mcopy -i $@ $(DISTFILES) ::rdos
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.com *.bs *.0 *.lst *.img *.bin *.rom
|
rm -f *.com *.bs *.0 *.lst *.img *.bin *.rom
|
||||||
|
14
rdos86.asm
Normal file
14
rdos86.asm
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
org 0x7C00
|
||||||
|
|
||||||
|
main: mov si, msg
|
||||||
|
mov ah, 0x0e
|
||||||
|
xor bx, bx
|
||||||
|
loop: lodsb
|
||||||
|
test al, al
|
||||||
|
jz end
|
||||||
|
int 0x10
|
||||||
|
jmp loop
|
||||||
|
end: hlt
|
||||||
|
jmp end
|
||||||
|
|
||||||
|
msg: db "rdos kernel stub", 0x0A, 0x0D, 0
|
Loading…
Reference in New Issue
Block a user