Date: Wed, 15 Aug 2012 13:27:13 -0600 From: Warner Losh <imp@bsdimp.com> To: mattia.rossi.mate@gmail.com Cc: freebsd-arm@freebsd.org Subject: Re: Building ARM ports (was Re: Globalscale Dreamplug and 8.3 RELEASE) Message-ID: <1EB213FA-1B3D-467E-B733-064938E7D96F@bsdimp.com> In-Reply-To: <502BEAA9.9080802@gmail.com> References: <5008728C.5040100@jetcafe.org> <1343846511.1128.34.camel@revolution.hippie.lan> <501B0E04.5040901@jetcafe.org> <1343951251.1128.53.camel@revolution.hippie.lan> <502AEC99.70708@jetcafe.org> <CAJ-Vmok-n_focw5x4nM1Go2c0xRoeU=xehDAtTgeM2%2BtZ94GjA@mail.gmail.com> <48664E9B-0BBB-4C78-B720-9920083E661A@bsdimp.com> <1345039837.27688.14.camel@revolution.hippie.lan> <502BEAA9.9080802@gmail.com>
index | next in thread | previous in thread | raw e-mail
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... Warnerhelp
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1EB213FA-1B3D-467E-B733-064938E7D96F>
