diff options
| author | Lorenzo Bianconi | 2025-10-26 16:46:42 +0000 |
|---|---|---|
| committer | Christian Marangi | 2025-11-10 17:20:44 +0000 |
| commit | dcced671e2a7124fe51875e87a8495109dab2f30 (patch) | |
| tree | c13527487743b69b6108b60b67b403d03f984d44 | |
| parent | 9d218f08536c02b019dcbdf50ea7a6bf80904516 (diff) | |
| download | openwrt-dcced671e2a7124fe51875e87a8495109dab2f30.tar.gz | |
airoha: Add missing board files for EN7581
Add missing leds and network board files for EN7581 SoC.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
[ drop reference to downstream 10g RFB board ]
Link: https://github.com/openwrt/openwrt/pull/20556
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 738eacb9a00dc813e0c81691f1ca757de0e01e6b)
| -rw-r--r-- | target/linux/airoha/an7581/base-files/etc/board.d/01_leds | 20 | ||||
| -rw-r--r-- | target/linux/airoha/an7581/base-files/etc/board.d/02_network | 28 |
2 files changed, 48 insertions, 0 deletions
diff --git a/target/linux/airoha/an7581/base-files/etc/board.d/01_leds b/target/linux/airoha/an7581/base-files/etc/board.d/01_leds new file mode 100644 index 0000000000..2eac5c6f15 --- /dev/null +++ b/target/linux/airoha/an7581/base-files/etc/board.d/01_leds @@ -0,0 +1,20 @@ +# +# Copyright (C) 2015 OpenWrt.org +# + +. /lib/functions/uci-defaults.sh + +board_config_update + +board=$(board_name) + +case "$board" in +airoha,an7581-evb) + ucidef_set_led_usbport "usb1" "USB 1" "green:usb-1" "usb1-port1" "usb2-port1" + ucidef_set_led_usbport "usb2" "USB 2" "green:usb-2" "usb3-port1" "usb4-port1" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/airoha/an7581/base-files/etc/board.d/02_network b/target/linux/airoha/an7581/base-files/etc/board.d/02_network new file mode 100644 index 0000000000..7f03fdc512 --- /dev/null +++ b/target/linux/airoha/an7581/base-files/etc/board.d/02_network @@ -0,0 +1,28 @@ +# +# Copyright (c) 2015 The Linux Foundation. All rights reserved. +# Copyright (c) 2011-2015 OpenWrt.org +# + +. /lib/functions/uci-defaults.sh +. /lib/functions/system.sh + +an7581_setup_interfaces() +{ + local board="$1" + + case "$board" in + airoha,an7581-evb) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "eth1" + ;; + *) + echo "Unsupported hardware. Network interfaces not initialized" + ;; + esac +} + +board_config_update +board=$(board_name) +an7581_setup_interfaces $board +board_config_flush + +exit 0 |