Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8901865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:28:02+00:00 2026-06-15T01:28:02+00:00

I have written a simple UART serial driver in embedded Linux running busybox with

  • 0

I have written a simple UART serial driver in embedded Linux running busybox with mdev rules. I have provided .dev_name as “ttyC2C” in my driver code.

static struct uart_driver serial_omap_reg = {
   .owner      = THIS_MODULE,
   .driver_name   = "Omap-C2C-Serial",
   .dev_name   = "ttyC2C",
   .nr      = OMAP_MAX_HSUART_PORTS,
   .cons    = NULL,
};

However the node is getting created in

./sys/devices/platform/omap_c2c_uart.0/tty/ttyC2C0
./sys/class/tty/ttyC2C0

/ # ls -l ./sys/class/tty/ttyC2C0
lrwxrwxrwx    1 root     0                0 Jan  1 00:14 ./sys/class/tty/ttyC2C0 -> ../../devices/platform/omap_c2c_uart.0/tty/ttyC2C0

/ # ls -l ./sys/devices/platform/omap_c2c_uart.0/tty/ttyC2C0
-r--r--r--    1 root     0             4096 Jan  1 00:14 dev
lrwxrwxrwx    1 root     0                0 Jan  1 00:14 device -> ../../../omap_c2c_uart.0
drwxr-xr-x    2 root     0                0 Jan  1 00:14 power
lrwxrwxrwx    1 root     0                0 Jan  1 00:14 subsystem -> ../../../../../class/tty
-rw-r--r--    1 root     0             4096 Jan  1 00:14 uevent
/ #

The mdev rules for tty are:

tty 0:5 0666
tty.* 0:0 0620

How to get device node as /dev/ttyC2C ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:28:03+00:00Added an answer on June 15, 2026 at 1:28 am

    You are confusing two things. The sysfs nodes you are seeing are indeed maintained by the kernel based on the kobject hierarchy. However device nodes are entirely a user space problem and can exist anywhere (although by convention are under /dev).

    So by hand you would first find the major:minor numbers:

    cat /sys/class/tty/ttyC2C0/dev
    

    And then:

    mknod /dev/ttyC2C0 c ${MAJOR} ${MINOR}
    

    However as you have already indicated you are using the fork of udev, mdev to handle the user space creation of device nodes. However the matching rules look odd to me. I assume mdev has the equivalent of udevadm which should help you write the matching rules. For example my USB tty driver can be queried like this:

    udevadm info -a -p /sys/class/tty/ttyUSB0
    

    And looking at the tree produced I can see a list of udev attributes which I could use to match. So in my case:

    KERNEL=="ttyUSB0", DRIVERS=="ftdi_sio", NAME="ttyUSB0"
    

    Would be enough to match (although my distro has a lot more complex matching rules to deal with dynamic setups).

    I’m guessing but I suspect the mapping rule you want would look more like:

    KERNEL=="ttyC2C", NAME="ttyC2C"
    

    Although you might need a bit more to ensure you get device nodes created for each port (minor number?).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a simple web Application which is running(on Tomcat Server) fine on
I am very new to JAVA. I have written simple program (in Linux -VIM
I have written simple code to get content from xml file to php. $xml
I have written a simple automation script for deploying and restarting my twisted application
I have written a simple memory game. You click on one of 16 cards
I have written a simple Java dispatcher with a daemon thread to handle the
I have written a simple WCF service that accepts and stores messages. It works
I have written a simple CRUD form which has one select list. However the
I have written a simple C++ shell program to parse large XML files and
I have written a simple jQuery.ajax function which loads a user control from the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.