From owner-freebsd-arm@FreeBSD.ORG Tue Dec 30 15:01:28 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 2A414F54 for ; Tue, 30 Dec 2014 15:01:28 +0000 (UTC) Received: from r02.singnet.com.sg (r02.singnet.com.sg [202.40.249.102]) by mx1.freebsd.org (Postfix) with ESMTP id D735A18A4 for ; Tue, 30 Dec 2014 15:01:27 +0000 (UTC) Received: from cp-prod-rg-out-2.fuse.kc2.sg.local (172.63.64.222) by r02.singnet.com.sg (8.6.060.30) id 5405684700B451CF for freebsd-arm@freebsd.org; Tue, 30 Dec 2014 23:00:41 +0800 X-CTCH-RefID: str=0001.0A150209.54A2BE3F.00A7, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from zaapth.zeepster.org (121.6.2.234) by cp-prod-rg-out-2.fuse.kc2.sg.local (8.6.122.03) id 5432B48308501DE2 for freebsd-arm@freebsd.org; Tue, 30 Dec 2014 15:01:19 +0000 Received: from zaapedy.zeepster.org ([172.16.38.42]) by zaapth.zeepster.org with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.83 (FreeBSD)) (envelope-from ) id 1Y5yIR-000KtE-OX for freebsd-arm@freebsd.org; Tue, 30 Dec 2014 23:01:19 +0800 Message-ID: <54A2BE41.8010601@singnet.com.sg> Date: Tue, 30 Dec 2014 23:01:21 +0800 From: Tur-Wei Chan User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; 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: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed 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 15:01:28 -0000 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-