bcm27xx: add new bcm2712 subtarget
[openwrt/staging/svanheule.git] / target / linux / bcm27xx / base-files / etc / diag.sh
1 #!/bin/sh
2 # Copyright (C) 2015-2016 OpenWrt.org
3 # Copyright (C) 2017 LEDE project
4
5 . /lib/functions.sh
6 . /lib/functions/leds.sh
7
8 set_state() {
9 case "$(board_name)" in
10 raspberrypi,2-model-b |\
11 raspberrypi,2-model-b-rev2 |\
12 raspberrypi,3-model-b |\
13 raspberrypi,3-model-b-plus |\
14 raspberrypi,400 |\
15 raspberrypi,4-compute-module |\
16 raspberrypi,4-model-b |\
17 raspberrypi,5-model-b |\
18 raspberrypi,model-b-plus)
19 status_led="led1"
20 ;;
21 raspberrypi,3-compute-module |\
22 raspberrypi,model-b |\
23 raspberrypi,model-zero |\
24 raspberrypi,model-zero-2 |\
25 raspberrypi,model-zero-w)
26 status_led="led0"
27 ;;
28 esac
29
30 case "$1" in
31 preinit)
32 status_led_blink_preinit
33 ;;
34 failsafe)
35 status_led_blink_failsafe
36 ;;
37 preinit_regular)
38 status_led_blink_preinit_regular
39 ;;
40 done)
41 status_led_on
42 ;;
43 esac
44 }