This article illustrates how to compile the Linux Kernel 2.6.32.2 actually delivered by default on the bootable microSD card for the FOX Board G20.
Originally written by Lee McLoughlin
On your Linux PC move to your home directory and download the standard kernel source tree from Internet typing:
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.2.tar.bz2 $ tar -xvjf linux-2.6.32.2.tar.bz2
Although a recent unpatched kernel will work on your Netus it will not be able to access all the hardware. Nor is it simple to cross compile and generate the correct bootable kernel image. To overcome these issues download extract these patches to your new linux source directory and apply them: linux-2.6.32.2-foxg20-patches-v5.txt
$ cd linux-2.6.32.2 $ patch -p1 < linux-2.6.32.2-foxg20-patches-v5.txt
When newer kernels become available these may or may not work with these patches. Unless you need features of these kernels continue to use this kernel.
If you are building a kernel with just the minimal features (perhaps for a specialist hardward project) I recommend you start with netus.config-2.6.32.2-SIMPLE and
add to it as required as this will avoid the time required to build unused modules:
$ cp foxg20.config-2.6.32.2-SIMPLE.txt .config
If you are building a full featured system (like a desktop system) and you want access to a wide range of kernel modules start with foxg20.config-2.6.32.2-COMPLEX-v3.
$ cp foxg20.config-2.6.32.2-COMPLEX-v3 .config
These two files become available appling the patch linux-2.6.32.2-foxg20-patches-v5.txt as described before.
Whichever config you choose you must now configure it:
$ make menuconfig
Once you are happy with your kernel configuration you can build a new kernel with:
$ make
When finished you will find a new uImage file containing the kernel image and the file foxg20-script.bin containing the boot parameters in binary format. This two files have to be copied on the first FAT16 partition of your microSD card as described next. If you need to create your own foxg20-script.bin file read this article: Create foxg20-script.bin u-Boot environment file.
If you require to compile the Kernel modules type also:
$ make modules $ make modules_install
Note that modules are not installed but rather all copied to the ./FoxModules sub-directory. If you don't want old modules you've build before then instead of that last line do:
$ rm -rf ./FoxModules $ make modules_install
You can install your new Kernel image in two ways:
With this method you can update the Kernel image directly to a FOX Board G20 while is running Read how to...
With this method you will copy the files on a microSD using a microSD USB adapter on your PC: