Comment 2 for bug 715429

Revision history for this message
John Rigby (jcrigby) wrote :

When cross building I run the following script first. It 1. enables ccache which is usefull if you are repeating the build, 2. turns off the tools build (which is only on for the mx51 flavour since the tools are flavour independent so we only build once). 3. disables the dh_strip which is the problem seen here.

#!/bin/sh
## enable ccache
sed -i -e 's/CC.*=.*CROSS_COMPILE.gcc/CC = ccache $(CROSS_COMPILE)gcc/' Makefile
## turn off tools
sed -i -e 's/do_tools.*=.*/do_tools = false/' debian.linaro/rules.d/armel.mk
## turn off dh_strip
sed -i -e 's/dh_strip.*pkghdr.*/echo skipping dh_strip for cross build/' debian/rules.d/2-binary-arch.mk

As Loic mentions, the proper fix for the dh_strip problem is to make the linux-headers properly cross compile so there will be an arm binary there for the arm dh_strip to work on. I have researched but not yet implement that fix. It involves teaching the kernel make that some of the binaries in scripts need to be compiled for both the host and the target.

Also the do_tools issue is fixed (I think) if you install the necessary arm dev packages on your host:
sudo xapt -a armel install libdw-dev
sudo xapt -a armel install libelf-dev

(after adding the right entry to your apt-whatever file...)