From owner-freebsd-arm@FreeBSD.ORG Sun Apr 6 16:52:57 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0208DA08; Sun, 6 Apr 2014 16:52:57 +0000 (UTC) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B47E869; Sun, 6 Apr 2014 16:52:56 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id s36Gqr1u007057; Sun, 6 Apr 2014 16:52:53 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.100] (192.168.1.66 [192.168.1.66]) by kientzle.com with SMTP id eq38y4svinnxii5m3ya5a5dbwn; Sun, 06 Apr 2014 16:52:53 +0000 (UTC) (envelope-from tim@kientzle.com) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: Building an image for Raspberry Pi From: Tim Kientzle In-Reply-To: Date: Sun, 6 Apr 2014 09:52:53 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20140403005755.GA71905@pwnie.vrt.sourcefire.com> <20140403054106.GT14379@glenbarber.us> <20140403061443.GD71905@pwnie.vrt.sourcefire.com> <525F718A-53F7-4172-9D23-190D1364AD0A@kientzle.com> To: Warner Losh X-Mailer: Apple Mail (2.1874) Cc: Glen Barber , FreeBSD ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2014 16:52:57 -0000 On Apr 6, 2014, at 8:58 AM, Warner Losh wrote: >=20 > On Apr 5, 2014, at 11:14 AM, Tim Kientzle wrote: >=20 >>=20 >> On Apr 2, 2014, at 11:14 PM, Shawn Webb wrote: >>=20 >>> On Apr 03, 2014 01:41 AM -0400, Glen Barber wrote: >>>> You need to build the XDEV stuff for the build environment. >>>>=20 >>>> Something like: make -C /usr/src XDEV=3Darm XDEV_ARCH=3Darmv6 >>>>=20 >>>> should do the trick. >>>=20 >>> Yeah, I have the xdev stuff installed. It kinda seems like just = using >>> this xdev stuff isn't sufficient. It seems u-boot might require some >>> gcc-centric items (though I'm unsure what they are). >>=20 >> Unfortunately, my time has been rather cramped, though >> Tom Everett and Patrick Kelsey have been doing a bunch >> of Crochet work recently. >>=20 >> The confusing part about U-Boot is that it requires two different = compilers to build: >>=20 >> * Building the U-Boot loader needs an ARM cross-compiler and relies = on GCC-specific options. >>=20 >> * U-Boot also builds some tools that run on the build host; that uses = a different native compiler and does not seem to rely on GCC-specific = features. >>=20 >> For the host tools, setting HOSTCC=3Dcc always worked well >> for me. I never had any problems with clang or gcc as the >> native host compiler for that part of U-Boot. >>=20 >> For the loader itself, you can try the XDEV tools (which last >> I checked still built GCC) or you can try the ARM EABI >> GCC cross-compiler from ports (which may be broken; I >> volunteered to maintain it and then ran out of time to work on it). >>=20 >> One specific GCC-ism used by U-Boot (an option to reserve >> a specific CPU register for global data) was added to clang >> recently but I don't know if that's reached FreeBSD yet. That >> might allow clang to build the U-Boot loader, but it will require >> some work: the XDEV target also builds ARM binutils and >> cross-libraries which are essential. >=20 > With the switch to clang on arm recently, the XDEV tools have started = building a clang compiler. Should we force it to build a gcc compiler = instead? Certainly, it would be nice to have an option for a GCC XDEV. Tim