Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jul 2020 18:02:25 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r363187 - head/release/tools
Message-ID:  <202007141802.06EI2PJH003009@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007141802.06EI2PJH003009>