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 in kernel > space. Really. > > Can it be done? If so, how? open() and read() are obviously in libc > which rules them out. Do I have to write my own in assembler?
The way this is usually done is by having the driver implement some interface (e. g. an ioctl) through which a user-mode utility can download the data to the hardware. Have the utility run at boot along with all other boot-time stuff, i. e. /etc/rc*. (Anecdote: I knew an Ultrix system years ago with a PXG (IIRC) accelerated graphics adapter that needed a firmware download at boot time. At one time the firmware file, or the dowload gizmo, somehow suffered bit rot -- which resulted in some really bizarre glitches in the graphics rendering...) Magnus To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

