brcm2708: add board detection and LED support
[openwrt/openwrt.git] / target / linux / brcm2708 / base-files / etc / diag.sh
diff --git a/target/linux/brcm2708/base-files/etc/diag.sh b/target/linux/brcm2708/base-files/etc/diag.sh
new file mode 100644 (file)
index 0000000..55e68b1
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+
+. /lib/functions/leds.sh
+
+set_state() {
+       status_led="led0"
+
+       case "$1" in
+       preinit)
+               status_led_blink_preinit
+               ;;
+       failsafe)
+               status_led_blink_failsafe
+               ;;
+       preinit_regular)
+               status_led_blink_preinit_regular
+               ;;
+       done)
+               status_led_on
+               ;;
+       esac
+}