Re: How to create the nodes automatically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Srinivas G. wrote:
> Dear All,
> 
> I have developed a simple character driver for accessing the custom PCI
> board in Fedora Core 3. It is working fine. I am creating the device
> nodes manually using the mknod command after inserting my module into
> the kernel space. But when I restart the system the nodes are not there.
> But the module is present. I have added the MODULE_DEVICE_TABLE in my
> module for loading it at boot time. I have read about the
> MODULE_DEVICE_TABLE in LDD3. It will add the module name to the
> modules.pcimap and modules.dep file. 
> 
> My question is: 
> Is there any way to create the nodes automatically after restarting the
> system if the module exists?
> 
> I have heard about devfs. But I did not know about it.
> Could any one please respond to my question?
> 
> Thanks in advance. 
> 
> Regards,
> Srinivas G
> 
You will need to write a udev rule that create the /dev entries
when it sees the hardware. You could create a static rule that
creates them every time the system boots, but a better way would
be to have them created when the module is loaded.

See http://fedora.redhat.com/docs/udev/ for more information about
udev and links about writing rules.

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux