Feeds:
Posts
Comments

Archive for July, 2011

A quick and dirty guide on how to cross-compile a custom Linaro kernel deb for your ARM board on Ubuntu Lucid.

Prerequisites

sudo apt-get build-dep --no-install-recommends linux-image-`uname -r`
sudo aptitude install gcc-4.5-arm-linux-gnueabi fakeroot build-essential

Obtain the source

git clone --depth 1 git://git.linaro.org/ubuntu/linux-linaro.git

Adjust the kernel config

cd linux-linaro
fakeroot debian/rules clean
fakeroot debian/rules editconfigs

  • You may run fakeroot debian/rules updateconfigs to check if ubuntu complains your config (debian.linaro/config/enforce).

Add a changelog entry

Add an entry to the debian.linaro/changelog:

DEBEMAIL="thangam.arunx@gmail.com" DEBFULLNAME="Roja Arun" dch --changelog debian.linaro/changelog -l local 'enable ftrace'

Build the kernel deb

We don’t want to build the tools (like perf) because this requires some cross libs installed:

sed -i “s/do_tools.*=.*true/do_tools = false/” debian.linaro/rules.d/armel.mk

Restrict the build to the flavour we are actually interested in:

sed -i "s/flavours.*=.*/flavours = linaro-vexpress/" debian.linaro/rules.d/armel.mk

Build the binary package (-b), do not sign the .changes file (-uc) or source package (-us):

CROSS_COMPILE=arm-linux-gnueabi- skipabi=true skipmodule=true do_tools=false dpkg-buildpackage -aarmel -b -uc -us
This may take a while and will probably fail at some point but hopefully leaves the kernel deb at ../*deb.

Reference Links

https://wiki.linaro.org/KenWerner/Sandbox/CreateCustomKernelDeb

Advertisements

Read Full Post »