LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-18-2010, 09:34 PM   #1
greplinux
Member
 
Registered: Jun 2007
Posts: 118

Rep: Reputation: 17
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,
 
Old 08-18-2010, 09:58 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.
 
1 members found this post helpful.
Old 08-18-2010, 11:44 PM   #3
greplinux
Member
 
Registered: Jun 2007
Posts: 118

Original Poster
Rep: Reputation: 17
Hi Simon Bridge,

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

Thanks,
 
Old 08-21-2010, 10:55 PM   #4
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.
 
Old 08-23-2010, 02:19 AM   #5
greplinux
Member
 
Registered: Jun 2007
Posts: 118

Original Poster
Rep: Reputation: 17
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
detect usb device insert/remove and get device node from "C" program ebinjose Linux - Embedded & Single-board computer 4 04-29-2012 08:26 AM
Creation of device node after USB insertion paldebojyoti Linux - Distributions 6 08-20-2009 06:01 AM
USB device node - where is it? moistTowelette Linux - Hardware 3 08-13-2007 11:44 AM
Creating A New Device Node/Not A Valid Block Device indienick Debian 4 07-13-2007 02:07 PM
creation of dynamic device node entry in /dev balalin Linux - Kernel 0 04-10-2007 04:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration