From owner-freebsd-hackers Fri Mar 17 21: 4:52 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 140EA37B9FD for ; Fri, 17 Mar 2000 21:04:50 -0800 (PST) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id WAA05623; Fri, 17 Mar 2000 22:04:18 -0700 (MST) (envelope-from ken) Date: Fri, 17 Mar 2000 22:04:18 -0700 From: "Kenneth D. Merry" To: "Matthew N. Dodd" Cc: "Gary T. Corcoran" , Alfred Perlstein , freebsd-hackers@FreeBSD.ORG Subject: Re: How to read a file from a device driver? Message-ID: <20000317220418.A5552@panzer.kdm.org> References: <38D3085D.37F31443@home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from winter@jurai.net on Fri, Mar 17, 2000 at 11:59:28PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Mar 17, 2000 at 23:59:28 -0500, Matthew N. Dodd wrote: > On Fri, 17 Mar 2000, Gary T. Corcoran wrote: > > I'm trying to initialize a network device, and I'm trying to download > > code *into* my device from some binary system files. There is no > > "user space" or user process, for that matter, to deal with at this > > point. I just want to (at this step) open a file(s) directly from my > > device driver, read the file(s), and download the relevant parts to my > > device. > > There isn't really any clean way of doing this so most drivers that need > to load firmware usually compile them in. :/ True enough. The Alteon Tigon driver (sys/pci/if_ti.c) decides which one of its firmware images (sys/pci/{ti_fw,ti_fw2}.h) based on the chip revision. So that's one possible example to look at. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message