aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/base-files
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2020-04-04 12:44:28 +0800
committerChuanhong Guo <gch981213@gmail.com>2020-04-04 14:56:14 +0800
commita8d62a4eb1ce53beb901b212ce7e474eb70341ca (patch)
tree927ff10764372a90911982a50b6ec2a063c96e28 /target/linux/ramips/base-files
parent764cc5c6a6c9aeaae5c7d8fdfc60aa651733e1a5 (diff)
downloadupstream-a8d62a4eb1ce53beb901b212ce7e474eb70341ca.tar.gz
upstream-a8d62a4eb1ce53beb901b212ce7e474eb70341ca.tar.bz2
upstream-a8d62a4eb1ce53beb901b212ce7e474eb70341ca.zip
ramips: remove set_preinit_iface script
This script isn't suitable for mt7621 anymore due to switching to DSA and it needs a different preinit script. Generic preinit logic in package/base-files has the ability to parse board.json and pick preinit iface accordingly. Just remove this script instead of moving it into subtargets. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/ramips/base-files')
-rw-r--r--target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips59
1 files changed, 0 insertions, 59 deletions
diff --git a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips b/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
deleted file mode 100644
index 68c1285eb4..0000000000
--- a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2013 OpenWrt.org
-#
-
-. /lib/functions.sh
-
-ramips_switchdev_from_soc() {
- # The ethernet switch driver enables VLAN by default, but
- # failsafe uses eth0, making the device unreachable:
- # https://dev.openwrt.org/ticket/18768
-
- local switchdev
- local RT3X5X=$(grep -E "(RT3.5|RT5350|MT7628|MT7688|MT7620|MT7621)" /proc/cpuinfo)
-
- [ -n "$RT3X5X" ] || return 1
-
- case "$RT3X5X" in
- *MT7620*)
- switchdev=mt7620
- ;;
- *MT7621*)
- switchdev=mt7530
- ;;
- *)
- switchdev=rt305x
- ;;
- esac
-
- echo "$switchdev"
-}
-
-ramips_switchdev_from_board() {
- # For these devices, external ethernet switch should be used
- # instead of the SoC internal switch.
-
- local switchdev
- local board=$(board_name)
-
- case "$board" in
- esac
-
- echo "$switchdev"
-}
-
-ramips_set_preinit_iface() {
- local switchdev=$(ramips_switchdev_from_board)
- [ -n "$switchdev" ] || switchdev=$(ramips_switchdev_from_soc)
-
- if [ -n "$switchdev" ]; then
- swconfig dev $switchdev set reset 1
- swconfig dev $switchdev set enable_vlan 0
- swconfig dev $switchdev set apply 1
- fi
-
- ifname=eth0
-}
-
-boot_hook_add preinit_main ramips_set_preinit_iface