[PATCH v2 3/3] adds optional script to enable poe passthrough on cpe210
Tobias Klaus
tk+ff at meskal.net
Mi Mai 11 08:40:29 CEST 2016
The script is only included in ar71xx builds and only executes on the
cpe210 v1.1 hardware.
It is intended to be called from /etc/rc.local.fff_userconfig since the
state of poe passthrough is reset on each reboot.
Signed-off-by: Tobias Klaus <tk+ff at meskal.net>
---
src/packages/fff/fff-support/Makefile | 9 +++++----
.../usr/lib/fff-support/cpe210_activate_poe_passthrough.sh | 5 +++++
2 files changed, 10 insertions(+), 4 deletions(-)
create mode 100644 src/packages/fff/fff-support/ar71xx/usr/lib/fff-support/cpe210_activate_poe_passthrough.sh
diff --git a/src/packages/fff/fff-support/Makefile b/src/packages/fff/fff-support/Makefile
index a9ebeec..2ef5dca 100644
--- a/src/packages/fff/fff-support/Makefile
+++ b/src/packages/fff/fff-support/Makefile
@@ -23,19 +23,20 @@ define Package/fff-support/description
endef
define Build/Prepare
- echo "all: " > $(PKG_BUILD_DIR)/Makefile
+ echo "all: " > $(PKG_BUILD_DIR)/Makefile
endef
define Build/Configure
- # nothing
+ # nothing
endef
define Build/Compile
- # nothing
+ # nothing
endef
define Package/fff-support/install
- $(CP) ./files/* $(1)/
+ $(CP) ./files/* $(1)/
+ test -d ./$(BOARD) && $(CP) ./$(BOARD)/* $(1)/
endef
$(eval $(call BuildPackage,fff-support))
diff --git a/src/packages/fff/fff-support/ar71xx/usr/lib/fff-support/cpe210_activate_poe_passthrough.sh b/src/packages/fff/fff-support/ar71xx/usr/lib/fff-support/cpe210_activate_poe_passthrough.sh
new file mode 100644
index 0000000..cb3508f
--- /dev/null
+++ b/src/packages/fff/fff-support/ar71xx/usr/lib/fff-support/cpe210_activate_poe_passthrough.sh
@@ -0,0 +1,5 @@
+if [ "$(cat /var/sysinfo/model)" = "TP-Link CPE210 v1.1" ] ; then
+ echo 20 > /sys/class/gpio/export
+ echo out > /sys/class/gpio/gpio20/direction
+ echo 1 > /sys/class/gpio/gpio20/value
+fi
--
2.8.2
Mehr Informationen über die Mailingliste franken-dev