release: Use standard mount points for arm MBR boot images

Traditionally, we've used /boot/msdos for the MBR mount point for the SD
images that we produced. For GPT and bsdinstall, we've used
/boot/efi. Migrate to using /boot/efi for MBR as well and add a
/boot/msdos -> /boot/efi symlink for compatibility (which may disappear
before 14.0, but will remain on the stable branches).

When we first created the arm images, there was no EFI booting and the
FAT partion on an MBR image was used to hold the firmware, uboot.bin,
SoC config files and ubldr.  When we transitioned to uboot with EFI, we
put the loader files in the same partition. Later we standardized on
/boot/efi at about the same time we added GPT support to the RE produced
images. We left the MRB case as /boot/msdos for legacy reasons and since
it wasn't always EFI. Later, we dropped support of non-EFI booting on
the RE produced images, so the duality of /boot/msdos diminished even
more. Since so little secondary meaning remains, putting it all in
/boot/efi standardizes the location and reflects the RE images
better as using efi-only booting.

In addition, always label the msdosfs partion 'efi'. While a small
misnomer on some systems that store other files in the ESP, it was
requested in review for more consistency for similar reasons to the
mountpoint rename. There was no way to have an 'alias' or 'second label'
here, so this breaks compatibility. Since the images are self-contained,
this was judged to be an acceptable change.

Sponsored by:		Netflix
Reviewed by:		manu, allanjude, emaste, gjb
Differential Revision:	https://reviews.freebsd.org/D36635
main
Warner Losh 1 week ago
parent 9ba957e40a
commit 62a7dae44d
  1. 7
      release/tools/arm.subr

@ -78,7 +78,7 @@ arm_create_disk() {
if [ "${PART_SCHEME}" = "MBR" ]; then
chroot ${CHROOTDIR} gpart add -t '!12' -a 512k -s ${FAT_SIZE} ${mddev}
chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev}
chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1
chroot ${CHROOTDIR} newfs_msdos -L efi -F ${FAT_TYPE} /dev/${mddev}s1
chroot ${CHROOTDIR} gpart add -t freebsd ${mddev}
chroot ${CHROOTDIR} gpart create -s bsd ${mddev}s2
chroot ${CHROOTDIR} gpart add -t freebsd-ufs -a 64k -b 64k ${mddev}s2
@ -189,7 +189,8 @@ arm_install_base() {
DESTDIR=${DESTDIR} KERNCONF=${KERNEL} \
${CONF_FILES} installworld installkernel distribution
chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/efi
chroot ${CHROOTDIR} mkdir -p ${DESTDIR}/boot/msdos
# Compatibility symlink to /boot/msdos for 13.1 and earlier
chroot ${CHROOTDIR} ln -s ${DESTDIR}/boot/efi ${DESTDIR}/boot/msdos
arm_create_user
arm_setup_usb_otg
@ -209,7 +210,7 @@ arm_install_base() {
if [ "${PART_SCHEME}" = "MBR" ]; then
echo "/dev/ufs/rootfs / ufs rw 1 1" \
>> ${CHROOTDIR}/${DESTDIR}/etc/fstab
echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \
echo "/dev/msdosfs/EFI /boot/efi msdosfs rw,noatime 0 0" \
>> ${CHROOTDIR}/${DESTDIR}/etc/fstab
fi
echo "tmpfs /tmp tmpfs rw,mode=1777 0 0" \

Loading…
Cancel
Save