Unexporting Device Tree Overlays

58 views
Skip to first unread message

Garrett Higgins

unread,
Aug 22, 2018, 6:17:40 PM8/22/18
to BeagleBoard
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$

Tarmo Kuuse

unread,
Aug 23, 2018, 4:17:08 AM8/23/18
to BeagleBoard
Hi Garrett,
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: https://github.com/cdsteinkuehler/beaglebone-universal-io 

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>

--
Kind regards,
Tarmo Kuuse
Reply all
Reply to author
Forward
0 new messages