svn commit: r364939 - stable/12/release/tools
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Fri Aug 28 20:37:58 UTC 2020
Author: gonzo
Date: Fri Aug 28 20:37:57 2020
New Revision: 364939
URL: https://svnweb.freebsd.org/changeset/base/364939
Log:
MFC r363187:
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
Differential Revision: https://reviews.freebsd.org/D25655
Modified:
stable/12/release/tools/vmimage.subr
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/release/tools/vmimage.subr
==============================================================================
--- stable/12/release/tools/vmimage.subr Fri Aug 28 20:25:03 2020 (r364938)
+++ stable/12/release/tools/vmimage.subr Fri Aug 28 20:37:57 2020 (r364939)
@@ -21,12 +21,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)
mkimg -s mbr -f ${VMFORMAT} \
More information about the svn-src-all
mailing list