tiomap-dev team mailing list archive
-
tiomap-dev team
-
Mailing list archive
-
Message #00828
[Bug 666267] Re: Cross compiled headers package breaks DKMS compilation
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 1b26a39..eb9fa5a 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -175,7 +175,13 @@ endif
sed -e 's/.*CONFIG_DEBUG_INFO=.*/# CONFIG_DEBUG_INFO is not set/
$(hdrdir)/.config
chmod 644 $(hdrdir)/.config
+ifeq ($(CROSS_COMPILE),)
$(kmake) O=$(hdrdir) -j1 silentoldconfig prepare scripts
+else
+ $(kmake) HOSTCC=$(CROSS_COMPILE)gcc \
+ KBUILD_SCRIPTROOT=$(builddir)/build-$* O=$(hdrdir) \
+ -j1 silentoldconfig prepare scripts
+endif
# We'll symlink this stuff
rm -f $(hdrdir)/Makefile
rm -rf $(hdrdir)/include2
--
You received this bug notification because you are a member of TI OMAP
Developers, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/666267
Title:
Cross compiled headers package breaks DKMS compilation
Status in Dynamic Kernel Module Support:
Won't Fix
Status in Linaro Ubuntu Evaluation Builds:
Fix Released
Status in “linux-linaro-mx51” package in Ubuntu:
New
Status in “linux-ti-omap4” package in Ubuntu:
Fix Released
Bug description:
When cross-compiling headers package on a PC, some x86 programs get shipped in the .deb.
Those programs get called during later compilation of DKMS modules, breaking the build.
Faulty binaries are:
scripts/mod/mk_elfconfig
scripts/mod/modpost
scripts/kconfig/conf
scripts/basic/hash
scripts/basic/docproc
scripts/basic/fixdep
scripts/bin2c
scripts/kallsyms
scripts/pnmtologo
scripts/conmakehash
scripts/selinux/genheaders/genheaders
scripts/selinux/mdp/mdp
Starting with, for example:
https://launchpad.net/ubuntu/+archive/primary/+files/linux-ti-omap4_2.6.35.orig.tar.gz
https://launchpad.net/ubuntu/+archive/primary/+files/linux-ti-omap4_2.6.35-903.16.diff.gz
https://launchpad.net/ubuntu/+archive/primary/+files/linux-ti-omap4_2.6.35-903.16.dsc
Extract with 'dpkg-source -x linux-ti-omap4_2.6.35-903.16.dsc'.
Cross compilation is done with:
fakeroot debian/rules clean
export $(dpkg-architecture -aarmel)
CROSS_COMPILE=arm-linux-gnueabi- skipabi=true skipmodule=true fakeroot debian/rules binary-omap4
To obtain cross compilers, add the following line to your
'/etc/apt/sources.list':
deb http://people.canonical.com/~hrw/ubuntu-maverick-armel-cross-
compilers/ ./
Then install 'gcc-4.4-arm-linux-gnueabi'.
After cross build, the resulting .deb are:
linux-headers-2.6.35-903-omap4_2.6.35-903.16_armel.deb
linux-image-2.6.35-903-omap4_2.6.35-903.16_armel.deb
One can check the shipped x86 binaries by extracting the .deb:
dpkg -x linux-headers-2.6.35-903-omap4_2.6.35-903.16_armel.deb
extract
...and searching for x86 executables:
find extract/usr/src/linux-headers-2.6.35-903-omap4/scripts -type f
-exec file "{}" \; |grep ELF |grep x86 |sed 's,:.*,,'
Some more details on cross compiling can be found at
'http://idlethread.blogspot.com/2009/01/recipe-of-day-cross-compiling-
armel.html'.
To manage notifications about this bug go to:
https://bugs.launchpad.net/dkms/+bug/666267/+subscriptions