uefi code run

  1. install qemu and edk2-ovmf shell sudo pacman -S qemu-full sudo pacman -S edk2-ovmf --needed
  2. install uefi toolchain shell rustup target add x86_64-unknown-uefi
  3. build shell cargo build --target x86_64-unknown-uefi --example uefi_emvedded
  4. copy and mkdir ```shell cp /usr/share/edk2/x64/OVMFCODE.fd . cp /usr/share/edk2/x64/OVMFVARS.fd .

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 ```