From owner-cvs-all@FreeBSD.ORG Wed Feb 27 16:01:23 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E746C106566B; Wed, 27 Feb 2008 16:01:23 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id A9F948FC14; Wed, 27 Feb 2008 16:01:23 +0000 (UTC) (envelope-from sam@errno.com) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m1RG1JNN017478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 27 Feb 2008 08:01:20 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <47C5894F.10301@errno.com> Date: Wed, 27 Feb 2008 08:01:19 -0800 From: Sam Leffler User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Andrew Gallatin References: <200802260302.m1Q32KOT081487@repoman.freebsd.org> <200802261133.00942.jhb@freebsd.org> <47C4A083.2050602@errno.com> <20080227090113.A48182@grasshopper.cs.duke.edu> In-Reply-To: <20080227090113.A48182@grasshopper.cs.duke.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: Kip Macy , src-committers@FreeBSD.org, cvs-all@FreeBSD.org, John Baldwin , cvs-src@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/cxgb bin2h.pl cxgb_main.c cxgb_t3fw.c cxgb_t3fw.h t3fw-5.0.0.bin.gz.uu src/sys/modules/cxgb Makefile src/sys/modules/cxgb/cxgb Makefile src/sys/modules/cxgb/cxgb_t3fw Makefile src/sys/conf NOTES files X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2008 16:01:24 -0000 Andrew Gallatin wrote: > Sam Leffler [sam@errno.com] wrote: > >> Huh? What does "static linking" mean? If you're looking for an example >> of a firmware image being embedded in a kernel look at the npe firmware >> used by xscale. >> > > Kip, > > Before spending time on this, be warned that I tried this for mxge > last year, and I gave up because it was such a headache. The final > straw was that building the firmware into a .fwo file via a files file > rule doesn't work on platforms like ia64 due some toolchain problems. > Specifically, there was no way to get the constant-gp flag set on an > ld -b binary image, which caused the final kernel link command to > explode. > > Rather than use the .fwo method, I committed some .c shims (see > dev/mxge/mxge_eth_z8e.c) which just #include my firmware header files. > This avoids the linking problems, and turns out to be much, much > easier to work with than the fw_stub files file method. > My recollection from working with you on this was that the issue was ia64, not that it was hard. Given working examples to cut&paste I find this argument weak. As to ia64, if it doesn't support our build mechanisms then it should not be part of make universe. When Kip and I talked about why he did stuff w/o using fw_stub.awk it turned out he wasn't aware of existing examples. This technique is documented in firmware(9) and has worked fine for me (but of course I came up with it). The bottom line however is that I don't particularly care how firmware images get built so long as drivers use firmware(9) to load them. I've dealt with firmware loading on a variety of non-freebsd systems and always miss it. Sam