From owner-svn-src-user@FreeBSD.ORG Sat Jan 5 16:34:38 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 56D305B1; Sat, 5 Jan 2013 16:34:38 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id 2A4EB34D; Sat, 5 Jan 2013 16:34:37 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0MG500B00VDJCN00@smtpauth1.wiscmail.wisc.edu>; Sat, 05 Jan 2013 10:34:31 -0600 (CST) Received: from wanderer.tachypleus.net (dhcp107-17-54-205.hil-sfofhhh.sfo.wayport.net [107.17.54.205]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0MG5005JTVDEK220@smtpauth1.wiscmail.wisc.edu>; Sat, 05 Jan 2013 10:34:28 -0600 (CST) Date: Sat, 05 Jan 2013 11:34:26 -0500 From: Nathan Whitehorn Subject: Re: svn commit: r245061 - user/hrs/releng/release/sparc64 In-reply-to: <201301051623.r05GNIwK079250@svn.freebsd.org> Sender: whitehorn@wisc.edu To: Hiroki Sato Message-id: <50E85612.1020903@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=107.17.54.205 X-Spam-PmxInfo: Server=avs-13, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.1.5.162415, SenderIP=107.17.54.205 References: <201301051623.r05GNIwK079250@svn.freebsd.org> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 Cc: src-committers@freebsd.org, svn-src-user@freebsd.org X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2013 16:34:38 -0000 With these changes, if you add -B big to the makefs flags for the boot fs and find a way to do sunlabel on not-sparc64 (this is the same as geom_part_vtoc8, right?), you should be able to cross-build sparc64 media (as you can already do with all other platforms). -Nathan On 01/05/13 11:23, Hiroki Sato wrote: > Author: hrs > Date: Sat Jan 5 16:23:18 2013 > New Revision: 245061 > URL: http://svnweb.freebsd.org/changeset/base/245061 > > Log: > Remove mkisofs dependency in sparc64 boot iso image creation. A fixed > sectors/cylinder (640) and the number of head (1) are used at this moment. > > Modified: > user/hrs/releng/release/sparc64/mkisoimages.sh > > Modified: user/hrs/releng/release/sparc64/mkisoimages.sh > ============================================================================== > --- user/hrs/releng/release/sparc64/mkisoimages.sh Sat Jan 5 15:50:56 2013 (r245060) > +++ user/hrs/releng/release/sparc64/mkisoimages.sh Sat Jan 5 16:23:18 2013 (r245061) > @@ -22,51 +22,69 @@ > # resulting ISO image, base-bits-dir contains the image contents and > # extra-bits-dir, if provided, contains additional files to be merged > # into base-bits-dir as part of making the image. > - > -publisher="The FreeBSD Project. http://www.freebsd.org/" > -IMG=/tmp/bootfs > -MNT=/mnt > - > -if [ "x$1" = "x-b" ]; then > - dd if=/dev/zero of=${IMG} bs=512 count=1024 > - MD=`mdconfig -a -t vnode -f ${IMG}` > - sunlabel -w -B -b $4/boot/boot1 ${MD} auto > - newfs -O1 -o space -m 0 /dev/${MD} > - mount /dev/${MD} ${MNT} > - mkdir ${MNT}/boot > - cp $4/boot/loader ${MNT}/boot > - umount ${MNT} > - mdconfig -d -u ${MD#md} > - bootable="-B ,,,,${IMG}" > - shift > -else > - bootable="" > -fi > - > if [ $# -lt 3 ]; then > - echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]' > - rm -f ${IMG} > + echo Usage: $0 '[-b] image-label image-name base-bits-dir [extra-bits-dir]' > /dev/stderr > exit 1 > fi > > -type mkisofs 2>&1 | grep " is " >/dev/null > -if [ $? -ne 0 ]; then > - echo The cdrtools port is not installed. Trying to get it now. > - if [ -f /usr/ports/sysutils/cdrtools/Makefile ]; then > - cd /usr/ports/sysutils/cdrtools && make install BATCH=yes && make clean > - else > - if ! pkg_add -r cdrtools; then > - echo "Could not get it via pkg_add - please go install this" > - echo "from the ports collection and run this script again." > - exit 2 > - fi > - fi > -fi > - > +case $1 in > +-b) BOPT=$1; shift ;; > +esac > LABEL=$1; shift > NAME=$1; shift > > +# Create an ISO image > +publisher="The FreeBSD Project. http://www.freebsd.org/" > echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab > -mkisofs $bootable -r -J -V $LABEL -publisher "$publisher" -o $NAME $* > +makefs -t cd9660 -o rockridge -o label="$LABEL" -o publisher="$publisher" ${NAME}.tmp $* > rm $1/etc/fstab > -rm -f ${IMG} > + > +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" > +makefs -t ffs -M 512k "${BOOTFSIMG}" "${BOOTFSDIR}" > +dd if=$4/boot/boot1 of="${BOOTFSIMG}" bs=512 conv=notrunc,sync > + > +# Create a boot ISO image > +: ${CYLSIZE:=640} > +ISOSIZE=$(stat -f %z ${NAME}.tmp) > +ISOBLKS=$(( (${ISOSIZE} + 511) / 512 )) > +ISOCYLS=$(( (${ISOBLKS} + (${CYLSIZE} - 1)) / ${CYLSIZE} )) > + > +BOOTFSSIZE=$(stat -f %z "${BOOTFSIMG}") > +BOOTFSBLKS=$(( (${BOOTFSSIZE} + 511) / 512 )) > +BOOTFSCYLS=$(( (${BOOTFSBLKS} + (${CYLSIZE} - 1)) / ${CYLSIZE} )) > + > +dd if=${NAME}.tmp of=${NAME} bs=${CYLSIZE}b conv=notrunc,sync > +dd if=${BOOTFSIMG} of=${NAME} bs=${CYLSIZE}b seek=${ISOCYLS} conv=notrunc,sync > +# The number of alternative cylinders is always 2. > +dd if=/dev/zero of=${NAME} bs=${CYLSIZE}b seek=${ENDCYL} count=2 conv=notrunc,sync > +rm -rf ${NAME}.tmp ${TMPIMGDIR} > + > +# Write VTOC8 label to boot ISO image > +MD=`mdconfig -a -t vnode -f ${NAME}` > +cat < +text: FreeBSD_Install cyl ${ENDCYL} alt 2 hd 1 sec ${CYLSIZE} > +bytes/sector: 512 > +sectors/cylinder: ${CYLSIZE} > +sectors/unit: ${ENDCYL} > + > +8 partitions: > +# > +# Size is in sectors. > +# Offset is in cylinders. > +# size offset tag flag > +# ---------- ---------- ---------- ---- > + c: * 0 backup rm > + a: ${ISOBLKS} 0 usr rm > + f: ${BOOTFSBLKS} ${ISOCYLS} root rm > +EOT > +mdconfig -d -u ${MD#md} >