imx6: use /lib/imx6.sh inside the uci-defaults script
authorJohn Crispin <john@openwrt.org>
Wed, 18 Jun 2014 10:08:16 +0000 (10:08 +0000)
committerJohn Crispin <john@openwrt.org>
Wed, 18 Jun 2014 10:08:16 +0000 (10:08 +0000)
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 41257

target/linux/imx6/base-files/etc/uci-defaults/02_network

index 5ffb6456f14c8f35949976d497ab393a1a44f049..64e060a8e0b7b759dd4356c688c98facab23ccb9 100644 (file)
@@ -8,24 +8,22 @@
 touch /etc/config/network
 
 . /lib/functions/uci-defaults.sh
+. /lib/imx6.sh
+
+board=$(imx6_board_name)
 
 ucidef_set_interface_loopback
 
-case "`cat /proc/device-tree/model`" in
-"Gateworks Ventana i.MX6 DualLite/Solo GW51XX" |\
-"Gateworks Ventana i.MX6 DualLite/Solo GW52XX" |\
-"Gateworks Ventana i.MX6 Dual/Quad GW51XX" |\
-"Gateworks Ventana i.MX6 Dual/Quad GW52XX")
+case "$board" in
+"gw51xx" |\
+"gw52xx")
        ucidef_set_interface_lan 'eth0'
        ;;
-"Gateworks Ventana i.MX6 DualLite/Solo GW53XX" |\
-"Gateworks Ventana i.MX6 DualLite/Solo GW54XX" |\
-"Gateworks Ventana i.MX6 Dual/Quad GW53XX" |\
-"Gateworks Ventana i.MX6 Dual/Quad GW54XX" |\
-"Gateworks Ventana GW5400-A")
+"gw53xx" |\
+"gw54xx")
        ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
        ;;
-"Wandboard i.MX6 Dual Lite Board")
+"wandboard")
        ucidef_set_interface_wan 'eth0'
        ;;
 esac