OpenWrt – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 #!/bin/sh
2 #
3 # Copyright (C) 2013 OpenWrt.org
4 #
5  
6 . /lib/ramips.sh
7  
8 ramips_set_preinit_iface() {
9 RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350|MT7628|MT7688|MT7620|MT7621)"`
10  
11 if [ -n "${RT3X5X}" ]; then
12 # The ethernet switch driver enables VLAN by default, but
13 # failsafe uses eth0, making the device unreachable:
14 # https://dev.openwrt.org/ticket/18768
15 case "${RT3X5X}" in
16 *MT7620*)
17 ralink_switchdev=mt7620
18 ;;
19 *MT7621*)
20 ralink_switchdev=mt7530
21 ;;
22 *)
23 ralink_switchdev=rt305x
24 ;;
25 esac
26 swconfig dev $ralink_switchdev set reset 1
27 swconfig dev $ralink_switchdev set enable_vlan 0
28 swconfig dev $ralink_switchdev set apply 1
29 fi
30  
31 ifname=eth0
32 }
33  
34 boot_hook_add preinit_main ramips_set_preinit_iface