0

I am using Petalinux, built with Yocto SDK. I want to automatically install my kernel module and make the devices available in /dev/*.

With KERNEL_MODULE_AUTOLOAD+="modulename" I can see the appropriate entries in /etc/modules-load.d/ as well as entries in /sys/class/misc/** , but not in /dev/*. Is there something I am missing?

gavenant
  • 453
  • 7
  • 26
  • Does your kernel module actually create device nodes automatically? – Anders Feb 01 '17 at 09:46
  • Fixed Typo. If I understand correctly, I create a miscdevice in my module. Previously it worked fine if I installed it to /etc/modules/, but with the new Yocto structure I can't seem to get it right. – gavenant Feb 01 '17 at 10:21
  • 1
    Well, the structure of Yocto has nothing to do with the creation of device nodes. Either your driver does that for you (upon loading / probing), or you had some script that made them earlier. As long as your module has been loaded upon boot, you've got `KERNEL_MODULE_AUTOLOAD` correctly. If the module gets loaded, but you're not getting any device nodes automatically (and you got that before) you'll need to investigate what has changed in your system. (Versions of kernel and eg mdev/udev etc). – Anders Feb 02 '17 at 11:00
  • Thanks, the mdev init.d script changed. Using the previous mdev init.d script automatically creates the device nodes :) – gavenant Feb 02 '17 at 12:00

1 Answers1

1

Well, the structure of Yocto has nothing to do with the creation of device nodes. Either your driver does that for you (upon loading / probing), or you had some script that made them earlier. As long as your module has been loaded upon boot, you've got KERNEL_MODULE_AUTOLOAD correctly. If the module gets loaded, but you're not getting any device nodes automatically (and you got that before) you'll need to investigate what has changed in your system. (Versions of kernel and eg mdev/udev etc)

Anders
  • 8,541
  • 1
  • 27
  • 34