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.

Short summary of the last months

Now, let me quickly write a second blog-post, as you haven’t read anything from me for a couple of months. In February I announced my extended outtime from Gentoo due to finishing my study. It’s almost over now – I just have to give a final presentation next week. After that I’m going to move as I have to leave the student hostel I lived in for a couple of years. It seems that I will move to Cologne (hey zypher, stkn, wschlich and all other devs in that area 😉 ). If you already want to meet me (and some other devs) in that area, come to FrOSCon in Sankt Augustin tomorrow (Saturday, August 25).

Two weeks ago I managed to attend the Chaos Communication Camp, although I announced to everyone that I won’t be there. It was fun to see the irritated faces of persons who thought they spotted a ghost 😀 And it was relaxing, as I submitted my diploma thesis just the same day I drove to the Camp. I had a look into the Gentoo village over there, but could not find any known person – beside GMsoft who hit me on a road somewhere on the campground.

At some days during my diploma thesis I felt the urge to receive quick motivation kicks by helping users or the PowerPC-team. So I had a run through all open ppc-bugs and managed to kick them down from around 80 to under 25. Unfortunately they rose to 93 now 🙁 Mostly stabilisation-requests, which are quite quick to resolve, especially with the help of gatt. opfer and I with the help of the author of gatt, Matthias, are working on an automated scripting for commiting and changing a bug after a package merged successfully. More will come after our own testing phase. Unfortunately I already packed my Pegasos for the move, so that I can’t help out with testing. Anyways, the ppc-team will survive.

Now to the bad news: I don’t have a job yet. All applications were declined, but everytime I was in the round of the last two candidates. But then the companies decided for the other one. It’s too bad that I didn’t specialised in the past and that I’m an all-rounder. It seems that companies don’t have a need for persons who can jump in nearly every technical position. Now I have to wait for answers to the other applications I wrote. Probably my run of luck ended with the end of my study…

Splashimage in the initramfs with genkernel on the Pegasos

With kernel 2.6.16 several things changed in PowerPC-land. The kernel-maintainers decided to merge the ppc32 and ppc64 architectures into powerpc. That gave us some headaches, because a lot of the Makefiles changed as well.

Since March I had problems to build a kernel with an included initramfs for the Pegasos (because an external initramfs could not be loaded). In the past I used the target make zImage.initrd, but this failed now with genkernel. Today I finally found some time to look into that problem again, as I need a proper genkernel for release-building. I though I had to touch Makefiles and rewrite a couple of the kernel-build system… But in the end I could fix this problem with a simple two-liner-patch in genkernel, as only two pathes needed to be changed.

I tested the patch in Bug 141153 with the Pegasos at home and added the 2006.0-splashimage into the initrd. Now I have a nice bootsplash during the rare reboots 🙂

The other result was a working test-CD for the upcoming 2006.1 release. Unfortunately I can’t test the Apple-part, as I don’t own a working Apple any more. So I have to rely on other devs or release-testers (we need more of them!). And testing with qemu isn’t possible. It dies shortly after the kernel has been loaded…

A bunch of upgrades for Gentoo/PowerPC

Last night the Gentoo/PowerPC-team had its monthly meeting. Our main-topic was the upcoming 2006.1-release and if we want to switch the toolchain. gcc-4.1.1 gives a lot of advantages especially for PowerPCs and all devs tested this compiler-version during the last weeks. There are some troubles with strict-aliasing, but this can be changed in the ebuilds and notify upstream about the problem. Furthermore we will change to glibc-2.4, so that users will have one big move instead of several small moves.

For the upgrade I already created a 2006.1-profile which relies on this toolchain. An older gcc and glibc is masked in that new profile. Then I masked the newer toolchain in the current 2006.0-profile, so that users, who want to test the new toolchain have to switch the profile. And we can stabelise the new packages already without any trouble for the user, as long as he doesn’t change the profile. I consinder the new profile is testing as long as the 2006.1-release isn’t out.

Another topic was the stabelisation of Xorg-7.1 on ppc. I expected some objections and so I’m really glad that even Gentoo’s Xorg-maintainer, Donnie Berkholz, suggests all arches, which don’t have problems with binary drivers (that means all beside x86), should switch to the new Xorg.

I think, I’ll add the new Xorg as stable in the 2006.1-snapshot and make it stable for everybody later. Or I will mask some package-versions in the profile like I did with the toolchain.

Power-users are welcome to test the new toolchain and Xorg-7.1, and report bugs when something goes wrong.

But all in all 2006.1 will be a big step for Gentoo/PowerPC. I hope we can stay the best ppclinux-Distro ever 😛