summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2013-07-26 14:23:25 +0000
committermarius <marius@FreeBSD.org>2013-07-26 14:23:25 +0000
commiteb8dc560e4774a1c127fb60c9427d40b25f03b25 (patch)
tree5944e22097e2dfbab8f29c402ea5521b4a201c89
parent5063721eee2c3769df52fb9e46bf4105f23e4186 (diff)
downloadFreeBSD-src-eb8dc560e4774a1c127fb60c9427d40b25f03b25.zip
FreeBSD-src-eb8dc560e4774a1c127fb60c9427d40b25f03b25.tar.gz
- 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. MFC after: 3 days
-rw-r--r--release/sparc64/mkisoimages.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/release/sparc64/mkisoimages.sh b/release/sparc64/mkisoimages.sh
index 82cadab..9c60cb2 100644
--- a/release/sparc64/mkisoimages.sh
+++ b/release/sparc64/mkisoimages.sh
@@ -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}
OpenPOWER on IntegriCloud