From owner-freebsd-embedded@FreeBSD.ORG Tue Oct 14 10:43:44 2008 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25663106569E for ; Tue, 14 Oct 2008 10:43:44 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout5.freenet.de (mout5.freenet.de [IPv6:2001:748:100:40::2:7]) by mx1.freebsd.org (Postfix) with ESMTP id AE7D38FC1A for ; Tue, 14 Oct 2008 10:43:43 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from [195.4.92.14] (helo=4.mx.freenet.de) by mout5.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #65) id 1KphNL-0003V2-Pb; Tue, 14 Oct 2008 12:43:39 +0200 Received: from m8bb2.m.pppool.de ([89.49.139.178]:57416 helo=ernst.jennejohn.org) by 4.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #65) id 1KphNL-0007Ai-Fj; Tue, 14 Oct 2008 12:43:39 +0200 Date: Tue, 14 Oct 2008 12:43:36 +0200 From: Gary Jennejohn To: Rafal Jaworowski Message-ID: <20081014124336.16e25346@ernst.jennejohn.org> In-Reply-To: <48F4667F.4080900@semihalf.com> References: <48F099D4.2050302@incunabulum.net> <48F4667F.4080900@semihalf.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@FreeBSD.org Subject: Re: HOWTO: Build NSLU2 U-Boot on FreeBSD X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Oct 2008 10:43:44 -0000 On Tue, 14 Oct 2008 11:29:35 +0200 Rafal Jaworowski wrote: > Bruce M. Simpson wrote: > > Building NSLU2 U-boot firmware on FreeBSD hosts > > *snip* > > > Toolchain setup > > > > cd /usr/ports/devel/cross-binutils > > env TGTARCH=arm TGTABI=rtems make install > > > > cd /usr/ports/devel/cross-gcc > > env TGTARCH=arm TGTABI=rtems make install > > > > Get stas@FreeBSD.org's updated u-boot tarball: > > uboot-atamantb.tar.bz2 > > Untar it > > *snip* > > > env CROSS_COMPILE=arm-rtems- gmake distclean > > env CROSS_COMPILE=arm-rtems- gmake nslu2_config > > env CROSS_COMPILE=arm-rtems- gmake > > In general it should be possible to build U-Boot with our in-tree cross tool > chain. I recall Marcel got this working with some patches against U-Boot build > scripts, tools or makefiles; they were even accepted to main line U-Boot IIRC. > > There's also another approach possible: using U-Boot native and ready to use > build tools (ELDK) via Linux compat layer. I was working in such setup some > time ago and it was fine with some minor tweaks because of differences in some > of the GNU tools and ours. FWIW, my old notes on this from FreeBSD 5.x/6 > timeframe can be found here: > http://www.denx.de/wiki/view/DULG/ELDKInstallationUnderFreeBSD > Doesn't work anymore with more recent versions of u-boot. It tries to generate some native utilities which use Linux headers which conflict with the native FreeBSD headers. Judicious tweeking of include paths may solve the problem, but I only spent a little time on it. This is an unfortunate trend which I've also observed with Linux. It is still possible to cross compile Linux 2.4.25 under FreeBSD, but the Linux (and u-boot) developers keep adding more and more Linux-specific utilities so that e.g. Linux 2.6.* _must_ be compiled under Linux. BTW I always use the ELDK since I work as a consultant for DENX. --- Gary Jennejohn