svn commit: r366864 - stable/12/release/arm64

Mitchell Horne mhorne at FreeBSD.org
Mon Oct 19 22:27:22 UTC 2020


Author: mhorne
Date: Mon Oct 19 22:27:21 2020
New Revision: 366864
URL: https://svnweb.freebsd.org/changeset/base/366864

Log:
  MFC r365884:
  arm64: generate ISO release images
  
  This was modified slightly to cope with how ESP partitions are generated
  in stable/12.
  
  Sponsored by:	The FreeBSD Foundation

Added:
  stable/12/release/arm64/mkisoimages.sh
     - copied, changed from r365884, head/release/arm64/mkisoimages.sh
Modified:
Directory Properties:
  stable/12/   (props changed)

Copied and modified: stable/12/release/arm64/mkisoimages.sh (from r365884, head/release/arm64/mkisoimages.sh)
==============================================================================
--- head/release/arm64/mkisoimages.sh	Fri Sep 18 14:40:13 2020	(r365884, copy source)
+++ stable/12/release/arm64/mkisoimages.sh	Mon Oct 19 22:27:21 2020	(r366864)
@@ -19,11 +19,6 @@
 # extra-bits-dir, if provided, contains additional files to be merged
 # into base-bits-dir as part of making the image.
 
-set -e
-
-scriptdir=$(dirname $(realpath $0))
-. ${scriptdir}/../../tools/boot/install-boot.sh
-
 if [ -z $ETDUMP ]; then
 	ETDUMP=etdump
 fi
@@ -39,13 +34,18 @@ fi
 if [ "$1" = "-b" ]; then
 	BASEBITSDIR="$4"
 
-	# Make an EFI system partition.
-	# The ISO file is a special case, in that it only has a maximum of
-	# 800 KB available for the boot code. So make an 800 KB ESP
-	espfilename=$(mktemp /tmp/efiboot.XXXXXX)
-	make_esp_file ${espfilename} 800 ${BASEBITSDIR}/boot/loader.efi
-
-	bootable="-o bootimage=efi;${espfilename} -o no-emul-boot -o platformid=efi"
+	# Make EFI system partition (should be done with makefs in the future)
+	dd if=/dev/zero of=efiboot.img bs=4k count=200
+	device=`mdconfig -a -t vnode -f efiboot.img`
+	newfs_msdos -F 12 -m 0xf8 /dev/$device
+	mkdir efi
+	mount -t msdosfs /dev/$device efi
+	mkdir -p efi/efi/boot
+	cp -p "$BASEBITSDIR/boot/loader.efi" efi/efi/boot/bootaa64.efi
+	umount efi
+	rmdir efi
+	mdconfig -d -u $device
+	bootable="-o bootimage=i386;efiboot.img -o no-emul-boot -o platformid=efi"
 
 	shift
 else


More information about the svn-src-all mailing list