- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Now after I boot uclinux I use the command mknod to create my "/dev/name(device)" to control my hardware. Also I have done a script to do it when the system's boot, but I would like to know if there is a command that creates this virtual folder when I load my device driver, some command that I can integrate inside my modul. At first I used the command "device_create" but It didn't go, maby I am wrong and I can't do this inside my module to create the folder in /dev associating the major number. ThanksLink Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can create a nod with the help of the romfs_list in ~/nios2-linux/uClinux-dist/vendors/Altera/nios2/romfs_list
just add it to the list- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the answer but I know it. In this way "/dev/driver" is always built, I ask for a command or something thats makes "dev/driver" appear at the same time when I do an insmod of the driver.
Lot of thanks anyway.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may check the "mdev" of busybox, which is similar to udev in creating dev nodes on the fly.
- Hippo- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This is what I was looking for, thanks for the answer. I have tested the command mdev-s in the terminal, but I would like that It do it automatic when I insert a module. I have read the file “mdev.txt”, as I understand I have to introduce two lines of code(1- About hotplugging,2-mdev) in the init script( For me /etc/rc). The problem is when I recompiled to make the zImage again, lines of code that I have introduced were erased. I don't know if it is the correct "init script" or if I have to change something in menuconfig to preserve the code that I have introduced. Thanks a lot.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
There is a post in Nioswiki answering my question. Thanks- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the Kernel is configured appropriately, you can dynamically create a device note in your module's init code using alloc_chrdev_region().
-Michael
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page