Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Apr 2014 10:14:11 -0700
From:      Tim Kientzle <tim@kientzle.com>
To:        Shawn Webb <lattera@gmail.com>
Cc:        Glen Barber <gjb@freebsd.org>, FreeBSD ARM <freebsd-arm@freebsd.org>
Subject:   Re: Building an image for Raspberry Pi
Message-ID:  <525F718A-53F7-4172-9D23-190D1364AD0A@kientzle.com>
In-Reply-To: <20140403061443.GD71905@pwnie.vrt.sourcefire.com>
References:  <20140403005755.GA71905@pwnie.vrt.sourcefire.com> <20140403054106.GT14379@glenbarber.us> <20140403061443.GD71905@pwnie.vrt.sourcefire.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Apr 2, 2014, at 11:14 PM, Shawn Webb <lattera@gmail.com> wrote:

> 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).

Unfortunately, my time has been rather cramped, though
Tom Everett and Patrick Kelsey have been doing a bunch
of Crochet work recently.

The confusing part about U-Boot is that it requires two different =
compilers to build:

* Building the U-Boot loader needs an ARM cross-compiler and relies on =
GCC-specific options.

* 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.

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.

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).

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.

Best luck,

Tim




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?525F718A-53F7-4172-9D23-190D1364AD0A>