From owner-freebsd-hackers Fri Dec 5 08:36:39 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA11578 for hackers-outgoing; Fri, 5 Dec 1997 08:36:39 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from argus.tfs.net (as1-p17.tfs.net [139.146.205.17]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id IAA11570 for ; Fri, 5 Dec 1997 08:36:32 -0800 (PST) (envelope-from jbryant@unix.tfs.net) Received: (from jbryant@localhost) by unix.tfs.net (8.8.8/8.8.5) id KAA00329; Fri, 5 Dec 1997 10:13:55 -0600 (CST) From: Jim Bryant Message-Id: <199712051613.KAA00329@unix.tfs.net> Subject: Re: Why so many steps to build new kernel? In-Reply-To: <199712051453.GAA24838@super.zippo.com> from Francisco Reyes at "Dec 5, 97 09:53:28 am" To: reyesf@super.zippo.com Date: Fri, 5 Dec 1997 10:13:54 -0600 (CST) Cc: freebsd-hackers@freebsd.org Reply-to: jbryant@unix.tfs.net X-Windows: R00LZ!@# MS-Winbl0wz DR00LZ!@# X-Operating-System: FreeBSD 3.0-CURRENT #0: Mon Dec 1 15:51:40 CST 1997 X-Mailer: ELM [version 2.4ME+ PL31H (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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+