So, I'm in the process of trying to make what google calls a shielded image, which basically you provide the keys for the uefi boot process, and sign them image. Part one is building an image that boots with uefi instead of bios.
I started adapting a perfectly working script that built our image using standard bios, and have trimmed the thing down to this:
/usr/local/bin/qemu-system-x86_64 -display cocoa \
-name disk.raw \
-drive file=output_centos/disk.raw,if=virtio,cache=writeback,discard=ignore,format=raw \
-L ./bios \
-bios bios.bin \
-cdrom /Users/ron.jarrell/newwork/infra-centos/packer_cache/5a03ac2db9b9f47812a1c314ada462d469e94d91.iso \
-netdev user,id=user.0 \
-device virtio-net,netdev=user.0 \
-boot once=d
The tianocore uefi bios loads fine, and boots up the dvd, but when I try to do the install I get "error: can't allocate kernel" and "error: you need to load the kernel first".
Eventually this will be rolled back into packer which is where I ripped out this command for testing.
The original config also had a "-machine type=pc,accel=hvf", which caused the boot to stall with:
"QEMU Flash: Attempting flash detection at FFE00010"
and stalls there forever.