[OpenWrt-Devel] [PATCH 2/2] imx6: base-files: Add support for Toradex Apalis on Ixora board

Petr Štetiar ynezz at true.cz
Wed Nov 11 08:28:40 EST 2015


Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 target/linux/imx6/base-files/etc/diag.sh           |   36 ++++++++++++++++++++
 .../imx6/base-files/etc/uci-defaults/02_network    |    1 +
 target/linux/imx6/base-files/lib/imx6.sh           |    4 +++
 3 files changed, 41 insertions(+)
 create mode 100644 target/linux/imx6/base-files/etc/diag.sh

diff --git a/target/linux/imx6/base-files/etc/diag.sh b/target/linux/imx6/base-files/etc/diag.sh
new file mode 100644
index 0000000..6841e02
--- /dev/null
+++ b/target/linux/imx6/base-files/etc/diag.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+. /lib/functions/leds.sh
+. /lib/imx6.sh
+
+board=$(imx6_board_name)
+
+case "$board" in
+*apalis-ixora)
+	led_green='LED_5_GREEN'
+	led_red='LED_5_RED'
+	;;
+*)
+	exit 0
+	;;
+esac
+
+set_state() {
+	status_led=$led_red
+	case "$1" in
+	preinit)
+		status_led_set_timer 100 100
+		;;
+	failsafe)
+		status_led_set_timer 50 50
+		;;
+	preinit_regular)
+		status_led_blink_preinit_regular
+		;;
+	done)
+		led_off $status_led
+		status_led=$led_green
+		status_led_set_heartbeat
+		;;
+	esac
+}
diff --git a/target/linux/imx6/base-files/etc/uci-defaults/02_network b/target/linux/imx6/base-files/etc/uci-defaults/02_network
index bf83063..aae2af2 100644
--- a/target/linux/imx6/base-files/etc/uci-defaults/02_network
+++ b/target/linux/imx6/base-files/etc/uci-defaults/02_network
@@ -24,6 +24,7 @@ case "$board" in
 *gw552x)
 	ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
 	;;
+*apalis-ixora |\
 *wandboard)
 	ucidef_set_interface_wan 'eth0'
 	;;
diff --git a/target/linux/imx6/base-files/lib/imx6.sh b/target/linux/imx6/base-files/lib/imx6.sh
index 360ec58..306077c 100755
--- a/target/linux/imx6/base-files/lib/imx6.sh
+++ b/target/linux/imx6/base-files/lib/imx6.sh
@@ -39,6 +39,10 @@ imx6_board_detect() {
 		name="gw552x"
 		;;
 
+	"Toradex Apalis iMX6Q on Apalis Ixora Board")
+		name="apalis-ixora"
+		;;
+
 	"Wandboard i.MX6 Dual Lite Board")
 		name="wandboard"
 		;;
-- 
1.7.9.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list