Re: read a file from a driver

2002-04-11 Thread Brian Somers
There's an example of how to do this in the ``digi'' driver. It loads it's firmware module on-the-fly (if it can) and dumps it afterwards. As you can see, this saves a bunch of runtime space (digi is the base driver, digi_* are the firmware modules): $ ls -l /boot/kernel/digi* -r-xr-xr-x 1

Re: read a file from a driver

2002-04-05 Thread Michael Smith
For drivers which must be active in the boot path, it is generally necessary to embed the firmware in the driver as data. This is what FreeBSD does for the Adaptec SCSI drivers. For drivers that need to be active after boot time, but before the mi_startup() is complete, you can load the

Re: read a file from a driver

2002-04-05 Thread Terry Lambert
Michael Smith wrote: For drivers which must be active in the boot path, it is generally necessary to embed the firmware in the driver as data. This is what FreeBSD does for the Adaptec SCSI drivers. For drivers that need to be active after boot time, but before the mi_startup() is

read a file from a driver

2002-04-03 Thread Kreider, Carl
I am working on an embedded project running FreeBSD, and my driver for our custom card needs to load an FPGA with code. I know I can compile the code in as data, but for ease of development, I would rather fetch the FPGA code from a file. With a driver in kernel space. Really. Can it be done?

Re: read a file from a driver

2002-04-03 Thread Poul-Henning Kamp
In message [EMAIL PROTECTED], Kreider, Carl write s: I am working on an embedded project running FreeBSD, and my driver for our custom card needs to load an FPGA with code. I know I can compile the code in as data, but for ease of development, I would rather fetch the FPGA code from a file. With

Re: read a file from a driver

2002-04-03 Thread Magnus B{ckstr|m
On Wed, 3 Apr 2002, Kreider, Carl wrote: I am working on an embedded project running FreeBSD, and my driver for our custom card needs to load an FPGA with code. I know I can compile the code in as data, but for ease of development, I would rather fetch the FPGA code from a file. With a driver

Re: read a file from a driver

2002-04-03 Thread John Baldwin
On 03-Apr-2002 Poul-Henning Kamp wrote: In message [EMAIL PROTECTED], Kreider, Carl write s: I am working on an embedded project running FreeBSD, and my driver for our custom card needs to load an FPGA with code. I know I can compile the code in as data, but for ease of development, I would

Re: read a file from a driver

2002-04-03 Thread Julian Elischer
generally the answer is You can't do that BUT you could make a loadable module with the firmware, and load both the module and the driver before booting from the boot blocks.. then you can unload the firmware module after booting (or whenever) On Wed, 3 Apr 2002, Kreider, Carl wrote: I

Re: read a file from a driver

2002-04-03 Thread Terry Lambert
Kreider, Carl wrote: I am working on an embedded project running FreeBSD, and my driver for our custom card needs to load an FPGA with code. I know I can compile the code in as data, but for ease of development, I would rather fetch the FPGA code from a file. With a driver in kernel space.

Re: read a file from a driver

2002-04-03 Thread David O'Brien
On Wed, Apr 03, 2002 at 10:44:17AM -0500, John Baldwin wrote: Or load the firmware using kldload or from the loader using a type string similar to the way we do MFS root filesystems. Or similar to the ISP (Qlogic SCSI) firmware. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe

Re: read a file from a driver

2002-04-03 Thread M. Warner Losh
In message: [EMAIL PROTECTED] Poul-Henning Kamp [EMAIL PROTECTED] writes: : In message [EMAIL PROTECTED], Kreider, Carl write : s: : : I am working on an embedded project running FreeBSD, and my driver : for our custom card needs to load an FPGA with code. I know I can : compile the