Posts Tagged ‘2200’

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

Turning an IBM Netvista 2200 (8363) into a server

Monday, August 18th, 2008

So i have been on the hunt for a tiny PC which i could turn into an always-on server for a while now. I played with an Compaq IA-1 (check out ia1-hacking and linux.boeldt.net) but since it lacks an ethernet device (and let me asure you, usb-ethernet is way slow, escpecially on usb1.1) it was kind of unhandy as a fileserver. The well known ‘slug’ (look for NSLU2) is another alternative but rather pricey.

Ive had my eye on some netclients (normally just networkcards with a graphicsadapter and you connect it to a powerfull mainframe) but never found one in my pricerange (less than 50 Eur). Then i came across the IBM Netvista 2200 (8363) which met the following requirements:

– PC compatible architecture with reasonable horsepower
– diskless operation (e.g. through compact flash)
– USB Ports
– small power consumption
– builtin fast ethernet (10/100mbit)
– stylish outfit since it will be placed on my workdesk

There are a couple of models (Netvista 2800, etc.) which have more power, a real pci-slot or more diskspace. But they are also more expensive so back to the 8363.

Some people get confused with the different series there are. You can identify the serie by looking at the serial number (surprise!). Some models end with -Exx (xx as a placeholder), other with -Wxx and again others with -Txx. All feature the same hardware more or less, but a short explanation:

-Exx: the _E_thernet model. It comes with an ethernetcard and the regular hardware

-Wxx: WindowsCE model. On this machine its possible to run WindowsCE. It features ethernet and i think a bigger internal storage disk

-Txx: Tokenring model. This model has a Tokenringcard plugged into the ibm-pci-slot IN ADDITION to the ethernetcard.

Thats an important fact since a lot of people on the internet think that the -Txx model only features Tokenring (which nobody uses anymore, read more about it here: wikipedia), which is not true. The tokenringcard is plugged in an pcislot that looks like it is some proprietary port from ibm. One screw and its removed and you have a good -Exx model. And most of the time the -Txx models are way cheaper (since nobody knows).

So i received my model and turned it on. It tried to boot via network. But it worked!

The netvista features an builtin CompactFlash-Slot from which it can even boot. So my plan: build a linuxkernel and a filesystem and put it on the CF-Card, boot the system, mount my external USB-Hdd, start a web and ssh server and provide some php scripts to the net. Let me tell you, after some tinkering it works great!

In order to boot from the CF-Card you need a BIOS that supports this feature. To enter the BIOS keep on hitting ESC or ENTER until it shows up. Check the version it should at least say:
If you have an older BIOS (which doesnt support booting from Flash) you need to update your BIOS. You can either boot the updatefile via net or put it on a CF-Card. I chose the later since i didnt want to setup a networkbootserver. You need a FAT or ext2 formatted CF-Card which contains the bflash.2200 file (name must be exactly this!). You can obtain the file directly from IBM or through the links mentioned here. When booting the machine, it detects the updatefile and asks you if you want to update. You want to. Dont turn of the machine now or disturb it until its all the way done.

Congrats, you can now select ‘Flash’ as a bootdevice in your BIOS. In principle the things are straight forward from now on. You need a file named kernel.2×00 in your rootdirectory (remember ext-filesystem!) which will be booted by the builtin bootloader.

A short word on 2.4 vs. 2.6: since IBM created the firmware for 2.2 and 2.4 kernels they are much easier to use.

But its also possible (and desireable) to use a 2.6 kernel. In order to do so, you need to patch the kernelbinary, patch the geode-video-driver source and remember to configure the kernel properly. this describes this process. You will find patches, kernelconfigs and instructions also here. Thanks to both i got my stuff running!

Im running a 2.6.24.3 kernel with the kernelconfig attached below. Somehow building an initramfs into the kernel woudlnt work (i assume it messes with the headers and therefore the IBM cant boot the image). My rootfs is a gentoo stage3 tarball with the latest portage (on how to install gentoo see the gentoo handbook and for tiny systems gentoo wiki or this). Additional packets i installed are e.g. lighttpd, php, sqlite, sshd, dhcpd, screen, cron, pciutils usbutils, …

Here are some files you might want to have a look at:
/etc/make.conf
/usr/src/linux/.config
/etc/fstab

Output of:
lspci
dmesg
top
df
uname -a
cat /proc/cpuinfo

As you might have noticed i added 128MB of PC133 SD-Ram (168pin) to the internal 32MB. There is a normal slot, so opening the device is highly recommended! Furthermore i plugged in a 1GB USB-Stick to one usbports and made it /home. /data is the external harddrive which also provides a little swapspace (barely used).

To sum things up, im very happy with this stylish little box running gentoo at a decent speed (i was to lazy to crosscompile the packages, i think it took about 50h to compile everything but i had the time. Just remember to emerge screen first!), providing all the services i need. The powerconsumption is ok, my router, modem, external harddrive and server together need about 38W. For this price (15Eur at ebay) a really good setup.

Other links:
http://www.dingeldein-online.de/computer/netvista/netvista2200.html
bluetrait
http://www.freigeister.org/n2200.htm

http://estate.moaworks.com/rwachinger/NetVista/index.php?location=0.3

http://michaeldale.com.au/archive/2005/08/07/installing-linux-2200-onto-the-ibm-netvista-n2200-8363/#comments

UPDATE!
I managed to get a 2.6.31 Kernel booting, check my new post here