From ad576d262d5e954a322525675352ecce79a932a0 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sat, 4 Jul 2015 01:25:15 +0000 Subject: at91: add Device Tree based board detection Set up eth0 as LAN interface by default. Signed-off-by: Florian Fainelli SVN-Revision: 46174 --- .../at91/base-files/etc/uci-defaults/02_network | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 target/linux/at91/base-files/etc/uci-defaults/02_network (limited to 'target/linux/at91/base-files/etc') diff --git a/target/linux/at91/base-files/etc/uci-defaults/02_network b/target/linux/at91/base-files/etc/uci-defaults/02_network new file mode 100755 index 0000000000..5df138c72c --- /dev/null +++ b/target/linux/at91/base-files/etc/uci-defaults/02_network @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Copyright (C) 2014 OpenWrt.org +# + +[ -e /etc/config/network ] && exit 0 + +touch /etc/config/network + +. /lib/functions/uci-defaults.sh +. /lib/at91.sh + +ucidef_set_interface_loopback + +case "$(at91_board_name)" in + +sama5d3_xplained) + ucidef_set_interfaces_lan_wan "eth0" "eth1" + ;; + +*) + ucidef_set_interface_lan "eth0" + ;; + +esac + +uci commit network + +exit 0 -- cgit v1.2.3