linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Location for Linux kernel module support files
@ 2002-09-30 15:46 Tim Moloney
  2002-10-01  0:32 ` David Gibson
  0 siblings, 1 reply; 9+ messages in thread
From: Tim Moloney @ 2002-09-30 15:46 UTC (permalink / raw)
  To: linuxppc-dev


I have written a device driver (module) that needs a configuration
file.  Where is the standard place to put such files?

I originally put it in the same directory as the .o file but
'depmod -a' complains that it's not an ELF file.

--
Tim Moloney
ManTech Real-time Systems Laboratory
2015 Cattlemen Road                             \     /
Sarasota, FL  34232                     .________\(O)/________.
(941) 377-6775 x208                        '  '  O(.)O  '  '


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: Location for Linux kernel module support files
@ 2002-10-01 17:07 Eugene Surovegin
  2002-10-01 19:06 ` Tim Moloney
  0 siblings, 1 reply; 9+ messages in thread
From: Eugene Surovegin @ 2002-10-01 17:07 UTC (permalink / raw)
  To: linuxppc-dev


Tim,

At 07:33 AM 10/1/2002, you wrote:

>David Gibson wrote:
>
>>On Mon, Sep 30, 2002 at 11:46:22AM -0400, Tim Moloney wrote:
>>
>>>I have written a device driver (module) that needs a configuration
>>>file.  Where is the standard place to put such files?
>>
>>There isn't.  Device drivers, being part of the kernel, should not be
>>reading random files from the user's file system.  If the driver needs
>>configuration, the normal method is for userland scripts (either
>>startup or hotplug) to issue commands to poke the configuration into
>>the driver at runtime.
>>
>>>I originally put it in the same directory as the .o file but
>>>'depmod -a' complains that it's not an ELF file.
>
>The file the device driver needs is an FPGA program file that
>- is data that I don't want compiled into the driver wasting space
>- will initially be specified when the driver is loaded via rc script
>- that can be reloaded by a program to customize it for a particular
>   application
>
>I know that this isn't a a typical situation and I have only seen one
>other device driver like this.  It is a 1553 driver that creates a
>/usr/lib/<module_name> directory for its configuration file.  Is there
>a better location?

For similar situation (I also need to load FPGA on our custom board) I just
coded
a simple "char" device (e.g. /dev/fpga).
User mode program or simple script writes into this device and
the driver sends this data to the PLD chip.

For debugging I use something like
     # cp fpga.bin /dev/fpga

With this design driver itself doesn't have any knowledge about particular
location of
the FPGA program.

Thanks,

  Eugene Surovegin <mailto:ebs@innocent.com>


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2002-10-02  8:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-30 15:46 Location for Linux kernel module support files Tim Moloney
2002-10-01  0:32 ` David Gibson
2002-10-01 14:33   ` Tim Moloney
2002-10-01 16:25     ` Geert Uytterhoeven
  -- strict thread matches above, loose matches on Subject: below --
2002-10-01 17:07 Eugene Surovegin
2002-10-01 19:06 ` Tim Moloney
2002-10-02  3:25   ` Michael Heironimus
2002-10-02  7:54   ` Ethan Benson
2002-10-02  8:06   ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).