LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Device node creation (https://www.linuxquestions.org/questions/linux-newbie-8/device-node-creation-827118/)

greplinux 08-18-2010 09:34 PM

Device node creation
 
Hi,

I am in the process of finding how a device node is created in Linux. Apart from udev, is there any way, to achieve this. Like the kernel or its subsystems managing a device file.

I am planning to look through the kernel source. If anyone has experience in this , please guide me through.

Thanks,

Simon Bridge 08-18-2010 09:58 PM

udev is the preferred way to handle device node creation, and it is what the kernels use.
http://www.kernel.org/pub/linux/util...plug/udev.html

You are right that it does not have to be done that way - see devfs. But also see:
http://www.kernel.org/pub/linux/util.../udev_vs_devfs

The kernel source is well, but dauntingly, commented.
There is extensive documentation for newcomers too.

greplinux 08-18-2010 11:44 PM

Hi Simon Bridge,

Thank you. Is it possible to create a device node creation with out udev/devfs?

Thanks,

Simon Bridge 08-21-2010 10:55 PM

Naturally, see:

man mknod
man makedev

- this is what that second link calls "static dev". Embedded developers may want to do that on account they can exactly predict the HW and they may perceive some saving in doing so depending on the exact project. AFAICT: this is almost never done. Is there a particular problem you are trying to solve? If you just want to learn how "how a device node is created in linux" for the sake of understanding how things work, then you should be learning the udev system since that is what we actually do and there is copious up to date documentation available.

greplinux 08-23-2010 02:19 AM

Simon,

Thanks again.

What I am looking for is, some device nodes are getting named from the kernel itself rather than depending on udev eg:ttyACM. I browsed through the kernel source for it and found where they are deciding it.

Thanks for you directions.


All times are GMT -5. The time now is 02:27 PM.