From owner-freebsd-arm@FreeBSD.ORG Tue Dec 30 21:02:58 2014 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 39A0B14F for ; Tue, 30 Dec 2014 21:02:58 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 034EE261C for ; Tue, 30 Dec 2014 21:02:57 +0000 (UTC) Received: from [192.168.200.212] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 02E78192A3B for ; Tue, 30 Dec 2014 21:02:55 +0000 (UTC) Message-ID: <54A312FF.7090100@ignoranthack.me> Date: Tue, 30 Dec 2014 13:02:55 -0800 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: freebsd-arm@freebsd.org Subject: Re: Cross-Compiling RPi Ports From amd64 Using Native Toolchain References: <54A2BE41.8010601@singnet.com.sg> In-Reply-To: <54A2BE41.8010601@singnet.com.sg> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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: Tue, 30 Dec 2014 21:02:58 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 12/30/14 07:01, Tur-Wei Chan wrote: > Hi, > > On 30/12/2014 6:35 AM, Jeremy Brown wrote: >> I'm trying to write a script that will create a custom FreeBSD >> image for a Raspberry Pi that includes a precompiled set of >> ports. I'm using Crochet for the heavy lifting and it's mostly >> finished except for the compiling the ports on the image. I >> managed to get it working using full-emulation with qemu but it's >> ridiculously slow, and now I'm trying to use the native toolchain >> to speed up the build. This is where everything's gotten >> difficult. I've been beating my head for the past week or so and >> I can't even get make to proceed past the configure stage. Right >> now I have two issues: 1) cpp fails the sanity check with a >> syntax error around the headers; I don't know why, as I've >> replaced the toolchain's include directory with a symlink to the >> system's directory. 2) I get the error ELF interpreter >> /libexec/elf-ldconfig.so.1 cannot be found, more or less. I've >> tried symlinking the system's file in to replace the toolchain's >> one, but I didn't suppose that didn't help since they were for >> different architectures. Can anyone help me solve these, or point >> me to a location where they've been solved already? I've tried >> following the qemu howto >> but it doesn't work >> for me. >> >> -Jeremy _______________________________________________ >> freebsd-arm@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-arm To >> unsubscribe, send any mail to >> "freebsd-arm-unsubscribe@freebsd.org" > > 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. > > The second gotcha turned out to be the mysterious-sounding "Add > the miscellaneous binary image activator patch to FreeBSD" section. > I didn't understand what that was for till various python scripts > that start with shebangs (#!/usr/local/bin/python2.7) would fail to > be loaded as python scripts. Invoking the image activator magic > allowed that part to be solved. > > > Regards > > -T.W.Chan- > We've added some of the more obscure bits of commands with binmiscctl(8) to the man page in head (thanks to doc@!). hopefully that makes sense. The shebang problems should be resolved in head. Let me know if they are not on 10.1 if you're building there. sean -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJUoxL8XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5khKAIAK9JH/3rZAWpyI4MVCI7SPr2 GEwtH8TBSusFSRUPKQj0HEk+wfUj/J9AV/UWQKzI9+Pao3bhVDe2wLUHbdp1dkAx nBgJ4N6nogNlM8tnl3/UIghI3rbZY0Lr+M8JtAi4j5WMtiKq+ZRtbtjWMIP/44z4 oWUgUyzI9P6kE2EWCKE1+Zx3Va4cutj6yfPIqT7tevhQz16hGZh9k2z5YOIlTqcQ 3lBah7GIo6Nk43hdI6TL8OVQHmFgnaLN0tef9k6lDuiqCZ9FzhUUPaV4seTMgvhz YMBER8cH9tmc2NUiRMHIQOUCFtCUg6DLdprqsgYOvnwuriXlHIromV0ed9xzl3w= =YheA -----END PGP SIGNATURE-----