Enable EFI system partition on amd64 and i386 VM images

EFI support is a hard requirement for generating Hyper-V Gen2 VM images.

Reviewed by:	gjb
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D25655
This commit is contained in:
Oleksandr Tymoshenko 2020-07-14 18:02:24 +00:00
parent 50050b2f41
commit 083c262899

View File

@ -24,12 +24,17 @@ write_partition_layout() {
case "${TARGET}:${TARGET_ARCH}" in
amd64:amd64 | i386:i386)
# Create an ESP
espfilename=$(mktemp /tmp/efiboot.XXXXXX)
make_esp_file ${espfilename} ${fat32min} ${BOOTFILES}/efi/loader_lua/loader_lua.efi
mkimg -s gpt -f ${VMFORMAT} \
-b ${BOOTFILES}/i386/pmbr/pmbr \
-p freebsd-boot/bootfs:=${BOOTFILES}/i386/gptboot/gptboot \
-p efi:=${espfilename} \
${SWAPOPT} \
-p freebsd-ufs/rootfs:=${VMBASE} \
-o ${VMIMAGE}
rm ${espfilename}
;;
arm64:aarch64)
# Create an ESP