Subject: Re: How well does dump deal with active filesystems?
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Michael L. VanLoon -- Iowa State University <michaelv@iastate.edu>
List: current-users
Date: 03/30/1994 02:32:46
I've been using this script for some time to build kernels with.  I
thought I'd share it with anyone else who'd like an automated way of
doing kernel builds.  It might also be handy for those times when you
get into a dueling match with someone on the amount of time your
machine takes to build a kernel versus his... "was that with a make
depend, or without on that time?"  Use "time doconfig SUN_LAMP" or
something similar.  Anyway, here it is...

     ---------- >8 ---------- snip ---------- 8< ----------
#!/bin/sh

#
# By Michael VanLoon <michaelv@iastate.edu>
#
# Use at your own risk.  No warranty implied.  Mileage may vary.
#
# Usage: doconfig CONFIGFILENAME
#

if [ $# -ne 1 -o ! -f $1 ]; then
    echo "USAGE: doconfig CONFIGFILE"
    exit 1
fi

arch=`machine`
conf=$1

if [ -f /sys/arch/$arch/compile/$conf/Makefile ]; then
    echo '   *** make clean ***   '
    cd /sys/arch/$arch/compile/$conf
    make clean
else
    echo '   *** skipping make clean -- new kernel config ***   '
fi

echo '   *** config ***   '
cd /sys/arch/$arch/conf
config $conf || {
    echo '!!!*** Error in config file:' $conf '***!!!'
    exit 2
}

echo '   *** make depend ***   '
cd /sys/arch/$arch/compile/$conf
make depend || {
    echo '!!!*** Error in make depend ***!!!'
    exit 3
}

echo '   *** make ***   '
make || {
    echo '!!!*** Error in make ***!!!'
    exit 4
}

echo '   *** kernel build completed successfully ***   '
ls -lgF ./netbsd /netbsd*
size ./netbsd /netbsd*

exit 0
     ---------- >8 ---------- snip ---------- 8< ----------

-----------------------------------------------------------------------------
 Michael L. VanLoon                 Iowa State University Computation Center
    michaelv@iastate.edu                    Project Vincent Systems Staff
  Free your mind and your machine -- NetBSD free Un*x for PC/Mac/Amiga/etc.
-----------------------------------------------------------------------------



------------------------------------------------------------------------------