KernelBuild

Differences between revisions 1 and 18 (spanning 17 versions)
Revision 1 as of 2012-11-06 16:36:28
Size: 1451
Editor: 79-119-116-74
Comment: draft of kernel build instructions
Revision 18 as of 2012-11-13 11:07:36
Size: 25
Editor: dholbach
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Here's how to cross-build the kernel from the git repository.

== Initial setup ==

Having ccache installed is optional but helpful if you are often rebuilding the package from scratch with minor modifications.

$sudo apt-get install gcc-arm-linux-gnueabihf ccache

Get the source

$git clone git://kernel.ubuntu.com/jani/ubuntu-nexus7.git

== Rebuild the package ==
$cd ubuntu-nexus7
$git clean -xdf

You may want to do this to disable cross-building of the linux-tools binary package, as that requires multiarch setup and some armhf libs installed in the host system.

$sed -i '/do_tools/ s/true/false/' debian.linaro/rules.d/armhf.mk

$fdr clean (fdr is the shell alias for fakeroot debian/rules, useful as it is typed quite often while working with the kernel package)
$debuild -eDEB_BUILD_OPTIONS="parallel=3" -eCROSS_COMPILE="ccache arm-linux-gnueabihf-" -b -aarmhf -us -uc -nc

== Build zImage only ==

Sometimes you just want a zImage for a quick test such as inserting it in a boot.img and trying it out without a full deb installation.

This does an out of source tree build of a zImage (no modules) using the current Ubuntu configs

$cd ubuntu-nexus7
$mkdir ../build
$cp debian.linaro/config/config.common.ubuntu ../build/.config
$CROSS_COMPILE="ccache arm-linux-gnueabihf-" ARCH=arm make O=../build -j 8 zImage

In the above snippets -j and parallel= are obviously to be adjusted depending on need.
#redirect Nexus7/Kernel

Nexus7/KernelBuild (last edited 2012-11-13 11:07:36 by dholbach)