Clean up build process

This commit is contained in:
2024-12-12 07:14:44 -08:00
parent 3fc40ce6be
commit 379d8dbcdc
4 changed files with 72 additions and 41 deletions

View File

@ -1,11 +1,27 @@
BUILD_DIR=./build
export QEMU?=qemu-system-x86_64
.PHONY: bios
bios: $(BUILD_DIR)/bios.bin $(BUILD_DIR)/bios.img
.PHONY: clean
all: $(BUILD_DIR)/bootloader.bin
include make/bios
include make/bootloader
clean:
rm -drf $(BUILD_DIR)
rm -drf $(BUILD_DIR)
cd bootloader; cargo clean
qemu: $(BUILD_DIR)/bios.img
$(QEMU) \
-d cpu_reset \
-no-reboot \
-smp 4 -m 2048 \
-chardev stdio,id=debug,signal=off,mux=on \
-serial chardev:debug \
-mon chardev=debug \
-machine q35 \
-net none \
-enable-kvm \
-cpu host \
-drive file="$<",format=raw
include make/bios