[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cross-compiling debian packages for arm - an automated way?



On Tue, 13 Aug 2013 10:36:02 +0300
Vladimir Vitkov <vvitkov@linux-bg.org> wrote:

> 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.

ARMv6 hardfloat != Debian armhf. All armhf processing in Debian and
Emdebian is ARMv7 only. ARMv6 has to make do with ARMv5 code as armel.

Don't reinvent Raspbian - Emdebian cannot help with anything related to
ARMv6. Find a different board - I'd recommend a BeagleBone Black. Much,
much more capable & reliable than the Pi and similar price point - it's
ARMv7 and runs armhf properly.
 
> 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.
> 
> 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

Raspberry Pi is not armhf. Debian or Emdebian cross-compilation for
armhf will produce binaries that will not execute on Pi. Only armel
will work on Pi with Debian or Emdebian toolchains or packaging but at
that point, you lose what few advantages remain of using the Pi.

>  * 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)
> 
> Please note:
>  * I am not shooting for recompiling the whole archive, just some
> stuff we find useful/want to modify or not packaged

You will have to recompile the entire base stack as you are looking to
change the build parameters for packages in a way that means that no
existing binaries in Debian or Emdebian will run - unless you use armel
only or change your board.

> Please excuse me if i missed some blatantly obvious link, it might be
> my search-fu is not good enough.

This used to be the role of emdebian-crush but development stalled a
long time ago - mainly because it's too much work. Expect to put in
about 100 to 300 hours just to get the first set of packages you could
actually deploy. Probably another 300 hours to get those packages to
actually work to a login prompt with nothing else. The original Emdebian
Crush work was for ARMv4 and is unsupported. It's unlikely that any of
the Crush scripts will be usable without extensive updates and nobody
has the time or inclination to do the work.

Or you could get a different board which is ARMv7 and supports armhf
properly.

http://beagleboard.org/Products/BeagleBone%20Black

http://makezine.com/magazine/how-to-choose-the-right-platform-raspberry-pi-or-beaglebone-black/

If you stick with the Pi, you are on your own as far as Emdebian is
concerned.

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: signature.asc
Description: PGP signature


Reply to: