Compare commits
3 Commits
d5dd998b53
...
fb5185cdd5
Author | SHA1 | Date |
---|---|---|
Jeremy Soller | fb5185cdd5 | |
4lDO2 | f6276291ae | |
4lDO2 | a66af97a99 |
11
mk/disk.mk
11
mk/disk.mk
|
@ -5,6 +5,17 @@ build/bootloader: bootloader/$(ARCH)/**
|
|||
build/harddrive.bin: build/filesystem.bin bootloader/$(ARCH)/**
|
||||
nasm -f bin -o $@ -D ARCH_$(ARCH) -D FILESYSTEM=$< -ibootloader/$(ARCH)/ bootloader/$(ARCH)/disk.asm
|
||||
|
||||
build/harddrive-mbr.bin: build/filesystem.bin bootloader/$(ARCH)/**
|
||||
# TODO: Determine the correct size
|
||||
nasm -f bin -o build/bootsector.bin -D ARCH_$(ARCH) -ibootloader/$(ARCH)/ bootloader/$(ARCH)/disk.asm
|
||||
dd if=/dev/zero of=$@.partial bs=1M count=384
|
||||
parted -s -a minimal $@.partial mklabel msdos
|
||||
parted -s -a minimal $@.partial mkpart primary 2048s 786431s
|
||||
dd if=build/bootsector.bin of=$@.partial bs=1 count=446 conv=notrunc
|
||||
dd if=build/bootsector.bin of=$@.partial bs=512 skip=1 seek=1 conv=notrunc
|
||||
dd if=$< of=$@.partial bs=1M seek=1 conv=notrunc
|
||||
mv $@.partial $@
|
||||
|
||||
build/livedisk.bin: build/kernel_live bootloader/$(ARCH)/**
|
||||
nasm -f bin -o $@ -D ARCH_$(ARCH) -D KERNEL=$< -ibootloader/$(ARCH)/ bootloader/$(ARCH)/disk.asm
|
||||
|
||||
|
|
10
mk/qemu.mk
10
mk/qemu.mk
|
@ -57,6 +57,16 @@ qemu_no_build: build/extra.bin
|
|||
-drive file=build/harddrive.bin,format=raw \
|
||||
-drive file=build/extra.bin,format=raw
|
||||
|
||||
qemu_mbr: build/harddrive-mbr.bin build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-drive file=build/harddrive-mbr.bin,format=raw \
|
||||
-drive file=build/extra.bin,format=raw
|
||||
|
||||
qemu_mbr_no_build: build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-drive file=build/harddrive-mbr.bin,format=raw \
|
||||
-drive file=build/extra.bin,format=raw
|
||||
|
||||
qemu_efi: build/harddrive-efi.bin build/extra.bin
|
||||
$(QEMU) $(QEMUFLAGS) \
|
||||
-bios /usr/share/OVMF/OVMF_CODE.fd \
|
||||
|
|
Reference in New Issue