build: move back to old-style efi fat partition generation
Need to revisit for 22.1 beta images.
This commit is contained in:
parent
dac714b313
commit
ce94c70d5b
|
@ -1127,6 +1127,15 @@ setup_efiboot()
|
|||
|
||||
EFIDIR="EFI/BOOT"
|
||||
|
||||
EFIFAT="$(dirname ${2})/boot1.efifat"
|
||||
|
||||
if [ -f ${EFIFAT} ]; then
|
||||
# XXX FreeBSD 12.1 has a predefined file
|
||||
# and we should use it for compatibility
|
||||
cp ${EFIFAT} ${1}
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ${PRODUCT_ARCH} = "amd64" ]; then
|
||||
EFIFILE=bootx64
|
||||
elif [ ${PRODUCT_ARCH} = "aarch64" ]; then
|
||||
|
|
14
build/dvd.sh
14
build/dvd.sh
|
@ -52,8 +52,18 @@ if [ -n "${PRODUCT_UEFI}" -a -z "${PRODUCT_UEFI%%*"${SELF}"*}" ]; then
|
|||
UEFIBOOT="-o bootimage=i386;${STAGEDIR}/efiboot.img"
|
||||
UEFIBOOT="${UEFIBOOT} -o no-emul-boot -o platformid=efi"
|
||||
|
||||
setup_efiboot ${STAGEDIR}/efiboot.img \
|
||||
${STAGEDIR}/work/boot/loader.efi 2048 12
|
||||
#setup_efiboot ${STAGEDIR}/efiboot.img \
|
||||
# ${STAGEDIR}/work/boot/loader.efi 2048 12
|
||||
|
||||
dd if=/dev/zero of=${STAGEDIR}/efiboot.img bs=4k count=200
|
||||
DEV=$(mdconfig -a -t vnode -f ${STAGEDIR}/efiboot.img)
|
||||
newfs_msdos -F 12 -m 0xf8 /dev/${DEV}
|
||||
mount -t msdosfs /dev/${DEV} ${STAGEDIR}/mnt
|
||||
mkdir -p ${STAGEDIR}/mnt/efi/boot
|
||||
cp ${STAGEDIR}/work/boot/loader.efi \
|
||||
${STAGEDIR}/mnt/efi/boot/bootx64.efi
|
||||
umount ${STAGEDIR}/mnt
|
||||
mdconfig -d -u ${DEV}
|
||||
fi
|
||||
|
||||
cat > ${STAGEDIR}/work/etc/fstab << EOF
|
||||
|
|
Loading…
Reference in New Issue