File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ description "Ensure needed UARTs are enabled"
2+ author "Hilmar Lapp <hlapp@drycafe.net>"
3+
4+ start on filesystem and runlevel [2345]
5+
6+ task
7+
8+ script
9+ if [ -z "$ARDUINO_UART" ] ; then
10+ ARDUINO_UART=1
11+ fi
12+ if [ ! -c /dev/ttyO$ARDUINO_UART ] ; then
13+ . /etc/default/rcS
14+ . /etc/environment.local
15+ if [ "$NINJA_HARDWARE_TYPE" = "BBB" ]; then
16+ capemgr=/sys/devices/bone_capemgr.9
17+ if [ ! -d $capemgr ] ; then
18+ capemgr=/sys/devices/platform/bone_capemgr
19+ fi
20+ /bin/echo BB-UART$ARDUINO_UART > $capemgr/slots
21+ fi
22+ fi
23+ end script
24+
25+ pre-start script
26+ if [ -f /etc/environment.local ]; then
27+ . /etc/environment.local
28+ fi
29+ if [ -z "$NINJA_HARDWARE_TYPE" ]; then
30+ /opt/utilities/bin/detect-hw-os
31+ . /etc/environment.local
32+ fi
33+ end script
You can’t perform that action at this time.
0 commit comments