From owner-freebsd-arm@FreeBSD.ORG Fri Jan 2 23:07:19 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA13ECB6 for ; Fri, 2 Jan 2015 23:07:19 +0000 (UTC) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C22B192D for ; Fri, 2 Jan 2015 23:07:18 +0000 (UTC) Received: by mail-lb0-f170.google.com with SMTP id 10so15658316lbg.29 for ; Fri, 02 Jan 2015 15:07:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=d26lhwJVdD1+Zo4zrujvLi0OGvUYbfstljgfkHg7A0w=; b=UvzrIa74soTObP91gy3r5AOAMy+mdoeKErherfkiREuPCHBRi7jLhNq/q+MHlJc347 Gs+fzwXhW5WurZDfbt4YVhO3t2ayGCMHyT9/S8jHbmnGu4BKYuiwfV2BWaPMKDRQL5bJ mMfoGvMXQMHrOGJIJt1iwLg87bgj2ScIplKBQV/HZG8XfVdVYVvXG3veajL1hlPCNNXl vARdi9QGjLjFMlKKrkd/FUEt/0Io9xwLJkioDSjRMv6h4A3Anao88vTPSLUjrI3UW4N0 ImE4/WEVeLY0ngSVjGF0TJse/9ao2eccCeSzGIEGkFDCizHI6nGZ9eehGi+vbCwScTAJ Ni3A== X-Gm-Message-State: ALoCoQkiK8ElSD7/SEzmC9ZFK8FWrsbgLAstnshp9heKY/dV2SyVdVqYeSp/PdQ0H4xAOKGLdqq4 X-Received: by 10.112.13.103 with SMTP id g7mr12626589lbc.29.1420240036349; Fri, 02 Jan 2015 15:07:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.142.198 with HTTP; Fri, 2 Jan 2015 15:06:36 -0800 (PST) X-Originating-IP: [74.60.193.70] In-Reply-To: References: From: Jeremy Brown Date: Fri, 2 Jan 2015 18:06:36 -0500 Message-ID: Subject: Re: Cross-Compiling RPi Ports From amd64 Using Native Toolchain To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2015 23:07:19 -0000 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 /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.*