Building the Linux Kernel

From Ambedded
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

wget http://releases.linaro.org/14.02/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.8-2014.02_linux.tar.xz
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.

wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.2.54.tar.gz
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.

wget ftp://your_account:your_password@ambedded.com/c7/git-linux-3.2.54-2014_t1.0.zip
unzip git-linux-3.2.54-2014_t1.0.zip
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
wget ftp://your_account:your_password@ambedded.com/c7/ambedded_cyone.patch
patch -p1 < ambedded_cyone.patch

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

wget ftp://your_account:your_password@ambedded.com/c7/ambedded_defconf
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 uImage
make -j 8 modules


Here you will find the compiled kernel

./arch/arm/boot/uImage


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

Personal tools
Namespaces

Variants
Actions
Navigation
Tools