安裝qemu虛擬機ios
dnf install qemu
ui
編譯 Ovfmcode
build -p OvmfPkg/OvmfPkgX64.dsc
生成ovfm固件虛擬機
qemu啓動並使用該固件:io
qemu-system-x86_64 -bios Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd
編譯
編譯簡單樣例程序程序
build -p MdeModulePkg/MdeModulePkg.dsc
im
建立硬盤img
dd if=/dev/zero of=hd.img bs=1K count=64K
mkdir mounthd
sudo mount hd.img -o uid=$UID mounthd/
mkdir -p mounthd/efi/boot
cp Build/MdeModule/RELEASE_GCC5/X64/HelloWorld.efi mouthd/efi/boot/bootx64.efi
di
啓動
qemu-system-x86_64 -bios Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd -hda hd.img