From d6800a8a9e7de41d311223696b819310f9b7b2c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 20 Aug 2022 15:33:06 +0100 Subject: [PATCH] Do not launch qemu by default. --- Development/Makefile | 4 ++-- Makefile | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Development/Makefile b/Development/Makefile index 998ae08..d8577a1 100644 --- a/Development/Makefile +++ b/Development/Makefile @@ -35,14 +35,14 @@ $(build_dir)/%.o : %.c .PHONY : clean rootfs qemu +all: $(targets2) + qemu: $(build_dir)/disk.img $(OVMF_IMG) $(QEMU) -cpu qemu64 -net none \ $(QEMU_KVM) \ -drive if=pflash,format=raw,unit=0,file=$(OVMF_IMG),readonly=on \ -drive if=ide,format=raw,file=$< -all: $(targets2) - $(build_dir)/disk.img: $(build_dir)/esp.img dd if=/dev/zero of=$@ bs=512 count=$(DISK_SIZE_SECTORS) parted $@ -s -a minimal mklabel gpt diff --git a/Makefile b/Makefile index aa17735..b2e5e73 100644 --- a/Makefile +++ b/Makefile @@ -21,18 +21,21 @@ boot_dir = $(rootfs_dir)/EFI/BOOT .PHONY : clean rootfs qemu -qemu: $(build_dir)/disk.img $(OVMF_IMG) - $(QEMU) -cpu qemu64 -net none \ - $(QEMU_KVM) \ - -drive if=pflash,format=raw,unit=0,file=$(OVMF_IMG),readonly=on \ - -drive if=ide,format=raw,file=$< - $(build_dir)/disk.img: $(build_dir)/esp.img dd if=/dev/zero of=$@ bs=512 count=$(DISK_SIZE_SECTORS) parted $@ -s -a minimal mklabel gpt parted $@ -s -a minimal mkpart EFI FAT32 2048s $(ESP_SIZE_SECTORS)s parted $@ -s -a minimal toggle 1 boot dd if=$< of=$@ bs=512 seek=2048 conv=notrunc + @echo -e "\n" + @echo "stage0-uefi disk image was created at" $@ + @echo -e "\nRun 'make qemu' to try it inside QEMU" + +qemu: $(build_dir)/disk.img $(OVMF_IMG) + $(QEMU) -cpu qemu64 -net none \ + $(QEMU_KVM) \ + -drive if=pflash,format=raw,unit=0,file=$(OVMF_IMG),readonly=on \ + -drive if=ide,format=raw,file=$< $(build_dir)/esp.img: rootfs dd if=/dev/zero of=$@ bs=512 count=$(ESP_SIZE_SECTORS)