A quick and dirty guide on how to crosscompile a custom Linaro kernel deb for your ARM board on Ubuntu Oneiric.

prerequisites

  • sudo apt-get install gcc-arm-linux-gnueabi fakeroot build-essential devscripts kernel-wedge

obtain the source

  • git clone --depth=1 git://git.linaro.org/people/jcrigby/ubuntu/linux-linaro-oneiric.git

adjust the kernel config

  • cd linux-linaro-oneiric
    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="ken.werner@linaro.org" DEBFULLNAME="Ken Werner" 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.

pointers


CategoryHowTo

KenWerner/Sandbox/CreateCustomKernelDeb (last modified 2012-02-10 13:37:32)