01_leds 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2014-2016 OpenWrt.org
  4. # Copyright (C) 2016 LEDE-Project.org
  5. #
  6. . /lib/functions/uci-defaults.sh
  7. . /lib/mvebu.sh
  8. board_config_update
  9. board=$(mvebu_board_name)
  10. case "$board" in
  11. armada-385-linksys-caiman)
  12. ucidef_set_led_netdev "wan" "WAN" "pca963x:caiman:white:wan" "eth1"
  13. ucidef_set_led_usbport "usb1" "USB 1" "pca963x:caiman:white:usb2" "usb1-port1"
  14. ucidef_set_led_usbport "usb2" "USB 2" "pca963x:caiman:white:usb3_1" "usb2-port1" "usb3-port1"
  15. ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:caiman:white:usb3_2" "usb3-port1"
  16. ;;
  17. armada-385-linksys-cobra)
  18. ucidef_set_led_netdev "wan" "WAN" "pca963x:cobra:white:wan" "eth1"
  19. ucidef_set_led_usbport "usb1" "USB 1" "pca963x:cobra:white:usb2" "usb1-port1"
  20. ucidef_set_led_usbport "usb2" "USB 2" "pca963x:cobra:white:usb3_1" "usb2-port1" "usb3-port1"
  21. ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:cobra:white:usb3_2" "usb3-port1"
  22. ;;
  23. armada-385-linksys-rango)
  24. ucidef_set_led_netdev "wan" "WAN" "pca963x:rango:white:wan" "eth1"
  25. ucidef_set_led_usbport "usb1" "USB 1" "pca963x:rango:white:usb2" "usb1-port1"
  26. ucidef_set_led_usbport "usb2" "USB 2" "pca963x:rango:white:usb3_1" "usb2-port1" "usb3-port1"
  27. ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:rango:white:usb3_2" "usb3-port1"
  28. ;;
  29. armada-385-linksys-shelby)
  30. ucidef_set_led_netdev "wan" "WAN" "pca963x:shelby:white:wan" "eth1"
  31. ucidef_set_led_usbport "usb1" "USB 1" "pca963x:shelby:white:usb2" "usb1-port1"
  32. ucidef_set_led_usbport "usb2" "USB 2" "pca963x:shelby:white:usb3_1" "usb2-port1" "usb3-port1"
  33. ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:shelby:white:usb3_2" "usb3-port1"
  34. ;;
  35. armada-xp-linksys-mamba)
  36. ucidef_set_led_netdev "wan" "WAN" "mamba:white:wan" "eth1"
  37. ucidef_set_led_usbport "usb1" "USB 1" "mamba:white:usb2" "usb1-port1"
  38. ucidef_set_led_usbport "usb2" "USB 2" "mamba:white:usb3_1" "usb2-port1" "usb3-port1"
  39. ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "mamba:white:usb3_2" "usb3-port2"
  40. ;;
  41. esac
  42. board_config_flush
  43. exit 0