aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/base-files
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2018-01-08 15:06:24 +0100
committerJohn Crispin <john@phrozen.org>2018-02-14 11:27:50 +0100
commit7762c07c88980cff85ec20c12f18cd172260e9d9 (patch)
treed5e9e1f28c1aa9b47eadcf6b8d063b394a34ed17 /target/linux/mediatek/base-files
parent04d3308b6248ef21a6f0bc3378b342906c2d2865 (diff)
downloadupstream-7762c07c88980cff85ec20c12f18cd172260e9d9.tar.gz
upstream-7762c07c88980cff85ec20c12f18cd172260e9d9.tar.bz2
upstream-7762c07c88980cff85ec20c12f18cd172260e9d9.zip
mediatek: bump to v4.14
This drops support for all the !emmc EVB and adds banannaPi-R2 Also drop mtkhnat until the nftables offoad driver is ready Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/mediatek/base-files')
-rwxr-xr-xtarget/linux/mediatek/base-files/etc/board.d/02_network6
-rw-r--r--target/linux/mediatek/base-files/etc/config/mtkhnat60
-rwxr-xr-xtarget/linux/mediatek/base-files/etc/init.d/mtkhnat13
-rwxr-xr-xtarget/linux/mediatek/base-files/etc/uci-defaults/99-firewall9
-rwxr-xr-xtarget/linux/mediatek/base-files/lib/upgrade/platform.sh16
-rwxr-xr-xtarget/linux/mediatek/base-files/sbin/mtkhnat64
6 files changed, 3 insertions, 165 deletions
diff --git a/target/linux/mediatek/base-files/etc/board.d/02_network b/target/linux/mediatek/base-files/etc/board.d/02_network
index e071ab27a0..8015cf3cc2 100755
--- a/target/linux/mediatek/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/base-files/etc/board.d/02_network
@@ -9,13 +9,11 @@ mediatek_setup_interfaces()
local board="$1"
case $board in
- 'bananapi,bpi-r2' | \
- 'mediatek,mt7623-rfb-emmc' | \
- 'mediatek,mt7623-rfb-nand-ephy')
+ 'mediatek,mt7623a-rfb-emmc')
ucidef_set_interface_lan "lan0 lan1 lan2 lan3"
ucidef_set_interface_wan eth1
;;
- 'mediatek,mt7623-rfb-nand')
+ 'bananapi,bpi-r2')
ucidef_set_interface_lan "lan0 lan1 lan2 lan3"
ucidef_set_interface_wan wan
;;
diff --git a/target/linux/mediatek/base-files/etc/config/mtkhnat b/target/linux/mediatek/base-files/etc/config/mtkhnat
deleted file mode 100644
index a23bd1c22b..0000000000
--- a/target/linux/mediatek/base-files/etc/config/mtkhnat
+++ /dev/null
@@ -1,60 +0,0 @@
-config global global
- option enable 0
- option upstream 1000000
- option downstream 1000000
-
-config queue
- option id 0
- option minrate 10
- option maxrate 50
- option weight 7
- option resv 32
-
-config queue
- option id 1
- option minrate 30
- option maxrate 100
- option weight 7
- option resv 32
-
-config queue
- option id 2
- option minrate 30
- option maxrate 100
- option weight 7
- option resv 32
-
-config queue
- option id 3
- option minrate 30
- option maxrate 100
- option weight 7
- option resv 32
-
-config queue
- option id 4
- option minrate 25
- option maxrate 100
- option weight 7
- option resv 32
-
-config queue
- option id 5
- option minrate 25
- option maxrate 100
- option weight 7
- option resv 32
-
-config queue
- option id 6
- option minrate 25
- option maxrate 100
- option weight 7
- option resv 32
-
-config queue
- option id 7
- option minrate 25
- option maxrate 100
- option weight 7
- option resv 32
diff --git a/target/linux/mediatek/base-files/etc/init.d/mtkhnat b/target/linux/mediatek/base-files/etc/init.d/mtkhnat
deleted file mode 100755
index 32011e73aa..0000000000
--- a/target/linux/mediatek/base-files/etc/init.d/mtkhnat
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh /etc/rc.common
-
-START=90
-
-USE_PROCD=1
-NAME=mtkhnat
-PROG=/sbin/mtkhnat
-
-start_service() {
- procd_open_instance
- procd_set_param command "${PROG}"
- procd_close_instance
-}
diff --git a/target/linux/mediatek/base-files/etc/uci-defaults/99-firewall b/target/linux/mediatek/base-files/etc/uci-defaults/99-firewall
deleted file mode 100755
index 9a0dd9b5f0..0000000000
--- a/target/linux/mediatek/base-files/etc/uci-defaults/99-firewall
+++ /dev/null
@@ -1,9 +0,0 @@
-echo "iptables -t mangle -A FORWARD -i br-lan -o eth1 -p tcp -m mark --mark 0/0x7 -j MARK --set-mark 4/0x7" >> /etc/firewall.user
-echo "iptables -t mangle -A FORWARD -i br-lan -o eth1 -p udp -m mark --mark 0/0x7 -j MARK --set-mark 5/0x7" >> /etc/firewall.user
-echo "iptables -t mangle -A FORWARD -i eth1 -o br-lan -p tcp -m mark --mark 0/0x7 -j MARK --set-mark 4/0x7" >> /etc/firewall.user
-echo "iptables -t mangle -A FORWARD -i eth1 -o br-lan -p udp -m mark --mark 0/0x7 -j MARK --set-mark 5/0x7" >> /etc/firewall.user
-
-echo "iptables -t mangle -A FORWARD -p udp -m mark --mark 0/0xf8 -j MARK --or-mark 0x60" >> /etc/firewall.user
-echo "iptables -t mangle -A FORWARD -p tcp -m mark --mark 0/0xf8 -j MARK --or-mark 0xc0" >> /etc/firewall.user
-
-exit 0
diff --git a/target/linux/mediatek/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/base-files/lib/upgrade/platform.sh
index 7161a4b84e..3f3c5a021c 100755
--- a/target/linux/mediatek/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/base-files/lib/upgrade/platform.sh
@@ -20,13 +20,8 @@ platform_check_image() {
local board=$(board_name)
case "$board" in
- mediatek,mt7623-rfb-nand-ephy |\
- mediatek,mt7623-rfb-nand)
- nand_do_platform_check $board $1
- return $?
- ;;
bananapi,bpi-r2 |\
- mediatek,mt7623-rfb-emmc)
+ mediatek,mt7623a-rfb-emmc)
local kernel_length=`(tar xf $tar_file sysupgrade-$board/kernel -O | wc -c) 2> /dev/null`
local rootfs_length=`(tar xf $tar_file sysupgrade-$board/root -O | wc -c) 2> /dev/null`
;;
@@ -44,12 +39,3 @@ platform_check_image() {
return 0
}
-
-platform_pre_upgrade() {
- case "$(board_name)" in
- mediatek,mt7623-rfb-nand-ephy |\
- mediatek,mt7623-rfb-nand)
- nand_do_upgrade $1
- ;;
- esac
-}
diff --git a/target/linux/mediatek/base-files/sbin/mtkhnat b/target/linux/mediatek/base-files/sbin/mtkhnat
deleted file mode 100755
index fdfc8427c5..0000000000
--- a/target/linux/mediatek/base-files/sbin/mtkhnat
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh
-
-. /lib/functions.sh
-
-config_load mtkhnat
-config_get enable global enable 0
-
-[ "${enable}" -eq 1 ] || {
- echo 0 ${sch_upstream} > /sys/kernel/debug/hnat/scheduler0
- echo 0 ${sch_downstream} > /sys/kernel/debug/hnat/scheduler1
-
- rmmod mtkhnat
- exit 0
-}
-
-insmod mtkhnat
-
-sleep 1
-
-config_get sch_upstream global upstream 100000
-config_get sch_downstream global downstream 100000
-
-echo 1 ${sch_upstream} > /sys/kernel/debug/hnat/scheduler0
-echo 1 ${sch_downstream} > /sys/kernel/debug/hnat/scheduler1
-
-setup_queue() {
- local queue_id queue_scheduler queue_minebl queue_maxebl queue_minrate queue_maxrate queue_resv minrate maxrate queue_weight
-
- config_get queue_id $1 id 0
- config_get queue_minrate $1 minrate 0
- config_get queue_maxrate $1 maxrate 0
- config_get queue_resv $1 resv 22
- config_get queue_weight $1 weight 7
-
- [ "${queue_id}" -gt 7 ] && return 0
-
- queue_minebl=1
- queue_maxebl=1
- queue_scheduler=0
-
- [ "${queue_minrate}" -eq 0 ] && queue_minebl=0
- [ "${queue_maxrate}" -eq 0 ] && queue_maxebl=0
-
- minrate=$((sch_upstream * $queue_minrate))
- minrate=$((minrate / 100))
-
- maxrate=$((sch_upstream * $queue_maxrate))
- maxrate=$((maxrate / 100))
-
- echo 0 ${queue_minebl} ${minrate} ${queue_maxebl} ${maxrate} ${queue_weight} ${queue_resv} > /sys/kernel/debug/hnat/queue${queue_id}
-
- queue_id=$((queue_id + 8))
-
- minrate=$((sch_downstream * $queue_minrate))
- minrate=$((minrate / 100))
-
- maxrate=$((sch_downstream * $queue_maxrate))
- maxrate=$((maxrate / 100))
-
- echo 1 ${queue_minebl} ${minrate} ${queue_maxebl} ${maxrate} ${queue_weight} ${queue_resv} > /sys/kernel/debug/hnat/queue${queue_id}
-}
-
-config_foreach setup_scheduler scheduler
-config_foreach setup_queue queue