Date: Sat, 20 Apr 2013 10:49:49 -0700 From: Tim Kientzle <tim@kientzle.com> To: Thomas Skibo <ThomasSkibo@sbcglobal.net> Cc: freebsd-arm@freebsd.org, "Wojciech A. Koszek" <wkoszek@freebsd.org> Subject: Re: Plan for commiting Xilinx Zynq support to HEAD Message-ID: <88FE6A2E-DE39-4618-9B29-D721B8204EE7@kientzle.com> In-Reply-To: <51716D69.2090808@sbcglobal.net> References: <20130416212535.GE16132@FreeBSD.org> <CAJ-VmokBrj70yMyZ5prB_KAW7SPXCiRfHpZ-PJvjbsNkYxhDcQ@mail.gmail.com> <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>
next in thread | previous in thread | raw e-mail | index | archive | help
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<load address> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?88FE6A2E-DE39-4618-9B29-D721B8204EE7>