Here, in brief, are the steps to assemble the pieces to compile your own version of the linux kernel for the netBook. The cross-compiling environment can be set up in less than an hour or so (and you have the marginal benefit of notes polished in response to my experience!).
For those of you with lots of disk space on your netBook, note that you can compile the kernel and its modules directly on the netBook. This does not take THAT long, all things considered - 1-2 hours. To do this, you will of course need to install make and gcc on your netBook, in addition to the kernel source. But it saves you having to install and set up the cross-compiling environment. When compiling the kernel, it is recommended to stop all other processes, including X windows. The main potential problem is lack of memory during the compile process.
The cross compiler that seems to be preferred by openpsion developers is scratchbox at www.scratchbox.org, which is a complete x-compiling environment. This has a fairly easy installation, with a set of rpm or deb packages, depending on the system you want. Scratch box now has a fairly uptodate compiler (gcc version 3.3.4) which has been verified compile a functioning the kernel binary for kernel version 2.4.27. Scratchbox is contained within a large virtual file system, and I've found you have to login to the virtual system to use the compiler on kernel source. You may need a fast internet connection (or a lot of patience) to get it and loads of free diskspace to unpack it. I installed the following packages:
binutils-arm-linux_2.15-5_i386.deb
cpp-3.4-arm-linux_3.4.2-3_i386.deb
g++-3.4-arm-linux_3.4.2-3_i386.deb
gcc-3.4-arm-linux_3.4.2-3_i386.deb
libc6-dev-arm-cross_2.3.2.ds1-18_all.deb
libgcc1-arm-cross_3.4.2-3_all.deb
libstdc++6-0-arm-cross_3.4.2-3_all.deb
libstdc++6-0-dev-arm-cross_3.4.2-3_all.deb
After installing, get an ARM cross compiling system set up (I am a little confused by all this too, but I managed to muddle through to something that worked).
You can now use the Qemu emulator to emulate a complete ARM system. The emulated system does not support PCI or hard disks, so a network/NFS boot has to be employed. You can see instructions for how to set up the network system boot, or download a complete debian system from emulated Debian ARM system. This is a complete Debian Sarge system for ARM processors emulated using qemu. This is not technically a cross-compiler, but a native compiler. This system is easy to install and easy to use, but has the one downside that it runs a slower than, e.g., scratchbox. It has the advantage that since it really is Debian Sarge, compiled binaries can be tested, and are guaranteed to work, on a Debian Sarge system used on the Psion - there will be no library issues.
Qemu could also be used to compile a system for the netbook from scratch, e.g., to optimize for floating point.
- follow instructions on emdebian website (www.emdebian.org) (entry in /etc/apt/sources.list)
- apt-get install task-cross-arm
this leads to one error message "couldn't find /usr/share/info/iostream.info.gz". Fix this error using: "ln -s iostream-295.info.gz /usr/share/info/iostream.info.gz"
These tools can also be set up on rpm-based systems. Get the rpm's from http://www.emdebian.org/tools/crossdev.html. You'll need something these (now deprecated, no doubt):
binutils-arm-2.9.5.0.37-1e3.i386.rpm
cpp-arm-2.95.2-12e4.i386.rpm
g++-arm-2.95.2-12e4.i386.rpm
gcc-arm-2.95.2-12e4.i386.rpm
libc6-dev-arm-2.1.3-8e4.noarch.rpm
libstdc++2.10-arm-2.95.2-12e4.i386.rpm
libstdc++2.10-dev-arm-2.95.2-12e4.i386.rpm
These rpm's did not install properly with rpm on my RedHat 9.0 system, but it was fairly easy to unpack and install them by hand. Put the rpm's in their own directory and for each file (a) unpack it with "rpm2cpio filename.rpm > temp", (b) then unpack the cpio "temp" file with "cpio -i < temp". This will make a directory "usr" with the stuff in it. Then tar the usr directory over to the system files " tar cf - usr | (cd / ; tar xf - )". (This has not noticeably cause my RedHat system to become non-functional...it's o.k....) The cross compiler (x-compiler) is then available.
The versions of all of these files changes fairly regularly; get the most recent ones!
linux-2.4.27.tar.bz2 from www.kernel.org (Here)
patch-2.4.27-vrs1.bz2 from www.arm.linux.org.uk (Here)
patch-2.4.27-vrs1-kvd1 from www.psilinux.org (Here)
(This patch gives the options of 16, 32, or 64 MB of memory; but use the default 16 MB.)
Put all these files in a directory "some/sourcedir/with/files/"
Unpack the kernel source, apply the patches, configure the kernel:
cd some/sourcedir/with/files/
tar -xjvf linux-2.4.27.tar.bz2
cd linux
zcat ../patch-2.4.27-vrs1.gz | patch -p1
cat ../patch-2.4.27-vrs1-kvd1 | patch -p1
make mrproper
make netbook_config
make oldconfig (experts can then do "make config", or "make xconfig" to customize the options)
make dep; make clean
make zImage
Copy the arch/arm/boot/zImage file to the compactflash card and it should boot up your netBook.
You will likely configure the kernel to use kernel modules. [From http://www.arm.linux.org.uk/docs/kerncomp.shtml#crossinstall]:
After make modules, install the modules into /usr/src/arm/ [or some other directory] as follows:
bash$ make modules_install INSTALL_MOD_PATH=/usr/src/arm/
If your kernel version is x.y.z, this command will place the modules into the /usr/src/arm/lib/modules/x.y.z directory on the host, which can then be placed into an suitable filesystem, or transferred to the target machine. (note that /usr/src/arm/lib/modules/x.y.z should become /lib/modules/x.y.z on the target machine). Please also note that you should not install these kernel modules into the hosts root filesystem, since they are incompatible with your host kernel.
However, within the scratchbox virtual environment, a "make modules_install" will just safely put the modules in the virtual /lib/modules directory of the virtual environment.
You will also need the module utilities programs (modutils) in your filesystem to manage the modules.