Re: Cross-compiling debian packages for arm - an automated way?
+++ Vladimir Vitkov [2013-08-13 10:36 +0300]:
> Hello All,
> Currently i am trying to setup a box as a crosscompiler/repository for
> debian packages. The packages are probably going to be most useful for
> me/small set of people but nevertheless i want to do it.
> The box targeted (for built packages) is Raspberry Pi (armv6 hardfloat),
> but unfortunately it is not beefy enough to do the compile on it, in a
> sensible time and repeatable manner.
> Therefore i am looking for a way to crosscompile on x86_64 the packages.
> I tried to follow the Linaro multiarch cross compile guide
> (https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/CrossbuildingQuickStart) but didn't have any measurable success.
As the main writer of that page I'd be interested to know what you
tried, what didn't work, and the way in which it didn't work.
> I will be glad for any pointers how to setup a crosscompile system that
> can do the following:
> * Run on x86_64
> * be able to compile for armhf
> * Be able to create deb packages out of dsc / apt-get source
> * Be able to compile packages in an isolated environment (chroot/kVM)
> * Be able to maintain a repository (not mandatory as reprepro is nice
> and easy)
> * supports some kind of buildd functionality (also not mandatory as
> package builds can be automated in other ways and are not expected to be
> so frequent)
So, as explained on that page, and
(which is getting somewat out of date), there are various ways of
runing at this.
On Ubuntu (raring or later) right now I can categorically recommend
using multiarch-crossbuilding, done via sbuild in a standard chroot.
As best described on
(change arm64->armhf and don;t use the special repo or arm64 workarounds, it's not needed)
(ignoring the bit about xbuilder and special linaro PPA - neither of
those are needed any longer)
Sorry that there isn't just one simple page that has the right
commands on - wikis always need updating.
However on Debian right now the situation is much less clear because
all that stuff isn't yet in the archive. We need to get
cross-toolchains and cross-build-essential and cross-pkg-config into
Debian so the same stuff 'just works'. This has been delayed by me not
having time for this at my day job, and some disagreement about
exactly how it should be done in Debian, with more architectures to
support. We plan to make progress on that here at debconf, but at this
moment you will probably find using xapt or xdeb more effective.
Unfortunately the emdebian cross-toolchains for armhf are also
uninstallable (or were las time I looked 3 weeks ago) so everything
is rather broken.
Depending on choices made here at debconf and how much time I get to
spend on this (work time or just my 'copious free time') and how much
others help out, I hope the situation will improve greatly in a month
or so, but of course it's not done until it's done.
> Please note:
> * I am not shooting for recompiling the whole archive, just some stuff
> we find useful/want to modify or not packaged
> * Probably will recompile some packages which are not to our
> satisfaction in terms of layout, features or similar.
> * Kernel is not completely out of the question, but quite some way down
> the road
> * I am just appalled by the most projects/tutorials for the RPI that
> say ... wget ; tar ; configure ; make ... this is just not right.
> Please excuse me if i missed some blatantly obvious link, it might be my
> search-fu is not good enough.
I have tried to collect many relevant links on
although there is more on the debian wiki that is not directly linked
there. You seem to have found the right sort of info.
Principal hats: Linaro, Emdebian, Wookware, Balloonboard, ARM