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

后端 未结 6 1330
南旧
南旧 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条回答
  •  -上瘾入骨i
    2020-12-06 02:06

    First you have to use : sudo mknod /dev/devicename c 81 0

    It creates device file in /dev but you have to give it read/write permission. to do so,

    sudo chmod 777 /dev/devicename

    Done !!!

提交回复
热议问题