summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile56
1 files changed, 31 insertions, 25 deletions
diff --git a/Makefile b/Makefile
index 1fc4194..1d60062 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ export BOOTLOADER=rsboot/rsboot.efi
11export OVMF=/usr/share/edk2/x64/OVMF.4m.fd 11export OVMF=/usr/share/edk2/x64/OVMF.4m.fd
12export BOOT_EFI=$(ESP_DIR)/EFI/BOOT/BOOTX64.EFI 12export BOOT_EFI=$(ESP_DIR)/EFI/BOOT/BOOTX64.EFI
13 13
14.PHONY: all run run-gui clean image debug release fmt 14.PHONY: all run run-gui clean image debug release fmt bootloader boot-image
15 15
16# ---- Build --------------------------------------------------------------- 16# ---- Build ---------------------------------------------------------------
17 17
@@ -75,23 +75,24 @@ debug: all
75 -display none \ 75 -display none \
76 -s -S 76 -s -S
77 77
78# Boot from a raw disk image (created by tools/boot-image.sh) 78# Boot from a raw disk image (delegates to boot-image.sh which builds the
79# full chain if the image doesn't exist yet)
79run-image: all 80run-image: all
80 qemu-system-x86_64 \ 81 ./scripts/boot-image.sh rs-dos.img
81 -bios $(OVMF) \
82 -drive file=$(IMG),format=raw,if=none,id=hd \
83 -device ide-hd,drive=hd \
84 -serial stdio \
85 -m 256M \
86 -machine q35 \
87 -cpu qemu64 \
88 -no-reboot \
89 -display none
90 82
91# ---- Disk image ---------------------------------------------------------- 83# ---- Full boot chain -----------------------------------------------------
92 84
85# Build bootloader only (rsboot submodule)
86bootloader:
87 ./scripts/build-bootloader.sh
88
89# Build the full boot chain disk image (kernel + bootloader)
93image: all 90image: all
94 ./tools/boot-image.sh rs-dos.img 91 ./scripts/build-image.sh rs-dos.img
92
93# Boot the full chain disk image (builds it first if needed)
94boot-image: all
95 ./scripts/boot-image.sh rs-dos.img
95 96
96# ---- Utilities ----------------------------------------------------------- 97# ---- Utilities -----------------------------------------------------------
97 98
@@ -105,16 +106,21 @@ clean:
105help: 106help:
106 @echo "rs-dos — Make targets" 107 @echo "rs-dos — Make targets"
107 @echo "" 108 @echo ""
108 @echo " make build kernel + ESP (default)" 109 @echo " make build kernel + ESP (default)"
109 @echo " make release build with --release (smaller binary)" 110 @echo " make release build with --release (smaller binary)"
110 @echo " make image create bootable USB image (rs-dos.img)" 111 @echo " make bootloader build rsboot from source"
111 @echo " make run QEMU serial console (no graphics)" 112 @echo " make image build full chain disk image (bootloader + kernel)"
112 @echo " make run-gui QEMU with graphical window (GOP/PS2)" 113 @echo " make boot-image build + boot full chain via QEMU"
113 @echo " make debug QEMU + GDB stub on :1234" 114 @echo " make run QEMU serial console (direct boot, no bootloader)"
114 @echo " make clean remove build artifacts" 115 @echo " make run-gui QEMU with graphical window (GOP/PS2)"
115 @echo " make fmt format Rust source" 116 @echo " make debug QEMU + GDB stub on :1234"
117 @echo " make clean remove build artifacts"
118 @echo " make fmt format Rust source"
116 @echo "" 119 @echo ""
117 @echo "Scripts:" 120 @echo "Scripts:"
118 @echo " ./tools/qemu.sh flexible QEMU launcher" 121 @echo " ./scripts/boot.sh quick direct boot (dev loop)"
119 @echo " ./tools/boot-image.sh create bootable disk image" 122 @echo " ./scripts/boot-image.sh boot full chain (builds if needed)"
120 @echo " ./tools/debug-kernel.py GDB plugin (attach after 'make debug')" 123 @echo " ./scripts/build-image.sh build full chain disk image"
124 @echo " ./scripts/build-bootloader.sh build rsboot from source"
125 @echo " ./scripts/qemu.sh flexible QEMU launcher"
126 @echo " ./scripts/debug-kernel.py GDB plugin (attach after 'make debug')"