Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh
#
# Early-boot LED state. The stock firmware's own hardware map names GPIO10 the
# red "power" LED and GPIO25 the blue "net" LED, both active high. Light the
# power LED as soon as init runs and keep the net LED off; S99leds lights the
# net LED once the camera is up. led_disabled=1 keeps both dark from the start,
# not only once S99leds runs. rcK stops this before S99leds, so leave the state
# there.

case "$1" in
start | "")
if [ "$(fw_printenv -n led_disabled 2>/dev/null)" = "1" ]; then
gpio clear 10; gpio clear 25
else
gpio set 10; gpio clear 25
fi
;;
stop)
;;
esac

exit 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh
#
# Late-boot LED state: the red power LED stays on and the blue net LED comes on
# once boot has reached its end (after networking), so a lit blue LED means the
# camera is up. Both go off when led_disabled=1, as on other OpenIPC cameras,
# and on shutdown.

case "$1" in
start | "")
if [ "$(fw_printenv -n led_disabled 2>/dev/null)" = "1" ]; then
gpio clear 10; gpio clear 25
else
gpio set 10; gpio set 25
fi
;;
stop)
gpio clear 10; gpio clear 25
;;
esac

exit 0
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/bin/sh

### set leds power off ###
gpio set 10
gpio set 25
# Status LEDs (red power GPIO10, blue net GPIO25) are driven by S01leds and
# S99leds now, not here.

### sd card power en ###
devmem 0x100c0058 32 0
Expand Down
Loading