Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Jan 2015 18:06:36 -0500
From:      Jeremy Brown <mischif@mischivous.com>
To:        freebsd-arm@freebsd.org
Subject:   Re: Cross-Compiling RPi Ports From amd64 Using Native Toolchain
Message-ID:  <CAGL1beANgaJFiFcjEzq9jxM0JDginQhX_%2B_UGbgkHBf79VOtJw@mail.gmail.com>
In-Reply-To: <CAGL1beBRzB7%2B5Ncbtb380kAyBqVb6eq-nZxMcVnJHyh4HbGwqw@mail.gmail.com>
References:  <CAGL1beBRzB7%2B5Ncbtb380kAyBqVb6eq-nZxMcVnJHyh4HbGwqw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I followed the steps crochet made me do, so my setup is a bit
different than what is shown on that page - I used make xdev instead
of make toolchain assuming the commands were equivalent, but if not
please let me know.

I was left with tools in two places - /usr/armv6-freebsd and
/usr/obj/armv6-freebsd. It seems most of the important elements such
as the compilation tools are in the former location, with only
sourcefiles in the latter.

I have to copy the tools over into /usr/armv6-freebsd in the chroot
and not /usr/obj because my version of gcc doesn't pick up on other
directories to search, should I just copy
/usr/obj/armv6-freebsd/usr/src/tmp to /usr/armv6-freebsd in the
chroot?

When I would try to set the environment variables make would never
pick them up - I would try either modifying /root/.profile and use sh
as my shell or modifying /root/.cshrc and using csh as my shell.
Thankfully, the host's PATH would overwrite the PATH in the chroot, so
I could add /usr/armv6-freebsd to my path and make would pick up the
new tools.

Also, since building the ports is to be scripted, I'm using make from
the host using DESTDIR to set up a chroot, is there some superior way
to do this?

-Jeremy

>* I managed to use crochet and the QemuUserModeHowTo to build some
*>* ports for the RPi.  What bit me in the process was that the "Cross
*>* Building Using The Host Cross Compiler" section had to be followed
*>* to a T - in particular, the built cross toolchain in
*>* /usr/obj/usr/src/tmp must be moved to <chroot_root>/usr/obj
*>* wholesale, the local headers symlink made, and the cross-CC
*>* environment variables set up.  The error in #2 above seems to
*>* indicate that the cross tool is not statically linked, so maybe the
*>
* wrong toolchain is in use.*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGL1beANgaJFiFcjEzq9jxM0JDginQhX_%2B_UGbgkHBf79VOtJw>