Fix cross- linux-tools build
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
In Progress
|
Medium
|
Andy Whitcroft |
Bug Description
cross-building the kernel with sbuild --host or apt-get build-dep -aarmhf && dpkg-buildpackage -aarmhf does not work. The kernel part is OK but the tools package build falls over.
There were various reasons for this.
First the cross-build-deps do not install because binutils-dev:armhf is a) not multiarch and b) not installable if it was due to binutils not being multiarched. This is being worked on (see http://
apt-get install debhelper cpio module-init-tools kernel-wedge rsync dpkg util-linux flex bison openssl libelf-dev:armhf libnewt-dev:armhf libdw-dev:armhf libunwind8-
(and crossbuild-
The kernel cross build failed due to no arch being specified for the tools build so the wrong headers were found.
Also install -s is used, which uses the wrong strip. It might be better to refactor this to use dh_install which would DTRT, but for now I added --strip-program $(STRIP) and set $(STRIP) correctly for each call.
These fixes are in the first patch
This gives a working build, but none of the optional libraries are detected and used (libdw, libunwind, libaudit, libnewt). This is fixed by using the crosscompiler to run the tests when crossing, and adding config for arm for libunwind.
This fix is included in the -3 patch
C++ demangling support (via libiberty) won't work untilt there is a way to install bintuils-dev:armhf or equivalent.
Attached is also a version of the patch (-2) which includes a rename from 'build_arch' to 'kernel_arch' in the debian* arch-specific rules config, as 'build_arch' (reffering to the HOST_ARCH) is hopelessly confusing in a cross-build context. Agreed with Ubuntu upstream to use 'kernel_arch' instead.
Sorry this isn't a nice quilt set, but you get the idea.
Changed in linux (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in linux (Ubuntu): | |
importance: | Undecided → Medium |
tags: | added: bot-stop-nagging |
Changed in linux (Ubuntu): | |
assignee: | nobody → Andy Whitcroft (apw) |
status: | Confirmed → In Progress |
Patch incorporating initial cross-fixes and build_arch- >kernel- arch rename