Kernel compilation is the most important and trickiest development step in providing Linux support for your favorite embedded boards. This tutorial is to provide a step by step instruction for compiling your own kernel.
We have tested the compiled kernel with OlinuXino A13 boards. Similar steps can be applied to any embedded boards with little or a few changes.!!
Download the kernel source from your vendor. Steps for Allwinner Linux-Sunxi boards are described below which includes OlinuXino A13, A10, A20 and Cubieboards.
First step is to install the necessary tools for cross-compiling the kernel. In Debian based distros use
sudo apt-get install gcc-4.7-arm-linux-gnueabihf ncurses-dev uboot-mkimage build-essential git
sudo mv /usr/bin/arm-linux-gnueabihf-gcc-4.7 /usr/bin/arm-linux-gnueabihf-gcc
sudo make ARCH=arm a13_defconﬁg // default configuration
sudo apt-get install qt4-dev-tools qt4-qmake
sudo make ARCH=arm xconfig // add additional hardware support in the configuration window
sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage
Copy and replace the uImage created to the boot partition of your SD Card. Now you have the image ready to be booted with the custom kernel.