根据外设类型配置udev规则
主要的udev配置文件是/etc/udev/udev.confl,udev规则文件一般存放在/etc/udev/rules.d/下,以xxxx.rules命名。
适配案例:
串口设备
SUBSYSTEM=="tty", KERNEL=="tty*", OWNER="guest", MODE="0666"
USB设备
ATTRS{idVendor}=="xxxx", ATTRS{idProduct}=="xxxx", MODE="0666"
https://xpanx.com/
评论