In order to use the boot button as marked here 
<http://elinux.org/File:CONN_REVA5A.jpg>

1. Get the current lxqt image from Debian_Image_Testing_Snapshots 
<http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Debian_Image_Testing_Snapshots>
 , 
and use the explination on that page to install it on your board.

2. create this file to issue the setup on boot using systemd:
The file is /lib/systemd/system/button_gpio.service


[Unit]
Description=Setup on-board button GPIO
Requires=capemgr.service
After=capemgr.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/root/button_gpio.sh

[Install]
WantedBy=multi-user.target

3. Now create the /root/button_gpio.sh script to do the setup:

#!/bin/sh
grep -q univ-all /sys/devices/platform/bone_capemgr/slots || config-pin 
overlay univ-all
[ -f '/sys/class/gpio/gpio72' ] || echo 72 >/sys/class/gpio/export
echo in >/sys/class/gpio/gpio72/direction
/usr/local/bin/config-pin P8_43 in+

now make this script executable:
$ chmod +x /root/button_gpio.sh

Now you can click the button and see this file change:
$ cat /sys/class/gpio/gpio72/value

Good luck
Niv Gal Waizer

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to