Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jul 2018 20:59:58 +0000 (UTC)
From:      Glen Barber <gjb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r336936 - stable/11/release/tools
Message-ID:  <201807302059.w6UKxwk5080978@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807302059.w6UKxwk5080978>