Unexporting Device Tree Overlays

hi, I am trying to activate all PWM pins so that I have a total of 8 to use. When I check my slots file, I have a device tree overlay that I am trying to export, but permission is denied. Can anyone help me? see below

debian@beaglebone:/lib/firmware$ cat $SLOTS
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,cape-universaln
debian@beaglebone:/lib/firmware$ echo -4 > /slots
-bash: /slots: Permission denied
debian@beaglebone:/lib/firmware$

Hi Garrett,

hi, I am trying to activate all PWM pins so that I have a total of 8 to use. When I check my slots file, I have a device tree overlay that I am trying to export, but permission is denied. Can anyone help me? see below

debian@beaglebone:/lib/firmware$ cat $SLOTS
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,cape-universaln
debian@beaglebone:/lib/firmware$ echo -4 > /slots
-bash: /slots: Permission denied
debian@beaglebone:/lib/firmware$

You’ll want to do any reconfiguration of your system under permissions of the root user. Usually that involves prepending a command with “sudo”, but it doesn’t work with commands that write stuff to files using output forwarding (e.g. “$ echo -4 > /slots”).

In this case I’d suggest switching to root shell with the following command. You’ll likely be asked for the password of user “debian”:
$ sudo su -

After this all commands will execute with root permissions.

As for the specific problem you’re trying to solve, you’re currently on universal capes: GitHub - cdsteinkuehler/beaglebone-universal-io: Device tree overlay and support scripts for using most available hardware I/O on the BeagleBone without editing dts files or rebuilding the kernel

Would it perhaps be easier to exploit those and enable your PWM-s with the config-pin script? Unfortunately, I don’t know if enabling all of your desired PWM-s are supported there. Remember, you need root permissions.

config-pin P8.07 <whatever_the_PWM_command_is>