diff --git a/devices/hi3516ev300_ultimate_rostelecom-ipc8232swc-we/general/overlay/etc/init.d/S01leds b/devices/hi3516ev300_ultimate_rostelecom-ipc8232swc-we/general/overlay/etc/init.d/S01leds new file mode 100755 index 000000000..4d41f3fa1 --- /dev/null +++ b/devices/hi3516ev300_ultimate_rostelecom-ipc8232swc-we/general/overlay/etc/init.d/S01leds @@ -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 diff --git a/devices/hi3516ev300_ultimate_rostelecom-ipc8232swc-we/general/overlay/etc/init.d/S99leds b/devices/hi3516ev300_ultimate_rostelecom-ipc8232swc-we/general/overlay/etc/init.d/S99leds new file mode 100755 index 000000000..103e14051 --- /dev/null +++ b/devices/hi3516ev300_ultimate_rostelecom-ipc8232swc-we/general/overlay/etc/init.d/S99leds @@ -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 diff --git a/devices/hi3516ev300_ultimate_rostelecom-ipc8232swc-we/general/overlay/usr/share/openipc/muxes.sh b/devices/hi3516ev300_ultimate_rostelecom-ipc8232swc-we/general/overlay/usr/share/openipc/muxes.sh index 16cd04609..6839a3510 100644 --- a/devices/hi3516ev300_ultimate_rostelecom-ipc8232swc-we/general/overlay/usr/share/openipc/muxes.sh +++ b/devices/hi3516ev300_ultimate_rostelecom-ipc8232swc-we/general/overlay/usr/share/openipc/muxes.sh @@ -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