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 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?
Don't even think about it. At the time your driver is probed/attached, there is no filesystems mounted yet. Best suggestion is to use an ioctl to download the data from userland. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [EMAIL PROTECTED] | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

