This document is outdated and will be removed soon. Please see the Kernel-HOWTO (available here) for newer information.
This page describes how to go about installing and booting a new kernel on the NetWinder. It is geared towards machines with 2.0 or better firmware, though there is a section down below about use of older firmware.
Updating a kernel on a NetWinder is a fairly straightforward operation. Precompiled kernels and their associated dynamic modules can be downloaded from ftp://ftp.netwinder.org/pub/ccc/kernel, consult the README file in that directory for details on the specific kernel versions. Or you can build your own kernel and install that.
For each kernel, there are three files of relevance: the kernel itself (vmlinux-YYMMDD.gz), the kernel modules (modules-YYMMDD.tar.gz) and the header files (includes-YYMMDD.tar.gz). The first two must be installed to properly update a kernel, while the third is needed if you want to compile any programs with the new kernel. Here is the recommended proceedure for updates.
gzip -d vmlinux-YYMMDD.gz rm vmlinux ln -s vmlinux-YYMMDD vmlinux
cd /lib mv modules modules.old # or just delete it tar zxf /boot/modules-YYMMDD.tar.gz
cd /usr/src rm -rf linux-2.0.3X # or move (rename) it tar zxf /boot/include-YYMMDD.tar.gzYou should also check that the /usr/src/linux symbolic link is pointing correctly at the newly installed headers (if you switch between Linux versions, ie. 2.0.31 to 2.0.35, it will need to be fixed).
There is a minor change planned for new kernel releases: instead of having a separate vmlinux, modules and include tar files, there will be just a single tarfile containing all of these pieces. The System.map file will also be included from now on. To install the binary kernel using the new method, follow these steps:
mv /lib/modules /lib/modules.old mv /usr/src/linux/include /usr/src/linux/include.old
cd / tar zxf /root/nwkernbin-YYMMDD.tar.gz
cd /boot rm vmlinux ln -s vmlinux-YYMMDD vmlinux rm System.map ln -s System.map-YYMMDD System.map
rm -rf /lib/modules.old rm -rf /usr/src/linux/include.oldNote that you may wish to wait until after you have successfully rebooted using the new kernel before you delete these files.
Once the kernel and modules are installed on the disk, simply rebooting the machine will generally activate the new kernel (if the firmware variables are set at their default values). There is a separate page of booting notes that are particularly of relevance for people who are upgrading to an ELF kernel for the first time.
Failing that, there are three variables in the firmware that relate to the kernel (surprisingly enough, they all begin with kern...)
You cannot use an ELF kernel with pre-2.0 firmware.
If you switch from a 2.0.31 to 2.0.35 kernel, make sure you update your modules also, since version information is compiled in and modules will fail to load if you don't get a "matching set".
As of firmware 2.0.6 there is a change to the parameter passing structure, you need to have a corresponding kernel. Please see the compatibility page for more information!
First off, don't confuse the firmware version with the disk image version - they are not necessarily related. The firmware version is the first thing you will see when the machine boots, it shows up right after the white fade completes.
If you have firmware before 2.0 (typically, version 1.3) then your options with regards to kernel booting are rather limited. This firmware only knows how to load a.out kernels, so none of the distributed kernels (other than the June 29 a.out shipping kernel) can be used directly. You will need to use the vmelf utility program that is included in the source code with the older 2.0.31 kernels. This program will magically make an ELF kernel look like an a.out kernel (enough to boot anyways). Then the resulting kernel can be used to boot the NetWinder.
There is an additional complication, since the old firmware doesn't support loading a kernel from an arbitrary file on the disk - instead, it expects a dedicated kernel partition on /dev/hda1 from which it will fetch the kernel. If you've got older firmware then your disk is already set up like this. All you need to do is copy the kernel onto this partition:
dd if=your_kernel of=/dev/hda1 seek=1with the obvious disadvantage that if your newly written kernel fails for some reason, you have no means of recovery other than fetching a kernel from a TFTP server on the network. (The seek=1 is needed because the partition table is stored on the first cylinder... if you omit it, then your drive will be in really sad shape).