Commands not sticking with reboot Beaglebone AI-64

Hello guys,

First thanks a lot for the Forum posts, I have been able to enable SPI1 on my BB AI-64. Few things I noticed on the process. Maybe there is an alternate way to do this. Please let me know.

  • Every time I boot the BB AI-64 the spidev module does not automatically gets loaded. Even if I run “sudo modprobe spidev”, on the next reboot it disappears. Is there a way to make it stick permanently? As far as I know modprobe used to do it.

  • On the same context I need to change permission of the /dev.spidev10.0 every time I boot even if I run the command “sudo chmod -Rf +777 /dev/”, it does not stick on reboot. I have to enable the permissions every single time.

Can anyone give me a solution to this problem?

Thanks,

  1. modprobe is just a command to load a kernel modules, but it won’t make it permanent. You will need to add to either /etc/modules or /etc/modules-load.d (forget which one debian uses)

  2. Best solution for this is to create a custom udev rule in /etc/udev/rules.d - you can search around for the right format of these rules, but essentially they function as a “pattern / action” ruleset. So when it sees “spidev” device appear it will run the action of setting chmod on that device.

Thanks @BarryBeagle I’ll give it a try and see if it works.

Hi @BarryBeagle,

Your solutions worked. These are the things I did.

  • Added “spidev” to the file /etc/modules-load.d/modules.conf
  • Created file /etc/udev/rules.d/spi-noroot.rules
  • Added the line "KERNEL==“spidev*”, MODE:=“0777” saved.
  • Rebooted. Everything sticks now.
2 Likes