public inbox for linux-8086@vger.kernel.org
 help / color / mirror / Atom feed
* open file in kernel model
@ 2003-05-09  5:45 JinuM
  2003-05-09  6:19 ` Riley Williams
  0 siblings, 1 reply; 4+ messages in thread
From: JinuM @ 2003-05-09  5:45 UTC (permalink / raw)
  To: linux-8086


Hi,

Can anyone help me with this simple problem.

I am trying to write a firmware loader driver. Instead of reading the
firmware as a buffer(predefined array)  we would like to read the firmware
from a file (say /root/firmware). Do we have some function which reads the
file contents in kernel mode.

-Jinu

^ permalink raw reply	[flat|nested] 4+ messages in thread
* RE: open file in kernel model
@ 2003-05-09  7:16 JinuM
  2003-05-09  7:35 ` Riley Williams
  0 siblings, 1 reply; 4+ messages in thread
From: JinuM @ 2003-05-09  7:16 UTC (permalink / raw)
  To: Riley Williams; +Cc: linux-8086

Hi Riley

[jinum]Thanx for the early reply.

Are you assuming that there is only one piece of firmware to be loaded
in the entire system, or is this driver for a specific device?

[jinum] This firmware is for a specific device.
What we plan to do is maintain the filename constant(say /home/firmware)
so if there is a change in the firmware we would overwrite this file.

[jinum]I am not sure of the leagal issue you are talking about. We want to
use it
for our device, hence it will not be under public release.

You may wish to consider such a scheme if you are working on a driver
for a particular device. From the driver's viewpoint, this basically
comes down to registering some means for a usermode program to supply
the driver with the relevant firmware. This could be an ioctl that the
usermode program can call with an open file handle as parameter, and
the driver then reads the contents of that file into the firmware, or
it could be a special node in the file system that the usermode program
writes to and the driver copies anything written to that file straight
into the firmware slot.

[jinum] we intended to load the firmware when our device is found.
We will not want a usermode application talking to driver for this.
The best solution would be to have kernel mode file functions 
equivalent to open,read,write n close.

-Jinu

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-05-09  7:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-09  5:45 open file in kernel model JinuM
2003-05-09  6:19 ` Riley Williams
  -- strict thread matches above, loose matches on Subject: below --
2003-05-09  7:16 JinuM
2003-05-09  7:35 ` Riley Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox