Archive for November, 2009

How to boot a decent Kernel on your IBM Netvista 2200 (8363)

Tuesday, November 17th, 2009

So over at this post i described how to in general get linux running on this device.

Since i had some issues with my usbcluster (lvm over 4 usbsticks) i wanted to update udev, which in current versions needs a kernel beyond 2.6.27. Building a 2.6.31 first failed, i searched the net a bit and emailed some people and finally got a response from antonio (big thanks again) forwarding an email from Georg Schiesser who located the troublemaker.

Once again its the missing RTC. Because of the following lines, kernels beyond 2.6.24* wont boot:

arch/x86/kernel/rtc.c:
/*
* If UIP is clear, then we have >= 244 microseconds before
* RTC registers will be updated.  Spec sheet says that this
* is the reliable way to read RTC - registers. If UIP is set
* then the register access might be invalid.
*/
while ((CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP))
cpu_relax();

Disabling the last two lines helped. So you have to comment them out, as well as the known patches.

These are:

drivers/video/geode/gx1fb_core.c

replace the line
static char mode_option[32] = "640x480-16@60";
by
static char mode_option[32] = "1024x768-16@60";

and

arch/x86/kernel/setup.c

replace
ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev);

by

ROOT_DEV = Root_SDA1;

Watch out, normally you hardcode Root_HDA1 which is the CF card with the old ATA drivers. In my kernelconfig im using ATA SFF which maps the CF card to SDA1 and any usb devices to /dev/uba1 and so on. Play with the drivers at own will. You can also disable DMA by changing

drivers/ata/libata-core.c

static int libata_dma_mask = .... to static int libata_dma_mask = 0;

after building your kernel, take the file “vmlinux” from /usr/src/linux/arch/x86/boot/compressed (with linux -> linux-2.6.31/, i used the vanilla sources) and binary patch it. source i found somewhere is attached. copy it to your /usr/src/linux directory, build it (gcc -o patch.app patch_nvista.c) and start ./patch.app. it should patch the right file and copy the output to /usr/src/linux/kernel.2×00. Use that file to boot.

Problems i am still facing: the new kernel wont boot of my 8GB CF card and i dont want to strip my RootFS that much (next working size is 2GB :(). Im trying to solve that by using a busybox init which mounts an usbstick which contains my rootfs. Disadvantage: its wicked slow! Kind of working version is attached as tar.gz. Just unpack that to a relativly small CF Card and edit to your needs.

Second problem which kind of led to my “solution” with the busybox init is that there seems to be some cache-limit the kernel runs into. I just couldnt boot anything beyond 2.5MB (tried embedding an initramfs directly into the kernel but it got too big). So keep that in mind.

Since i dont have enough time right now to test any further this blog entry can be seen as a share of information “as is”, so that people can work on it and with it to get their babies a decent kernel. Feel free to contact me tho if you have any questions!

config_linux_2_6_31
patch_nvista
initramfs