GRUB-bootable ISO

This commit is contained in:
Arnau Camprubí 2022-06-20 13:48:40 +02:00
pare dc4866b518
commit bb9de64c6d
S'han modificat 4 arxius amb 12 adicions i 2 eliminacions

Veure arxiu

@ -1,10 +1,11 @@
.PHONY: quark .PHONY: quark
quark: build-dir kernel quark: build-dir kernel iso
include config/.conf include config/.conf
include scripts/toolchain.mk include scripts/toolchain.mk
include scripts/kernel.mk include scripts/kernel.mk
include scripts/run.mk include scripts/run.mk
include scripts/iso.mk
.PHONY: build-dir .PHONY: build-dir
build-dir: build-dir:

3
config/grub.cfg Normal file
Veure arxiu

@ -0,0 +1,3 @@
menuentry "Quark" {
multiboot /boot/kernel.bin
}

6
scripts/iso.mk Normal file
Veure arxiu

@ -0,0 +1,6 @@
.PHONY: iso
iso:
@mkdir -p build/iso/boot/grub
@cp build/kernel.bin build/iso/boot/kernel.bin
@cp config/grub.cfg build/iso/boot/grub/grub.cfg
@grub-mkrescue -o build/quark.iso build/iso

Veure arxiu

@ -4,5 +4,5 @@ run: quark run-qemu
.PHONY: run-qemu .PHONY: run-qemu
run-qemu: run-qemu:
@echo -e $(ARROW) "Running on qemu..." @echo -e $(ARROW) "Running on qemu..."
@qemu-system-i386 -kernel $(BUILD_DIR)/kernel.bin @qemu-system-i386 $(BUILD_DIR)/quark.iso
@echo -e $(ARROW) "Finished run" @echo -e $(ARROW) "Finished run"