Building the Linux Kernel for Mercury

From Ambedded
Revision as of 14:15, 7 January 2015 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. We use follow steps on ubuntu 12.04 32bit.

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

cd /
mkdir /kerneltools
cd /kerneltools

Download the gcc cross-compiler from our FTP.
PS. If you don't have account/password ,please e-mail us.

tar xf fsl-linaro-toolchain.tar.bz2

and install the C Library , relations tool

apt-get install libstdc++6 libncurses5-dev make uboot-mkimage

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

mkdir kernel-fsl-3.0.35
cd kernel-fsl-3.0.35
tar -xvzf kernel-fsl-3.0.35.tar.gz

then cross-compiling options have to be set

export ARCH=arm
export CROSS_COMPILE=/kerneltools/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-

Use our default configuration,and then to customize your kernel you can start from it:

make imx6_ubuntu_defconfig

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 menuconfig

Now the kernel can be built,the N mean how many CPU you have,if you just have one ,you can just ignore this option "-j"

make -j N uImage
make -j N modules

Here you will find the compiled kernel


Upload them to Mercury following Installing U-Boot and Linux Kernel for Mercury page.

Personal tools