aboutsummaryrefslogtreecommitdiff
path: root/release/tools
diff options
context:
space:
mode:
authorOleksandr Tymoshenko <gonzo@FreeBSD.org>2020-07-14 18:02:24 +0000
committerOleksandr Tymoshenko <gonzo@FreeBSD.org>2020-07-14 18:02:24 +0000
commit083c26289906f8c9628a5ad0abb4a6cf7cc14f1f (patch)
treee378ca4cb2fb23277ffe56fb41c31ba53befb59e /release/tools
parent50050b2f41417051d04ef95b176d41988a9d5b9d (diff)
downloadsrc-083c26289906f8c9628a5ad0abb4a6cf7cc14f1f.tar.gz
src-083c26289906f8c9628a5ad0abb4a6cf7cc14f1f.zip
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
Notes
Notes: svn path=/head/; revision=363187
Diffstat (limited to 'release/tools')
-rw-r--r--release/tools/vmimage.subr5
1 files changed, 5 insertions, 0 deletions
diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index 6e29139402be..2e32a732cc1a 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -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