Skip to content

Commit

Permalink
extra: Run efi image in qemu
Browse files Browse the repository at this point in the history
Origin: #43
Signed-off-by: Philippe Coval <[email protected]>
Change-Id: Iaef4ac7df261c5c3c940912bcb4cc8e416cd7efa
  • Loading branch information
rzr committed Apr 4, 2024
1 parent 65805b4 commit 8710663
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions extra/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,27 @@ 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 \
-device e1000,netdev=net0 \
-netdev user,id=net0,hostfwd=tcp::${port}-:22

run: ${architecture}/run

cleanall:
rm -rf *.img *.img.gz

0 comments on commit 8710663

Please sign in to comment.