Subject: Re: compiling a new kernel?
To: None <current-users@NetBSD.ORG>
From: der Mouse <mouse@Holo.Rodents.Montreal.QC.CA>
List: current-users
Date: 08/18/1996 07:28:38
>> How do I go about compiling a new kernel?
> The easiest way is to (assuming you're on an i386):
> cd /sys/arch/i386/conf
> cp GENERICAHA FOO
> vi FOO (or whatever you wanna call it... Just edit
> this file to make it match your machine)
> /usr/sbin/config FOO
> cd ../compile/FOO
> make depend && make
Also, of course, assuming the AHA kernel is the right one for you.
And what explorer didn't say is how to tweak this for other
architectures; fortunately, about the only thing that needs doing is to
replace the i386 in the first cd command, and use the correct kernel
config file (usually GENERIC - the i386 is rather the oddball in that
it has multiple GENERIC kernels - try "ls /sys/arch/*/conf/*GENERIC*"
if you want to see. :-)
> If it builds,
> mv /netbsd /onetbsd
> mv netbsd /netbsd
> and reboot.
And don't make the mistake I did, of doing "cp netbsd /netbsd+ && mv
/netbsd /netbsd- && mv /netbsd+ /netbsd && reboot". If the old kernel
is called netbsd- then you can't boot from it (!), at least on some
architectures. It turns out the second-stage boot program has a really
dumb parser that takes a - as a flag marker even when it's not preceded
by whitespace. (Nowadays I use /netbsdN and /netbsdX.)
der Mouse
mouse@collatz.mcrcim.mcgill.edu
01 EE 31 F6 BB 0C 34 36 00 F3 7C 5A C1 A0 67 1D