User Tools

Site Tools


This is an old revision of the document!

Kernel Porting and Configuration

Kernel Porting

Get the linux kernel source code linux-sunxi-sunxi-3.4.61.tar.gz, Or can be obtained from the internet: , To avoid unexpected error while porting, please download the 3.4.61 version kernel.

Extract the kernel source code

Assume that the source code was placed under /home/waveshare/cubieboard2/kernel directory, use the following command to extract it:

#cd /home/waveshare/cubieboard2/kernel
#tar -xzvf linux-sunxi-sunxi-3.4.61.tar.gz

Now we get the original linux-sunxi-sunxi-3.4.61 source code, rename it as linux-sunxi-sunxi-3.4.61_A20, as shown in the picture below: document-5_1.jpg

Assign the cross compiler

The purpose of kernel porting is to run the linux-sunxi-sunxi-3.4.61 on Cubieboard. Modify the Makefile under root directory:

#cd linux-sunxi-sunxi-3.4.61
#vi Makefile

Edit the following lines:



ARCH        ?= arm
CROSS_COMPILE   ?= arm-linux-gnueabihf-

ARCH specifies the target platform as arm, CROSS_COMPILE assigns the cross compile tool chain. As shown in the picture below:


Note: the vim editor is recommended.

Clear the temp files

Under the root directory, enter:

#make clean

Copy the default config file

Under the root directory, enter:

#make sun4i_defconfig

A hidden .config file will be generated under the root directory.

Config the kernel

Under the root directory, enter:

#make menuconfig

Config the kernel on the popup window, as shown in the picture below: document-5_3.jpg

Compile the kernel

Under the root directory, enter:

#make uImage 

It will take much time to complete the compiling. When completed, the compressed kernel image will be generated under linux-sunxi-sunxi-3.4.61/arch/arm/boot directory.

tutorials/dvk521/documentations/a20/kernel_porting_and_configuration.1386659135.txt.gz · Last modified: 2013/12/23 14:50 (external edit)