Last updated: Oct 9, 1998.
Once you have built and ELF kernel and install it, you will discover that some things don't quite work like they used to. Here's how to fix that.
Getting insmod to work again: you might not have a recent insmod, so during booting, loading of modules will fail for all the new ELF modules. To remedy this, get ftp://ftp.netwinder.org/pub/ccc/kernel/insmod.elf and install it as /sbin/insmod.
Note that the old a.out insmod is still needed for loading a.out modules, such as the FP emulator. In /lib/modules/misc/ you will find a copy of the old insmod for this purpose. Ensure that at the top of your /etc/inittab file (on older disk images, you should instead check the /etc/rc.d/rc.sysinit file), the call to load the FP emulator specifically uses the old a.out version of insmod:
/lib/modules/misc/insmod -f /lib/modules/misc/fpem.o license=0 # rather than insmod -f fpem.osince the latter will just use the wrong version of insmod.
Also note that the ELF version of insmod in ccc/kernel cannot handle modules that were compiled with the PIC option to gcc. IF you need that support, get Pat Beirne's insmod from ftp://ftp.netwinder.org/users/p/patb/modutils-2.1.107.tar.gz.
Errors about /dev/therm are caused by the fact that the new kernel's therm driver now uses the standard /dev/temperature with marjor=10, minor=131 instead of the previous home-made values. Unfortunately the set_therm utilities still make reference to /dev/therm, so the short term solution is to make the new device node, then make a sylink from the old name to the new one:
cd /dev mknod -m 666 temperature c 10 131 rm therm ln -s temperature thermAfter this, there should not be further complaints about /dev/therm. Note that the proc entry is still called /proc/therm, because it returns more information than would normally appear when reading from /proc/temperature.
Errors about missing clock can be fixed by moving the program to the proper directory. It should be in /sbin:
mv /usr/bin/clock /sbin/clock
Another source of confusion is the settings to be used in the firmware. Traditionally, the NetWinder had /dev/hda1 reserved for the kernel, then the root filesystem was on /dev/hda2, swap is on /dev/hda3 and (if your disk is >810 MB) then the rest would be /dev/hda4.
The 2.0 firmware defaults are different from the above. Since the kernel can now be loaded from a filesystem, there is no need for a separate kernel partition. So the kernel partition is gone and the other three slide down a spot: root is now /dev/hda1, swap is on /dev/hda2, and any extra disk space is in /dev/hda3.
If you have an old machine and are upgrading it to new firmware, then you need to change the kerndev and rootdev fields to point at the proper place where your kernel and root file system are, generally this would be /dev/hda2 for older machines since they had a separate partition for holding the kernel on /dev/hda1.
If you use X window system, or SVGAlib, then you'll quickly notice that when you quit (or try to switch back to a console), the screen stays in graphics mode. This is because the mode-switching code in the ELF kernel has been removed. It is expected for the app (X or SVGAlib) to do this. This is how things are on x86 platforms, so we're following suit. (Also there was some font related problem that required making the change).
Pat has a new, accelerated X server that properly restores the modes (it also does a lot of other things...). The old X server (framebuffer) and the current SVGAlib do not restore the mode, so after exiting (or if you crash), you will be typing blindly. It was claimed that typing textmode would restore the display, but that hasn't worked for me. My solution has been not to use X, and when I forget, just press CTRL-ALT-DEL to reboot. You won't see the normal messages as you shut down, but it will work as normal.
By default, sound support is not compiled in due to an annoyance with the config files. If you need sound support, either get an older sound.o module, or rebuild your own kernel. In menuconfig, enable sound and enable WaveArtist support for VNC. The default values for DMA, base address and such are correct, no need to change them.
Rev 5 boards are have a problem with the system clock, that causes the machine to report odd BogoMips values (262 is normal), causes the system clock to run fast or slow, and may also cause timeout errors on hard disk, flash writing, etc. Basically anything related to clocks. The 981029 kernel fixes the problem by using a completely different hardware timer. The only probly is that this new timer (#4) was not previously used and hasn't been factory tested. There is a very slim chance that the new hardware timer could be defective on some boards, since it was not factory tested till now. Note that there are many other reasons for not being able to boot, a bad hardware timer would only be suspect if kernels 981029 and beyond won't work under the same conditions where a previous kernel does.
A number of people are having fan problems on their NetWinders. The fan must run to prevent the CPU from overheating. On Rev_5 boards, however, a hardware fan control bit was added that allows the fan to be shut off completely (rather than just to toggle it between high and low settings). You can determine if you are affected by typing
cat /proc/thermand seeing if the fan stops when you do this. If you get the message ``no such device /dev/therm'' then your kernel lacks therm driver support, or there is a problem with the /dev/therm entry (see below). Obviously, if the fan was not running in the first place, then you're in trouble also.
Now things get complicated. A slightly modified version of the set_therm utility was released (primarily on the Web Server disk image #8) that tries to access /dev/ports and forces the fan control bit to be on. To make this one work, one must add a symbolic link from /dev/port which is the correct name:
cd /dev ln -s port portsIn the ELF kernel things are equally strange. We have removed /dev/therm (major 102, minor 0) and instead we are using /dev/temperature (major 10, minor 131) since that is the standard place for such things. However not all the tools know about this yet, so we make a symlink from the old name to the new one: name to the new one:
cd /dev rm therm mknod -m666 temperature c 10 131 ln -s temperature thermThis should keep the current set_therm and related tools happy. Since the ELF kernel properly sets the fan control bit, reading from /proc/therm should not cause the fan to stop anymore.
Keyboard Problems while booting have also been observed. The trouble stems from the keyboard controller chip (a part of the Winbond SuperIO chip). The symptom is a non-responsive keyboard when you first power on your machine (if it was working and it dies in mid-session, that's a different problem). It should be completely cured on Rev. 5 boards.
Winbond hasn't been able to give us a working answer to this problem yet. We have found a number of things though. It seems that if you plug in a terminal onto the serial port, and reboot your system, everything works. Since the serial port is on the same chip as the keyboard controller, there may be some strange interaction here. This isn't an official solution to the problem, but if you are fustrated it's a quick thing to try.
Resetting the computer doesn't reliably clear up this condition, nor does the little checklist that Winbond suggested we try. Basically from the testing I have done, software is unable to clear the condition if the machine boots up the "locked" state. The same code that reliably toggles the status when the machine boots "unlocked" fails to do anything when the machine starts up "locked".
This issue is open and still under investigation. If you encounter this problem, please get in touch with me. Not having enough data is a big part of the problem.