Crossbuild Failure on Arm

Tim Kientzle tim at kientzle.com
Tue Jun 14 14:01:02 UTC 2016


> On Jun 13, 2016, at 11:22 AM, Thomas Laus <lausts at acm.org> wrote:
> 
> I wanted to add a few NIC cards to my Beaglebone, so my next step was
> to build a toolchain for the arm arch.

The advice you saw for using xdev originated a few years back as a way to build U-Boot when cross-compiling.  This was at a time when all of the ports compilers were broken on ARM, so xdev was one of the few available options.  Today, the ports compilers are working, and U-Boot is mostly being built in ports using those, so there’s not much point to using xdev today.

You’ve never needed xdev to cross-build FreeBSD itself.  The existing build infrastructure is smart enough to build the necessary cross-compilers as needed.

Cross-compiling ports is a more complex venture; the current best approach seems to be a hybrid environment that combines cross-compilers with user mode qemu for running occasional tools targeting the destination architecture.

If you want to develop kernel drivers, you might also consider native development.  The Beaglebone is fast enough to provide a comfortable dev environment for small projects like drivers (that’s how I did all my work on cpsw a few years back).  Loading and unloading drivers is pretty quick.

The only caveat:  Local driver development will crash the machine occasionally, which will lose recent writes to the filesystem.  Use git and push your work to some other machine regularly.  NFS can also help here.

Cheers,

Tim



More information about the freebsd-arm mailing list