Author: gjb
Date: Mon Jul 30 20:59:58 2018
New Revision: 336936
URL: https://svnweb.freebsd.org/changeset/base/336936

Log:
  As part of r336741, BOOTFILES needs special handling when
  cross building on stable/11, where the path should be:
  
   /usr/obj/TARGET.TARGET_ARCH/[...]
  
  The change in r336741, which was a direct commit to stable/11
  was not complete enough to evaluate where BOOTFILES should be.
  
  This, as was r336741, is a direct commit to stable/11.
  
  Tested with:  stable/11 BANANAPI build
  Sponsored by: The FreeBSD Foundation

Modified:
  stable/11/release/tools/arm.subr

Modified: stable/11/release/tools/arm.subr
==============================================================================
--- stable/11/release/tools/arm.subr    Mon Jul 30 20:36:51 2018        
(r336935)
+++ stable/11/release/tools/arm.subr    Mon Jul 30 20:59:58 2018        
(r336936)
@@ -142,14 +142,13 @@ arm_install_boot() {
                ${FATMOUNT}/ubldr.bin
        fi
 
-       # Ensure the correct .OBJDIR exists.
-       chroot ${CHROOTDIR} env TARGET=${EMBEDDED_TARGET} \
-               TARGET_ARCH=${EMBEDDED_TARGET_ARCH} WITH_UNIFIED_OBJDIR=yes \
-               make -C ${WORLDDIR}/stand obj
-       BOOTFILES="$(chroot ${CHROOTDIR} \
-               env TARGET=${EMBEDDED_TARGET} 
TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \
-               WITH_UNIFIED_OBJDIR=yes \
-               make -C ${WORLDDIR}/stand -V .OBJDIR)"
+       # Ensure the correct .OBJDIR is used for BOOTFILES.
+       _OBJDIR="$(chroot ${CHROOTDIR} make -C /usr/src -V .OBJDIR)"
+       if [ -d 
"/${CHROOTDIR}/${_OBJDIR%%/usr/src}/${EMBEDDED_TARGET}.${EMBEDDED_TARGET_ARCH}/usr/src/stand"
 ]; then
+               
BOOTFILES=/${_OBJDIR%%/usr/src}/${EMBEDDED_TARGET}.${EMBEDDED_TARGET_ARCH}/usr/src/stand
+       else
+               BOOTFILES=/${_OBJDIR}/stand
+       fi
        BOOTFILES="$(chroot ${CHROOTDIR} realpath ${BOOTFILES})"
 
        chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/EFI/BOOT
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to