Updating an existing system(only the
Crosscompiling NetBSD with build.sh
Building the kernel using build.sh The steps to build a kernel are:1.
Ensure you have installed the Compilers (
) set that came with your base system.2.
Download and extract the kernel source (see
here to download kernel source).3.
", where <ARCH> is your machine'sarchitecture such as 'i386', 'sparc', 'mac68k'.4.
cp GENERIC <MYCONF>
", where <MYCONF> is your name for this configuration. Youcould use your hostname, the machine type, or even your first name.
eep to letters,numbers, and _ characters.5.
. Initially you can skip this stage. You can remove drivers for CPUtypes, hardware, and devices you do not have or use, or even enable options, such as oni386 commenting out the 'pc0' line and enabling the 'vt0' to gain virtual consoles. A goodstart to determining what hardware drivers you definitely need to keep is to read theoutput of "
" or "
mesg | grep ' at '
". For every line containing '<XXX> at<YYY>' you need to keep the entries for both <XXX> and <YYY>. You should alsoread
for information on the different kernel configuration options.6.
, which will generate the kernel build directory for <MYCONF>.7.
" changes to the kernel build directory.8.
" generates a '.depend' file that enables the make program to see whatneeds to be rebuilt (at this point it will be everything!).9.
" will compile the kernel. If all goes well you will be left with a 'netbsd' kernel.This may take some significant time if you are on a VAX, some time on a big Alpha, andsomewhere in-between for the rest of us.10.
" saves your current kernel,(
important), and moves the new kernel ready to be booted.11.
" should reboot using your new kernel - the boot messages should contain a lineof the form: 'NetBSD <VERSION> (<MYCONF>) #0: <COMPILE_DATE>'12.
f you have any problems:
You should boot your 'netbsd.old' kernel in single user mode.The procedure varies from port to port depending on the boot procedure, but on i386 itwould be:a.
when the first NetBSD message appears
"Then swap your kernel back:c.