diff options
Diffstat (limited to 'target/linux/ramips/base-files')
4 files changed, 35 insertions, 3 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 9dd5823639..3cd7ff6049 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -170,6 +170,7 @@ ramips_setup_interfaces() rb750gr3|\ rt-n14u|\ ubnt-erx|\ + ubnt-erx-sfp|\ ur-326n4g|\ wrtnode|\ wrtnode2p | \ diff --git a/target/linux/ramips/base-files/etc/board.d/03_gpio_switches b/target/linux/ramips/base-files/etc/board.d/03_gpio_switches new file mode 100755 index 0000000000..859dfb31f5 --- /dev/null +++ b/target/linux/ramips/base-files/etc/board.d/03_gpio_switches @@ -0,0 +1,25 @@ +#!/bin/sh + +. /lib/functions/uci-defaults.sh +. /lib/ramips.sh + +board_config_update + +board=$(ramips_board_name) + +case "$board" in +ubnt-erx) + ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "0" + ;; +ubnt-erx-sfp) + ucidef_add_gpio_switch "poe_power_port0" "PoE Power Port0" "496" + ucidef_add_gpio_switch "poe_power_port1" "PoE Power Port1" "497" + ucidef_add_gpio_switch "poe_power_port2" "PoE Power Port2" "498" + ucidef_add_gpio_switch "poe_power_port3" "PoE Power Port3" "499" + ucidef_add_gpio_switch "poe_power_port4" "PoE Power Port4" "500" + ;; +esac + +board_config_flush + +exit 0 diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 4b60a07ee0..c8865fc298 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -487,6 +487,9 @@ ramips_board_detect() { *"UBNT-ERX") name="ubnt-erx" ;; + *"UBNT-ERX-SFP") + name="ubnt-erx-sfp" + ;; *"UR-326N4G") name="ur-326n4g" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index f25d1e2a62..dce4c1a327 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -252,7 +252,8 @@ platform_check_image() { # these boards use metadata images return 0 ;; - ubnt-erx) + ubnt-erx|\ + ubnt-erx-sfp) nand_do_platform_check "$board" "$1" return $?; ;; @@ -274,7 +275,8 @@ platform_nand_pre_upgrade() { local board=$(ramips_board_name) case "$board" in - ubnt-erx) + ubnt-erx|\ + ubnt-erx-sfp) platform_upgrade_ubnt_erx "$ARGV" ;; esac @@ -286,7 +288,8 @@ platform_do_upgrade() { case "$board" in hc5962|\ r6220|\ - ubnt-erx) + ubnt-erx|\ + ubnt-erx-sfp) nand_do_upgrade "$ARGV" ;; *) |