These days with the new kernels > 2.4.10 you use Udev to create the device node in /dev.
During compile time, the identity of the supported dev is generated as part of the driver module object. Have a look at ../drivers/net/tulip/xircom_cb.c for example. The snippet:
<code>
static struct pci_device_id xircom_pci_table[] = {
{0x115d, 0x0003, PCI_ANY_ID, PCI_ANY_ID,},
{0.....
/* Mark the device table */
MODULE_DEVICE_TABLE(pci, xircom_pci_table);
</code>
This declares that the driver can support any card having a PCI vendor ID of 0x115D, and a PCI device ID of 0x0003.
When you install the driver, the depmod utility looks insde the module image and dicphers the ID's present in the table.
It then add an entry into /lib/modules/..kernel vers../modules.alias.
So, use Udev rules and modprobe information to generate a device node. It is the only supported way of programmaticly adding device nodes.
You'll find more than enough information under Udev.
|