svn commit: r363187 - head/release/tools
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Tue Jul 14 18:02:25 UTC 2020
Author: gonzo
Date: Tue Jul 14 18:02:24 2020
New Revision: 363187
URL: https://svnweb.freebsd.org/changeset/base/363187
Log:
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
Modified:
head/release/tools/vmimage.subr
Modified: head/release/tools/vmimage.subr
==============================================================================
--- head/release/tools/vmimage.subr Tue Jul 14 17:46:40 2020 (r363186)
+++ head/release/tools/vmimage.subr Tue Jul 14 18:02:24 2020 (r363187)
@@ -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
More information about the svn-src-head
mailing list