From owner-svn-src-stable@FreeBSD.ORG  Tue Jul 30 10:37:12 2013
Return-Path: <owner-svn-src-stable@FreeBSD.ORG>
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTP id 380F1EE5;
 Tue, 30 Jul 2013 10:37:12 +0000 (UTC)
 (envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx1.freebsd.org (Postfix) with ESMTPS id 0C05A25B7;
 Tue, 30 Jul 2013 10:37:12 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UAbB6L076774;
 Tue, 30 Jul 2013 10:37:11 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UAbBN8076773;
 Tue, 30 Jul 2013 10:37:11 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201307301037.r6UAbBN8076773@svn.freebsd.org>
From: Marius Strobl <marius@FreeBSD.org>
Date: Tue, 30 Jul 2013 10:37:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject: svn commit: r253799 - stable/9/release/sparc64
X-SVN-Group: stable-9
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
 <svn-src-stable.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-stable>
List-Post: <mailto:svn-src-stable@freebsd.org>
List-Help: <mailto:svn-src-stable-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-stable>,
 <mailto:svn-src-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Jul 2013 10:37:12 -0000

Author: marius
Date: Tue Jul 30 10:37:11 2013
New Revision: 253799
URL: http://svnweb.freebsd.org/changeset/base/253799

Log:
  MFC: 253676
  
  - Once we have shifted arguments thrice, base-bits-dir is $1 rather than $4.
    Introduce $BASEBITSDIR for clarity and in order to avoid repeating this
    mistake in the future. Fixing this ensures that we pick up the newly built
    boot code and loader native to the target, which is especially relevant
    when cross-building release images.
  - It is pointless to specify an endianess for ISO 9660 images so strip that.
  
  Approved by:	re (kib)

Modified:
  stable/9/release/sparc64/mkisoimages.sh
Directory Properties:
  stable/9/release/   (props changed)

Modified: stable/9/release/sparc64/mkisoimages.sh
==============================================================================
--- stable/9/release/sparc64/mkisoimages.sh	Tue Jul 30 10:24:09 2013	(r253798)
+++ stable/9/release/sparc64/mkisoimages.sh	Tue Jul 30 10:37:11 2013	(r253799)
@@ -32,26 +32,28 @@ case $1 in
 esac
 LABEL=`echo $1 | tr '[:lower:]' '[:upper:]'`; shift
 NAME=$1; shift
+BASEBITSDIR=$1
 
 # Create an ISO image
 publisher="The FreeBSD Project.  http://www.FreeBSD.org/"
-echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab
-makefs -t cd9660 -B be -o rockridge -o label="$LABEL" -o publisher="$publisher" ${NAME}.tmp $*
-rm $1/etc/fstab
+echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "${BASEBITSDIR}/etc/fstab"
+makefs -t cd9660 -o rockridge -o label="$LABEL" -o publisher="$publisher" ${NAME}.tmp $*
+rm "${BASEBITSDIR}/etc/fstab"
 
 if [ "x$BOPT" != "x-b" ]; then
 	mv ${NAME}.tmp ${NAME}
 	exit 0
 fi
+
 TMPIMGDIR=`mktemp -d /tmp/bootfs.XXXXXXXX` || exit 1
 BOOTFSDIR="${TMPIMGDIR}/bootfs"
 BOOTFSIMG="${TMPIMGDIR}/bootfs.img"
 
 # Create a boot filesystem
 mkdir -p "${BOOTFSDIR}/boot"
-cp $4/boot/loader "${BOOTFSDIR}/boot"
+cp -p "${BASEBITSDIR}/boot/loader" "${BOOTFSDIR}/boot"
 makefs -t ffs -B be -M 512k "${BOOTFSIMG}" "${BOOTFSDIR}"
-dd if=$4/boot/boot1 of="${BOOTFSIMG}" bs=512 conv=notrunc,sync
+dd if="${BASEBITSDIR}/boot/boot1" of="${BOOTFSIMG}" bs=512 conv=notrunc,sync
 
 # Create a boot ISO image
 : ${CYLSIZE:=640}