diff options
Diffstat (limited to 'target/linux/realtek/base-files/etc')
-rw-r--r-- | target/linux/realtek/base-files/etc/board.d/02_network | 5 | ||||
-rw-r--r-- | target/linux/realtek/base-files/etc/board.d/03_gpio_switches | 16 |
2 files changed, 21 insertions, 0 deletions
diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network index 1dea2ad5a6..90b45abf94 100644 --- a/target/linux/realtek/base-files/etc/board.d/02_network +++ b/target/linux/realtek/base-files/etc/board.d/02_network @@ -21,6 +21,7 @@ board=$(board_name) board_config_update lan_list=$(ls -1 -v -d /sys/class/net/lan* | xargs -n1 basename | xargs) +lan_list_rev=$(ls -1 -v -d -r /sys/class/net/lan* | xargs -n1 basename | xargs) ucidef_set_bridge_device switch ucidef_set_interface_lan "$lan_list" @@ -30,6 +31,7 @@ lan_mac_end="" label_mac="" case $board in hpe,1920-8g|\ +hpe,1920-8g-poe|\ hpe,1920-16g|\ hpe,1920-24g) label_mac=$(mtd_get_mac_binary factory 0x68) @@ -65,6 +67,9 @@ done [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac case $board in +hpe,1920-8g-poe) + ucidef_set_poe 180 "$lan_list_rev" "lan9 lan10" + ;; netgear,gs110tpp-v1) ucidef_set_poe 130 "$lan_list" "lan9 lan10" ;; diff --git a/target/linux/realtek/base-files/etc/board.d/03_gpio_switches b/target/linux/realtek/base-files/etc/board.d/03_gpio_switches new file mode 100644 index 0000000000..abfcb8e592 --- /dev/null +++ b/target/linux/realtek/base-files/etc/board.d/03_gpio_switches @@ -0,0 +1,16 @@ + +. /lib/functions/uci-defaults.sh + +board_config_update + +board=$(board_name) + +case "$board" in +hpe,1920-8g-poe) + ucidef_add_gpio_switch "fan_ctrl" "Fan control" "456" "0" + ;; +esac + +board_config_flush + +exit 0 |