summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-03-20 23:46:22 +0000
committerru <ru@FreeBSD.org>2003-03-20 23:46:22 +0000
commit18bbff56056cc6fd3c51a8a21a50f257c2ef1fcd (patch)
tree616fa25a38df3d7a5594d6717c82c0beb996c3b4
parenta3529ba22b1d7664e49d97daa5966b528b494381 (diff)
downloadFreeBSD-src-18bbff56056cc6fd3c51a8a21a50f257c2ef1fcd.zip
FreeBSD-src-18bbff56056cc6fd3c51a8a21a50f257c2ef1fcd.tar.gz
Pass the target machine architecture down to disklabel(8).
Do it so that systems without the -m option in disklabel(8), e.g. 5.0-RELEASE, can still build current snapshots. While here, drop the -s option from doFS.sh; we have not been using the .size files for a long time.
-rw-r--r--release/Makefile8
-rw-r--r--release/ia64/doFS.sh11
-rw-r--r--release/scripts/doFS.sh25
3 files changed, 13 insertions, 31 deletions
diff --git a/release/Makefile b/release/Makefile
index 659644e..7a09f5a 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -252,8 +252,10 @@ LOCALDIR= /usr/local/bin
# ia64 is different enough that we want our own doFS.sh.
.if ${TARGET_ARCH} == "ia64"
DOFS_SH= ${.CURDIR}/ia64/doFS.sh
+.elif ${TARGET} != ${MACHINE}
+DOFS_SH= ${.CURDIR}/scripts/doFS.sh ${TARGET}
.else
-DOFS_SH= ${.CURDIR}/scripts/doFS.sh
+DOFS_SH= ${.CURDIR}/scripts/doFS.sh ""
.endif
.if ${TARGET_ARCH} == "sparc64"
@@ -726,7 +728,7 @@ release.9:
${.CURDIR}/${TARGET}/drivers-small.conf \
${RD}/trees/base/boot/kernel ${RD}/mfsfd/modules
.endif
- sh -e ${DOFS_SH} -s mfsroot ${RD} ${MNT} \
+ sh -e ${DOFS_SH} mfsroot ${RD} ${MNT} \
${MFSSIZE} ${RD}/mfsfd ${MFSINODE} ${MFSLABEL}
@gzip -9vc mfsroot > mfsroot.gz
@sh -e ${DOFS_SH} ${RD}/floppies/mfsroot-small.flp \
@@ -753,7 +755,7 @@ release.9:
*.dsc >> ${RD}/floppies/DRIVERS.TXT; \
fi
.endif
- sh -e ${DOFS_SH} -s mfsroot ${RD} ${MNT} \
+ sh -e ${DOFS_SH} mfsroot ${RD} ${MNT} \
${MFSSIZE} ${RD}/mfsfd ${MFSINODE} ${MFSLABEL}
@gzip -9vc mfsroot > mfsroot.gz
@mkdir -p ${RD}/mfsroot
diff --git a/release/ia64/doFS.sh b/release/ia64/doFS.sh
index 84b7e68..f75b724 100644
--- a/release/ia64/doFS.sh
+++ b/release/ia64/doFS.sh
@@ -7,12 +7,6 @@
set -e
-if [ "$1" = "-s" ]; then
- opt_s="-s"; shift
-else
- opt_s=""
-fi
-
FSIMG=$1; shift
RD=$1 ; shift
MNT=$1 ; shift
@@ -26,7 +20,7 @@ FSLABEL=$1 ; shift
if [ x$FSLABEL != "xefi" ]; then
DOFS_SH=`dirname $0`/../scripts/`basename $0`
echo Tranferring control to $DOFS_SH...
- exec sh $DOFS_SH $opt_s $FSIMG $RD $MNT $FSSIZE $FSPROTO $FSINODE $FSLABEL
+ exec sh $DOFS_SH ia64 $FSIMG $RD $MNT $FSSIZE $FSPROTO $FSINODE $FSLABEL
fi
export BLOCKSIZE=512
@@ -80,6 +74,3 @@ mdconfig -d -u ${MDDEVICE} 2>/dev/null || true
echo "*** Filesystem is ${FSSIZE} K, $4 left"
echo "*** ${FSINODE} bytes/inode, $7 left"
-if [ "${opt_s}" ]; then
- echo ${FSSIZE} > ${FSIMG}.size
-fi
diff --git a/release/scripts/doFS.sh b/release/scripts/doFS.sh
index ed861ff..8d870fb 100644
--- a/release/scripts/doFS.sh
+++ b/release/scripts/doFS.sh
@@ -7,12 +7,7 @@ set -ex
export BLOCKSIZE=512
-if [ "$1" = "-s" ]; then
- do_size="yes"; shift
-else
- do_size=""
-fi
-
+MACHINE=${1:+"-m $1"}; shift
FSIMG=$1; shift
RD=$1 ; shift
MNT=$1 ; shift
@@ -27,14 +22,14 @@ FSLABEL=$1 ; shift
# disklabel fails otherwise.
#
if [ -f "${RD}/trees/base/boot/boot" ]; then
- BOOT1="-B -b ${RD}/trees/base/boot/boot"
+ BOOT="-B -b ${RD}/trees/base/boot/boot"
elif [ -f "${RD}/trees/base/boot/boot1" ]; then
- BOOT1="-B -b ${RD}/trees/base/boot/boot1"
+ BOOT="-B -b ${RD}/trees/base/boot/boot1"
if [ -f "${RD}/trees/base/boot/boot2" ]; then
- BOOT2="-s ${RD}/trees/base/boot/boot2"
+ BOOT="${BOOT} -s ${RD}/trees/base/boot/boot2"
fi
else
- BOOT1="-r"
+ BOOT="-r"
fi
deadlock=20
@@ -63,7 +58,7 @@ dofs_vn () {
dd of=${FSIMG} if=/dev/zero count=${FSSIZE} bs=1k 2>/dev/null
vnconfig -s labels -c /dev/r${VNDEVICE} ${FSIMG}
- disklabel -w ${BOOT1} ${BOOT2} ${VNDEVICE} ${FSLABEL}
+ disklabel -w ${BOOT} ${VNDEVICE} ${FSLABEL}
newfs -i ${FSINODE} -o space -m 0 /dev/r${VNDEVICE}c
mount /dev/${VNDEVICE}c ${MNT}
@@ -83,9 +78,6 @@ dofs_vn () {
echo "*** Filesystem is ${FSSIZE} K, $4 left"
echo "*** ${FSINODE} bytes/inode, $7 left"
- if [ "${do_size}" ]; then
- echo ${FSSIZE} > ${FSIMG}.size
- fi
break;
done
@@ -110,7 +102,7 @@ dofs_md () {
echo "No /dev/$MDDEVICE" 1>&2
exit 1
fi
- disklabel -w ${BOOT1} ${BOOT2} ${MDDEVICE} ${FSLABEL}
+ disklabel ${MACHINE} -w ${BOOT} ${MDDEVICE} ${FSLABEL}
newfs -i ${FSINODE} -o space -m 0 /dev/${MDDEVICE}c
mount /dev/${MDDEVICE}c ${MNT}
@@ -130,9 +122,6 @@ dofs_md () {
echo "*** Filesystem is ${FSSIZE} K, $4 left"
echo "*** ${FSINODE} bytes/inode, $7 left"
- if [ "${do_size}" ]; then
- echo ${FSSIZE} > ${FSIMG}.size
- fi
break;
done
}
OpenPOWER on IntegriCloud