target: socfpga: Add Altera SoCFPGA support
[openwrt/svn-archive/archive.git] / target / linux / socfpga / base-files / etc / uci-defaults / 02_network
diff --git a/target/linux/socfpga/base-files/etc/uci-defaults/02_network b/target/linux/socfpga/base-files/etc/uci-defaults/02_network
new file mode 100644 (file)
index 0000000..479e820
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+
+[ -e /etc/config/network ] && exit 0
+
+touch /etc/config/network
+
+. /lib/functions/uci-defaults.sh
+. /lib/socfpga.sh
+
+board=$(socfpga_board_name)
+
+ucidef_set_interface_loopback
+
+case "$board" in
+"socfpga-sockit")
+       ucidef_set_interface_lan 'eth0'
+       ;;
+esac
+
+uci commit network
+
+exit 0