Building the Linux Kernel

From Ambedded
Revision as of 12:05, 24 July 2014 by Desmond (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Build system could be a Debian o Ubuntu PC, compatibility libraries for X86_32 may be needed if using a 64 bit distro.

First change to / directory, and create a folder for kernel build

cd /
mkdir /kerneltools
cd /kerneltools

Download the gcc cross-compiler from linaro

tar xf gcc-linaro-arm-linux-gnueabihf-4.8-2014.02_linux.tar.xz

and install the C Library

apt-get install lib32stdc++6

Now that we have a compiler able to create arm binaries, we can proceed to download the Linux Vanilla kernel.

tar -xvzf linux-3.2.54.tar.gz

Download the Mavell patch form ftp and patch it for kernel​.
PS. If you don't have account/password ,please e-mail us.

cd linux-3.2.54
for i in `ls ../git-linux-3.2.54-2014_T1.0/*.patch` ; do patch -p1 < ../git-linux-3.2.54-2014_T1.0/$i ;done
patch -p1 < ambedded_cyone.patch

Download our default configuration,to customize your kernel you can start from it:

cp ambedded_defconf .config

then cross-compiling options have to be set

export ARCH=arm
export CROSS_COMPILE=/kerneltools/gcc-linaro-arm-linux-gnueabihf-4.8-2014.02_linux/bin/arm-linux-gnueabihf-

Kernel can be now customized, but we recommend NOT using loadable modules, because they will have to be later transferred to the base system, slowing down the install process.

make oldconfig
make menuconfig

Now the kernel can be built

make -j 8
make -j 8 modules

Here you will find the compiled kernel


and the device tree


Upload them to CYOne modules following Installing U-Boot and Linux Kernel page.

Personal tools