From 8d651ab8b97eedee67a6e3a532cbd9c4d321eefe Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Wed, 28 Feb 2024 23:13:11 +0100 Subject: [PATCH] extra: Run efi image in qemu Origin: https://github.com/adoptware/pinball/pull/43 Signed-off-by: Philippe Coval Change-Id: Iaef4ac7df261c5c3c940912bcb4cc8e416cd7efa --- extra/Makefile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/extra/Makefile b/extra/Makefile index 04fbf42..64f1ead 100644 --- a/extra/Makefile +++ b/extra/Makefile @@ -82,12 +82,26 @@ rpi_4: gzip -f -9 $< stat -c '%y: %n' $@ +ram_size?=512 port?=55522 -run: pinball-i386-generic.img - kvm -m 512 \ +i386/run: pinball-i386-generic.img + kvm \ + -m ${ram_size} \ -device e1000,netdev=net0 \ -netdev user,id=net0,hostfwd=tcp::${port}-:22 \ -machine pc $< +bootfile?=/usr/share/OVMF/OVMF_CODE_4M.fd +amd64/run: pinball-amd64-generic.img ${bootfile} + qemu-system-x86_64 \ + -enable-kvm \ + -m ${ram_size} \ + -cpu host \ + -drive file=${bootfile},if=pflash,format=raw,unit=0,readonly=on \ + -drive file=$<,format=raw \ + -netdev user,id=net0,hostfwd=tcp::${port}-:22 + +run: ${architecture}/run + cleanall: rm -rf *.img *.img.gz