Building ARM ports (was Re: Globalscale Dreamplug and 8.3 RELEASE)

Ian Lepore freebsd at damnhippie.dyndns.org
Wed Aug 15 14:10:47 UTC 2012


On Tue, 2012-08-14 at 20:44 -0600, Warner Losh wrote:
> On Aug 14, 2012, at 6:35 PM, Adrian Chadd wrote:
> 
> > Guys/girls/etc,
> > 
> > OpenWRT manages it. They started from the ground up with having to cross-build.
> > 
> > Just because the problem is hard to tackle doesn't mean we shouldn't try.
> 
> Agreed.  I worry the qemu solution sounds simple, but really will be harder.  Prove me wrong :)
> 
> > There's like a dozen half-done attempts at this. I realise you can't
> > address _all_ the ports at once, but surely starting with a small
> > subset and working outward is doable.
> > 
> > I'll put up a bounty for anyone who actually comes up with a basic
> > framework for supporting cross-building ports, documents how it
> > does/doesn't work (eg if things like build vs run dependencies) and
> > has a basic design for how to slowly fix ports to support it.
> 
> I have the basics, and have for years.  I've posted them several times.  The trouble is that they are very very basic and need more work.  I think you'll need to define the problem a little better before progress can be made.
> 
> Warner

The system we use at work is basically Warner's (at least I think he put
the bulk of it in place years ago).  It involves defining a bunch of
environment variables that change how ports are built (I want to say
"fools" or "tricks" the ports into using cross-tools, but the negative
implications of those words may just reflect my ignorance of the
details).

The biggest problem we have is build versus run dependencies.  When
crossbuilding port foo to run on arm, that port decides it needs the
compile_a_foo port to build the code, so it goes off and cross-builds
compile_a_foo, then wants to run the resulting arm binaries on the x86
host.  The only way I know of to fix that is to tediously identify and
pre-build all the build-time requirements needed by any port you intend
to cross-build.  Ports that have their own build systems and custom
tools are essentially impossible to work with.

-- Ian




More information about the freebsd-arm mailing list