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)