Ubuntu 12.04 ‘precise’ and cross compilation of ARM kernels

Over year ago I wrote How to cross compile ARM kernel under Ubuntu 10.10 and this became one of most popular posts on my website. It may work still but it is terribly outdated so I decided that it is a time for update.

Users of Ubuntu 12.04 ‘precise’ have much simpler situation when it comes to cross compilation of Linux kernels than ones who use older releases. Everything is now in distribution, we have a lot of packages converted to multiarch so instruction is much shorter.

There are few steps to cross compile Linux kernel under Ubuntu 12.04 ‘precise’ (for “armhf” which is officially supported now):

apt-get install gcc-arm-linux-gnueabihf

apt-get source linux-source-3.2.0

apt-get build-dep linux-source-3.2.0

cd linux-3.2.0; dpkg-buildpackage -b -aarmhf

And that’s all. Linaro kernels will be as easy to build as Ubuntu one on next days as we have to update packaging to recent Ubuntu version.

cross-compiler kernel linaro linux ubuntu