PS/2 Keyboard at the Pegasos with linux 2.6.22

I finally finished setting up my desk in the new flat so that I can unpack my other computers beside the laptop. The Pegasos will play a new role as router until I bought a nice embedded box with integrated WLAN.

In preparation for this task I installed the latest gentoo-sources, compiled them and found out that the attached keyboard is not working. Well, “unplugged cable” was the first thought. But that was false, as the keyboard was working in the firmware and with the older kernel. I even checked that once again. So, it sounded like a kernel-bug.

And I found it: There was a change in the code for the i8042-controller, which handles the PS/2 inputs. The change is correct, but the Pegasos-Firmware does not publish the device-entry correctly. Fortunately there is a patch for your Firmware, which you can apply with some lines of code.

That’s a cool feature of having a real firmware than a stupid BIOS. The Pegasos uses SmartFirmware which is an OpenFirmware implementation. You can find similar firmwares in PowerPC-based Macintoshs, Sun-systems, HPPA and Alpha machines. So, quite everything beside x86-cruft and newer machines which already use EFI.

Just enter the Firmware and type in nvedit. After that you will see a minimal editor for your nvramrc, which starts with a line-number every line. Here you enter (thanks to Matt Sealey for this code-snippet!)

probe-all
" /pci/isa/8042" find-device
" 8042" encode-string device-type
install-console
banner

(be careful with leading spaces). After that hit CTRL-C and you will be back at the Firmware “ok” prompt. Now you have to store the changes with nvstore.

You should make sure that during the firmware-startup the nvramrc will be read. Therefore enter printenv use-nvramrc? and check if it is set to “true”. Otherwise change it with setenv use-nvramrc? true. Run nvstore once again and type reboot.

You have to do this procedure only once. The changes are saved in the non-volatile memory of your firmware.

There are already a couple of possible updates to the firmware. And the kernel should not use workarounds for a buggy firmware. Probably there will be an update to SmartFirmware on the Pegasos or we have to find a way to publish these changes to the user. One idea is to use the BootCreator-Tool which creates a small Forth-based bootmenu based on an easier bootmenu-file. But you can also add other Forth-code for the firmware, like the one above if we don’t want to save it in the nvram.

Currently I think we have to wait if this problem evolves to an FAQ. Assuming that I updated to 2.6.22 very late now (it’s already more than 6 weeks out) but that quite nobody in #gentoo-ppc was aware of this problem, I have the strange feeling that I’m the last user of Gentoo/PPC on the Pegasos.