How to create a device in /dev automatically upon loading of the kernel module for a device driver?

后端 未结 6 1336
南旧
南旧 2020-12-06 01:26

I am attempting to develop Linux device drivers and as my first attempt I am trying to develop a char device driver that has the following file options,

st         


        
6条回答
  •  天命终不由人
    2020-12-06 01:57

    I could see entries within /dev after creating node by running following command at console.

    sudo mknod -m 0666 /dev/msio c 22 0

    The user was not root, so I had to use sudo. My entry name was msio, a character device with major and minor number 22, 0 respectively.

    I will let you know if this can be achieved programatically.

提交回复
热议问题