From 0ace22d6f88692883584119c64ff010f4cee6738 Mon Sep 17 00:00:00 2001 From: salmonik Date: Fri, 31 Jul 2026 03:22:20 +0200 Subject: fix(rsdos): organizational changes --- Makefile | 56 +++++++++++++++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 25 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1fc4194..1d60062 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ export BOOTLOADER=rsboot/rsboot.efi export OVMF=/usr/share/edk2/x64/OVMF.4m.fd export BOOT_EFI=$(ESP_DIR)/EFI/BOOT/BOOTX64.EFI -.PHONY: all run run-gui clean image debug release fmt +.PHONY: all run run-gui clean image debug release fmt bootloader boot-image # ---- Build --------------------------------------------------------------- @@ -75,23 +75,24 @@ debug: all -display none \ -s -S -# Boot from a raw disk image (created by tools/boot-image.sh) +# Boot from a raw disk image (delegates to boot-image.sh which builds the +# full chain if the image doesn't exist yet) run-image: all - qemu-system-x86_64 \ - -bios $(OVMF) \ - -drive file=$(IMG),format=raw,if=none,id=hd \ - -device ide-hd,drive=hd \ - -serial stdio \ - -m 256M \ - -machine q35 \ - -cpu qemu64 \ - -no-reboot \ - -display none + ./scripts/boot-image.sh rs-dos.img -# ---- Disk image ---------------------------------------------------------- +# ---- Full boot chain ----------------------------------------------------- +# Build bootloader only (rsboot submodule) +bootloader: + ./scripts/build-bootloader.sh + +# Build the full boot chain disk image (kernel + bootloader) image: all - ./tools/boot-image.sh rs-dos.img + ./scripts/build-image.sh rs-dos.img + +# Boot the full chain disk image (builds it first if needed) +boot-image: all + ./scripts/boot-image.sh rs-dos.img # ---- Utilities ----------------------------------------------------------- @@ -105,16 +106,21 @@ clean: help: @echo "rs-dos — Make targets" @echo "" - @echo " make build kernel + ESP (default)" - @echo " make release build with --release (smaller binary)" - @echo " make image create bootable USB image (rs-dos.img)" - @echo " make run QEMU serial console (no graphics)" - @echo " make run-gui QEMU with graphical window (GOP/PS2)" - @echo " make debug QEMU + GDB stub on :1234" - @echo " make clean remove build artifacts" - @echo " make fmt format Rust source" + @echo " make build kernel + ESP (default)" + @echo " make release build with --release (smaller binary)" + @echo " make bootloader build rsboot from source" + @echo " make image build full chain disk image (bootloader + kernel)" + @echo " make boot-image build + boot full chain via QEMU" + @echo " make run QEMU serial console (direct boot, no bootloader)" + @echo " make run-gui QEMU with graphical window (GOP/PS2)" + @echo " make debug QEMU + GDB stub on :1234" + @echo " make clean remove build artifacts" + @echo " make fmt format Rust source" @echo "" @echo "Scripts:" - @echo " ./tools/qemu.sh flexible QEMU launcher" - @echo " ./tools/boot-image.sh create bootable disk image" - @echo " ./tools/debug-kernel.py GDB plugin (attach after 'make debug')" + @echo " ./scripts/boot.sh quick direct boot (dev loop)" + @echo " ./scripts/boot-image.sh boot full chain (builds if needed)" + @echo " ./scripts/build-image.sh build full chain disk image" + @echo " ./scripts/build-bootloader.sh build rsboot from source" + @echo " ./scripts/qemu.sh flexible QEMU launcher" + @echo " ./scripts/debug-kernel.py GDB plugin (attach after 'make debug')" -- cgit v1.2.3