Herewith are some instructions (by John Appleby on how to compile an arm26 kernel on an i386 Linux machine. I really wouldn't recommend trying to cross-compile on anything else, although it is in theory possible to cross-compile from any other linux host. I should note that none of our (current!) kernels get very far on a machine with less than 8Mb RAM. We have plans of significant reduction of overhead down the line (definitely for 4Mb machines and maybe even for 2Mb machines), but for now, we are concentrating on making things work. [08/06/2003]
You can in principle build your own toolchain, but we've not been able to do so reliably. gcc < 2.95.3 produce broken output for the kernel (don't inline correctly amongst other things) and gcc > 2.95.3 have broken binutils for arm26 architectures. That leaves 2.95.3 as the only working compiler for arm26 kernel builds. It should be possible in theory to build your own toolchain based on 2.95.3, but there is a perfectly good working one compiled for you. I suggest you use it… [note: I (Ian) use a home built compiler, although it produces some dodgy userland code I think) - 08/06/2003]
The following toolchain is somewhat picky about where you put it, so follow these instructions precisely.
mkdir /usr/local/arm cd /usr/local/arm wget ftp://ftp.arm.linux.org.uk/pub/armlinux/toolchain/cross-2.95.3.tar.bz2 tar jxf cross-2.95.3.tar.bz2
note: substitute the most recent patch and linux version
You probably want to have some experience of compiling a kernel before this, but I suppose it's not a requirement. All our patches since about 2.5.69 should apply and compile clean; if they don't, then please send us an email with the details, but PLEASE check to see if your problem was solved in a more recent kernel before emailing us.
If you want more documentation on how to compile a kernel, I suggest reading the Linux Kernel HOWTO. Our patches are cumulative, so just download the latest kernel and the latest patch.
The patches are named in a manner that shows how to apply them, eg. 2.5.70-im3 will apply to 2.5.70 2.5.69-ac3-im4 will apply to 2.5.69-ac3 (which itself is 2.5.69 with -ac3 applied), and so on.
cd /usr/src wget ftp://ftp.kernel.org/pub/linux/kernel/v2.5/linux-2.5.70.tar.bz2 tar jxf linux-2.5.70.tar.bz2 wget http://www.mnementh.co.uk/arm26linux/linux-2.5.70-im3.patch.bz2 cd linux-2.5.70 bunzip2 -c ../linux-2.5.70-im3.patch.bz2 |patch -p1
change the following:
ARCH := arm26 CROSS_COMPILE = /usr/local/arm/2.95.3/bin/arm-linux-
make menuconfig (and select the options correct for your computer) make Image (note: make zImage works but produces broken output)
There are some known (harmless) warnings in the kernel - specifically, warnings like:
arch/arm26/kernel/entry.S:534: Warning: source register same as write-back base
Please don't report these to us; These are assembler instructions used to program MEMC, and, although technically not 'endorsed' by the ARM2/3 documentation, the code is not known to have any problems. It is rumoured that RISC OS does the same. The files containing these accesses are entry.S and uaccess-user.S