shell
sudo pacman -S qemu-full
sudo pacman -S edk2-ovmf --needed
shell
rustup target add x86_64-unknown-uefi
shell
cargo build --target x86_64-unknown-uefi --example uefi_emvedded
mkdir -p esp/efi/boot
cp target/x8664-unknown-uefi/debug/examples/uefiemvedded.efi esp/efi/boot/bootx64.efi
5. run qemu
shell
qemu-system-x8664 -nodefaults \
-device virtio-rng-pci \
-machine q35 \
-smp 4 \
-m 256M -vga std \
--enable-kvm \
-device isa-debug-exit,iobase=0xf4,iosize=0x04 \
-drive if=pflash,format=raw,readonly=on,file=OVMFCODE.fd \
-drive if=pflash,format=raw,readonly=on,file=OVMF_VARS.fd \
-drive format=raw,file=fat:rw:esp
```