Date: Fri, 2 Jan 2015 22:42:28 -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: <CAGL1beCSQtCRFFz4ZFH0ZWBygqLBHmVw6kY0xmD0At%2BGzwmHCQ@mail.gmail.com> In-Reply-To: <CAGL1beANgaJFiFcjEzq9jxM0JDginQhX_%2B_UGbgkHBf79VOtJw@mail.gmail.com> References: <CAGL1beBRzB7%2B5Ncbtb380kAyBqVb6eq-nZxMcVnJHyh4HbGwqw@mail.gmail.com> <CAGL1beANgaJFiFcjEzq9jxM0JDginQhX_%2B_UGbgkHBf79VOtJw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
One additional thing: I checked my toolchain and did see that some of my programs (ar, as, cc, gcc, ld, ranlib) are statically linked, whereas the rest are dynamically linked, including cpp and nm which also gave me the ELF interpreter error. So I'll change my question somewhat - if I use the command given on the qemu page (env -u TARGET -u TARGET_ARCH make -j 4 toolchain) instead of the one provided by crochet (make XDEV=3D${XDEV} XDEV_ARCH=3D${XDEV_ARCH} WITH_GCC=3D1 WITH_GCC_BOOTSTRAP=3D1 WITHOUT_CLANG= =3D1 WITHOUT_CLANG_BOOTSTRAP=3D1 WITHOUT_CLANG_IS_CC=3D1 WITHOUT_TESTS=3D1 xdev)= , would I be more likely to succeed in cross-compiling my ports and will I be able to use this toolchain to build the kernel and world with crochet? -Jeremy On Fri, Jan 2, 2015 at 6:06 PM, Jeremy Brown <mischif@mischivous.com> wrote= : > I followed the steps crochet made me do, so my setup is a bit different t= han 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/arm= v6-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 n= ot /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/ar= mv6-freebsd in the chroot? > > When I would try to set the environment variables make would never pick t= hem 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-fr= eebsd 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 th= is? > > -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?CAGL1beCSQtCRFFz4ZFH0ZWBygqLBHmVw6kY0xmD0At%2BGzwmHCQ>