Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 May 1995 12:47:13 -0400
From:      Garrett Wollman <wollman@halloran-eldar.lcs.mit.edu>
To:        Michael Enkelis <michaele@mxim.com>
Cc:        current@FreeBSD.org
Subject:   New "config" program
Message-ID:  <9505161647.AA20148@halloran-eldar.lcs.mit.edu>
In-Reply-To: <Pine.SUN.3.90a.950516090259.29942A@macs>
References:  <Pine.SUN.3.90a.950516090259.29942A@macs>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Tue, 16 May 1995 09:08:07 -0700 (PDT), Michael Enkelis <michaele@mxim.com> said:

> A side note.  What about a automatic make "depend" like SUN does?
> you could have a -n switch to disable this feature.

It would be far less obnoxious to have a shell script that handled all
aspects of kernel generation.  The only part of this that doesn't work
is the automatic generation of a new kernel from GENERIC:

#!/bin/sh

doclean=true
autoinstall=false
kernelname=''

for arg; do
	case $arg in
		-n*)	doclean=false;;
		-i*)	autoinstall=true;;
		-*)	usage;;
		*)	kernelname=$arg;;
	esac
done

if [ -z "$kernelname" ]; then
	kernelname=`hostname -s | tr a-z A-Z`
fi

cd /sys/`uname -m`/conf
if [ ! -e $kernelname ]; then
	echo "$0: kernel configuration file $kernelname does not exist"
	echo -n 'Create one from GENERIC [n]?'
	if read ans && expr $ans : 'y*' >/dev/null; then
		sed '/^#SED0/,$d' < GENERIC > $kernelname
		lsdev -c >> $kernelname
		echo '#SED0' >> $kernelname
		sed '1,/^#SED0/d' < GENERIC >> $kernelname
	else
		exit 1
	fi
fi

set -e
config -n $kernelname

cd /sys/compile/$kernelname
if $doclean; then
	make clean
fi

make depend
make all

if $autoinstall; then
	make install
fi

exit 0



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9505161647.AA20148>