The branch main has been updated by imp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=62a7dae44dfb38b6ef8b547a57dfb8b65dbc3943

commit 62a7dae44dfb38b6ef8b547a57dfb8b65dbc3943
Author:     Warner Losh <i...@freebsd.org>
AuthorDate: 2022-09-23 15:48:26 +0000
Commit:     Warner Losh <i...@freebsd.org>
CommitDate: 2022-09-23 15:53:55 +0000

    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
---
 release/tools/arm.subr | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/release/tools/arm.subr b/release/tools/arm.subr
index d07dbb41b48b..9e0704d7c95d 100644
--- a/release/tools/arm.subr
+++ b/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" \

Reply via email to