Building ARM ports (was Re: Globalscale Dreamplug and 8.3
RELEASE)
Warner Losh
imp at bsdimp.com
Wed Aug 15 19:27:20 UTC 2012
On Aug 15, 2012, at 12:30 PM, Mattia Rossi wrote:
>
>> 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.
>
> Those are exactly the issues I've run into when attempting to cross build. See my story here:
>
> http://matrossi.blogspot.it/2011/08/cross-compiling-ports-for-arm-under.html
Yes. That's why you need something more than the hackish thing that I did that groks BUILD vs RUN depends and builds the BUILD depends native and the RUN depends cross. I looked at this back in the day and found it was easier to do the following hackish thing:
(1) Create a chroot for building (we were doing this anyway)
(2) Create a port that described all the build depends. Build and install it in the chroot.
(3) Then build the runtime ports with the cross compilers in the same chroot, but I needed hacks to install the packages into a different place, that was groked for chained dependencies and such.
A bit of a PITA, and I never filed the rough edges off of this enough to even commit it to the TSC tree. It is a very time-intensive investigation to look into this stuff too, but maybe machines are fast enough that it isn't too horrible for the general case.
> My Qemu experience:
>
> http://matrossi.blogspot.it/2011/09/freebsd-arm-on-qemu-in-virtualbox.html
>
> but it didn't prove useful for building ports as there wasn't enough virtual memory to build them, because it fully emulates the 32M of RAM of a gumstix board as well..
There's hacks that make qemu emulate the boards with 2GB of RAM floating about...
Warner
More information about the freebsd-arm
mailing list