Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Dec 1997 10:13:54 -0600 (CST)
From:      Jim Bryant <jbryant@unix.tfs.net>
To:        reyesf@super.zippo.com
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Why so many steps to build new kernel?
Message-ID:  <199712051613.KAA00329@unix.tfs.net>
In-Reply-To: <199712051453.GAA24838@super.zippo.com> from Francisco Reyes at "Dec 5, 97 09:53:28 am"

next in thread | previous in thread | raw e-mail | index | archive | help
In reply:
> On Fri, 5 Dec 1997 16:13:39 +0800, Greg Lehey wrote:
> 
> >> I was wondering if there would be any problems with creating a script
> >> for some of the  steps of building a new kernel. 
> >> config kern1
> >> cd ../../kern1
> >> make depend
> >> make all
> >> make install
> 
> >Why not?  Of course, you could simplify it.
> 
> The end user (ie me) gains nothing by typing more. On my new computer
> it doesn't take all that long, but I remember on my previous one
> things would take forever. The problem with running each line
> individually is that you can not start it before you go to bed and
> come and get the results in the morning.

this is a little more extravagant than i do [i usually do a simplified
version of the folling by hand], but it will allow you to do what you
want.

don't be running anything important other than this when you go to
bed, note the reboot into the new kernel...

of course, if you end up in a boot panic, your box will be rebooting
all night, over and over again...

#!/bin/sh
##############################################################
# buildkernel
#
# usage: buildkernel CONFIGFILE
#
# build a new kernel, install it, and reboot.
# persistant logfile of build is kept in /usr/src/sys/make.out
#
##############################################################
cd /usr/src/sys/i386/conf ; \
config $1 >&/usr/src/sys/make.out ; \
cd ../../compile/$1 ; \
make depend >>& /usr/src/sys/make.out ; \
make all >>& /usr/src/sys/make.out ; \
mv /kernel /kernel.backup ; \
mv kernel \ ; \
reboot &
##############################################################

jim
-- 
All opinions expressed are mine, if you    |  "I will not be pushed, stamped,
think otherwise, then go jump into turbid  |  briefed, debriefed, indexed, or
radioactive waters and yell WAHOO !!!      |  numbered!" - #1, "The Prisoner"
------------------------------------------------------------------------------
Inet: jbryant@tfs.net    AX.25: kc5vdj@wv0t.#neks.ks.usa.noam     grid: EM28pw
voice: KC5VDJ - 6 & 2 Meters AM/FM/SSB, 70cm FM.   http://www.tfs.net/~jbryant
------------------------------------------------------------------------------
HF/6M/2M: IC-706-MkII, 2M: HTX-212, 2M: HTX-202, 70cm: HTX-404, Packet: KPC-3+



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