Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Aug 2020 20:37:57 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r364939 - stable/12/release/tools
Message-ID:  <202008282037.07SKbvvx013549@repo.freebsd.org>

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



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