From owner-freebsd-arm@FreeBSD.ORG Sat Apr 20 17:49:56 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id ED13473; Sat, 20 Apr 2013 17:49:56 +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 B296D81E; Sat, 20 Apr 2013 17:49:56 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id r3KHnnh9097847; Sat, 20 Apr 2013 17:49:49 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.123] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id hb6yxqcdyhirrbj4hv778q67u6; Sat, 20 Apr 2013 17:49:49 +0000 (UTC) (envelope-from tim@kientzle.com) Subject: Re: Plan for commiting Xilinx Zynq support to HEAD Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Tim Kientzle In-Reply-To: <51716D69.2090808@sbcglobal.net> Date: Sat, 20 Apr 2013 10:49:49 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <88FE6A2E-DE39-4618-9B29-D721B8204EE7@kientzle.com> References: <20130416212535.GE16132@FreeBSD.org> <516EBE26.60505@sbcglobal.net> <20130418174501.GF16132@FreeBSD.org> <6E0C620F-D46C-4D01-86AE-0F364C67500F@bsdimp.com> <40A37850-F9A5-44A1-8379-2ED53B0D62E0@kientzle.com> <51716D69.2090808@sbcglobal.net> To: Thomas Skibo X-Mailer: Apple Mail (2.1283) Cc: freebsd-arm@freebsd.org, "Wojciech A. Koszek" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 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, 20 Apr 2013 17:49:57 -0000 On Apr 19, 2013, at 9:14 AM, Thomas Skibo wrote: > On 4/18/13 10:03 PM, Tim Kientzle wrote: >>=20 >> On Apr 18, 2013, at 10:49 AM, Warner Losh wrote: >>=20 >>>=20 >>> We do need it documented on the wiki regardless of the automation we = put into place. The problem with scripts is that accrue arcane knowledge = that later becomes hard to reconstruct. >>=20 >> Should be in the Wiki, yes. >=20 > I think something needs to go into the Wiki. I think I need to = describe the process of booting on Zynq and how I build u-boot, = BOOT.BIN, ubldr, etc. Having documented this myself for a bunch of boards now, here are some = suggestions: For U-Boot: * Key piece of information is where you got the sources from. There are a lot of U-Boot repos out there with different board support. Specifying a particular tag helps a lot. If the upstream changes quickly, setting up your own clone on github may be the only practical way to provide stable source. * What toolchain you built with? I've been building with FreeBSD's xdev toolchain. It works well but requires a few standard patches to build U-Boot on FreeBSD/ARM: =3D -print-file-name=3Dinclude is used in config.mk but is broken on FreeBSD. I'm trying to get that fixed. The workaround is to patch it to hardcode /usr/include =3D Add -lc to PLATFORM_LIBS since FreeBSD/ARM has some arithmetic support routines in the wrong place (they should be in libcompiler_rt but are only in libc). =3D Some U-Boot forks now have GNU sed dependencies. * Finally, the patches for the board configuration itself. (Enabling API and ELF loader, for example. Rewriting the bootcmd.) Hopefully, the above is all you'll need. For ubldr: Apart from the usual buildenv juggling, you shouldn't need anything = special other than UBLDR_LOADADDR=3D If you do, let us know. A few of us have been trying to make ubldr more generic with an eye towards eventually having a single ubldr binary that runs "everywhere." Tim