aboutsummaryrefslogtreecommitdiff
path: root/release/amd64/mkisoimages.sh
diff options
context:
space:
mode:
Diffstat (limited to 'release/amd64/mkisoimages.sh')
-rw-r--r--release/amd64/mkisoimages.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/release/amd64/mkisoimages.sh b/release/amd64/mkisoimages.sh
index e4093d74e4c9..2b89d89cda25 100644
--- a/release/amd64/mkisoimages.sh
+++ b/release/amd64/mkisoimages.sh
@@ -26,6 +26,20 @@
if [ "x$1" = "x-b" ]; then
# This is highly x86-centric and will be used directly below.
bootable="-o bootimage=i386;$4/boot/cdboot -o no-emul-boot"
+
+ # Make EFI system partition (should be done with makefs in the future)
+ dd if=/dev/zero of=efiboot.img bs=4k count=100
+ 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 ${4}/boot/loader.efi efi/efi/boot/bootx64.efi
+ umount efi
+ rmdir efi
+ mdconfig -d -u $device
+ bootable="-o bootimage=i386;efiboot.img -o no-emul-boot $bootable"
+
shift
else
bootable=""
@@ -43,3 +57,4 @@ publisher="The FreeBSD Project. http://www.FreeBSD.org/"
echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab
makefs -t cd9660 $bootable -o rockridge -o label=$LABEL -o publisher="$publisher" $NAME $*
rm $1/etc/fstab
+rm -f efiboot.img