Use systemd-beaglebone to manage device tree overlays (capes) and initializing
GPIOs through systemd. Capes are treated as individual service units and GPIOs
are managed through files under /usr/lib/gpios.d/
.
Clone the repository or download one of the releases then make install
.
Additional capes can be enabled through systemctl:
systemctl enable bone-capemgr@BB-BONE-BACON.service
systemctl enable bone-capemgr@BB-BONE-GPS.service
GPIOs are defined in files under /usr/lib/gpios.d/
. See README.gpios for
more information. Files are sorted alphabetically before being run by
the gpio.service.
As an example, a file could be placed at /usr/lib/gpios.d/leds
:
# <pin> <direction> <value>
123 out 1
456 in
When the GPIO service starts, it would effectively execute:
echo 123 > /sys/class/gpios/export
echo out > /sys/class/gpios/gpio123/direction
echo 1 > /sys/class/gpios/gpio123/value
echo 456 > /sys/class/gpios/export
echo in > /sys/class/gpios/gpio456/direction
- Fork it (https://github.com/hashrabbit/systemd-beaglebone/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request