summaryrefslogtreecommitdiffstats
path: root/release/scripts
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1996-01-13 23:31:46 +0000
committerphk <phk@FreeBSD.org>1996-01-13 23:31:46 +0000
commitf6fba8512c9869d7a5219a1881887598a5425d00 (patch)
tree3052c12c9ededf1e5c69b88f6b37573020756058 /release/scripts
parentea41ba61cb7c9835d0adfd25324226ed71adab6a (diff)
downloadFreeBSD-src-f6fba8512c9869d7a5219a1881887598a5425d00.zip
FreeBSD-src-f6fba8512c9869d7a5219a1881887598a5425d00.tar.gz
Shrink BOOTMFS kernel further. Make doFS.sh more intelligent.
boot4.flp should work fine as far as I can tell.
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/doFS.sh20
1 files changed, 17 insertions, 3 deletions
diff --git a/release/scripts/doFS.sh b/release/scripts/doFS.sh
index eade2d1..1c09de9 100644
--- a/release/scripts/doFS.sh
+++ b/release/scripts/doFS.sh
@@ -48,11 +48,11 @@ do
-s ${RD}/trees/bin/usr/mdec/bootfd \
/dev/r${VNDEVICE} ${FSLABEL}
- newfs -u 0 -t 0 -i ${FSINODE} -m 0 -T ${FSLABEL} /dev/r${VNDEVICE}a
+ newfs -u 0 -c 8 -t 0 -i ${FSINODE} -m 0 -T ${FSLABEL} /dev/r${VNDEVICE}a
mount /dev/${VNDEVICE}a ${MNT}
- ( cd ${FSPROTO} && find . -print | cpio -dump ${MNT} )
+ ( set -e && cd ${FSPROTO} && find . -print | cpio -dump ${MNT} )
set `df -i /mnt | tail -1`
@@ -69,11 +69,25 @@ do
echo ">>> Filesystem is ${FSSIZE} K, $4 left"
echo ">>> ${FSINODE} bytes/inode, $7 left"
+ echo ">>> `expr ${FSSIZE} \* 1024 / ${FSINODE}`"
+ if [ $4 -gt 64 ] ; then
+ echo "Reducing size"
+ FSSIZE=`expr ${FSSIZE} - $4 + 8`
+ continue
+ fi
+ if [ $7 -gt 64 ] ; then
+ echo "Increasing bytes per inode"
+ FSINODE=`expr ${FSINODE} + 8192`
+ continue
+ fi
if [ $4 -gt 8 ] ; then
- FSSIZE=`expr ${FSSIZE} - $4 + 7`
+ echo "Reducing size"
+ FSSIZE=`expr ${FSSIZE} - 4`
+ FSINODE=`expr ${FSINODE} - 1024`
continue
fi
if [ $7 -gt 32 ] ; then
+ echo "Increasing bytes per inode"
FSINODE=`expr ${FSINODE} + 8192`
continue
fi
OpenPOWER on IntegriCloud