From owner-freebsd-arm@FreeBSD.ORG Sat Jan 21 07:34:06 2012 Return-Path: Delivered-To: arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 370B4106566B for ; Sat, 21 Jan 2012 07:34:06 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 10C928FC14 for ; Sat, 21 Jan 2012 07:34:02 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id q0L7Y2cK090006; Sat, 21 Jan 2012 07:34:02 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.119] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id 6ttvc77xfeta54w2ntfpve74ua; Sat, 21 Jan 2012 07:34:02 +0000 (UTC) (envelope-from tim@kientzle.com) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Tim Kientzle In-Reply-To: Date: Fri, 20 Jan 2012 23:34:00 -0800 Content-Transfer-Encoding: 7bit Message-Id: References: <23CB6C35-9450-40BA-9FA3-37C44B328CA8@freebsd.org> <8042D895-3B3D-431E-ADCC-A150BDC838ED@kientzle.com> <7E53112E-DE29-4145-B597-D39AA77252C5@kientzle.com> To: arm@FreeBSD.org X-Mailer: Apple Mail (2.1251.1) Cc: Mark Murray Subject: Re: FreeBSD and BeagleBone X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jan 2012 07:34:06 -0000 On Jan 20, 2012, at 7:26 AM, Mark Murray wrote: >> For the moment, I'm more curious about just how far I can push this >> using FreeBSD tools only. > > I've locally updated cross-(binutils|gcc|gdb) to the latest stable > versions, and they seem to work really well for u-boot, OpenPilot and a > couple of other things. Warner's pointer about "make xdev" helped a lot. $ cd /usr/src && make xdev XDEV=arm XDEV_ARCH=arm Then U-boot almost builds with $ cd ~/u-boot $ gmake CROSS_COMPILE=arm-freebsd- am335x_evm_config $ gmake CROSS_COMPILE=arm-freebsd- To actually get it to build, I've had to make two changes to U-Boot sources: * In config.mk, remove "-nostdinc" from CPPFLAGS * In Makefile, add /usr/arm-freebsd/usr/lib/libc.a to PLATFORM_LIBS The first fixes missing stddef.h, stdarg.h headers. (I'm not sure why the -nostdinc works on Linux.) The second is needed to resolve __umodsi3, __udivsi3, etc, functions. (These might be defined in libgcc on Linux, and there's some logic here to try to locate libgcc.) With these, I've been able to rebuild u-boot for the BeagleBone from TI's sources to add the "bootelf" command. (The same changes seem to allow the current source from denx.de to build on FreeBSD.) But ubldr still won't run: U-Boot# fatload mmc 0 0x80008000 ubldr reading ubldr 232591 bytes read U-Boot# bootelf 0x80008000 Anyone else used U-Boot to run ubldr on Arm? Tim