Developing lightweight computation at the DSG edge

Commit 2a0942f2 authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

Add support for TP-Link TL-WDR4900 v1

parent eafa0d2d
#!/bin/sh
# Stage = [birth|firstboot|anyboot|preconf|postconf]
STAGE="$1"
[ "$STAGE" == "firstboot" ] && {
echo "Configuring TP-Link TL-WDR4900-v1 Ethernet networking"
uci set qmp.interfaces.switch_devices="eth0.1 eth0.2 eth0.3 eth0.4 eth0.5"
uci set qmp.interfaces.switch_devices_names="Internet Ethernet1 Ethernet2 Ethernet3 Ethernet4"
uci set qmp.interfaces.lan_devices="eth0.2 eth0.3 eth0.4 eth0.5"
uci set qmp.interfaces.wan_devices="eth0.1"
uci set qmp.interfaces.ignore_devices="eth0"
uci commit qmp
}
#!/bin/sh
# Stage = [birth|firstboot|anyboot|preconf|postconf]
STAGE="$1"
[ "$STAGE" == "birth" ] && {
uci -q delete network.@switch[0]
while uci -q delete network.@switch_vlan[0]; do :; done
}
[ "$STAGE" == "firstboot" ] && {
echo "Configuring TP-Link TL-WDR4900-v1 switch"
uci -q delete network.@switch[0]
while uci -q delete network.@switch_vlan[0]; do :; done
uci add network switch
uci set network.@switch[0]=switch
uci set network.@switch[0].name=switch0
uci set network.@switch[0].reset=1
uci set network.@switch[0].enable_vlan=1
uci add network switch_vlan > /dev/null
uci set network.@switch_vlan[0]=switch_vlan
uci set network.@switch_vlan[0].device=switch0
uci set network.@switch_vlan[0].vlan=1
uci set network.@switch_vlan[0].vid=1
uci set network.@switch_vlan[0].ports="0t 1"
uci add network switch_vlan > /dev/null
uci set network.@switch_vlan[1]=switch_vlan
uci set network.@switch_vlan[1].device=switch0
uci set network.@switch_vlan[1].vlan=2
uci set network.@switch_vlan[1].vid=2
uci set network.@switch_vlan[1].ports="0t 2"
uci add network switch_vlan > /dev/null
uci set network.@switch_vlan[2]=switch_vlan
uci set network.@switch_vlan[2].device=switch0
uci set network.@switch_vlan[2].vlan=3
uci set network.@switch_vlan[2].vid=3
uci set network.@switch_vlan[2].ports="0t 3"
uci add network switch_vlan > /dev/null
uci set network.@switch_vlan[3]=switch_vlan
uci set network.@switch_vlan[3].device=switch0
uci set network.@switch_vlan[3].vlan=4
uci set network.@switch_vlan[3].vid=4
uci set network.@switch_vlan[3].ports="0t 4"
uci add network switch_vlan > /dev/null
uci set network.@switch_vlan[4]=switch_vlan
uci set network.@switch_vlan[4].device=switch0
uci set network.@switch_vlan[4].vlan=5
uci set network.@switch_vlan[4].vid=5
uci set network.@switch_vlan[4].ports="0t 4"
uci commit network
}
../scripts/tl-wdr4900-v1_network.sh
\ No newline at end of file
../scripts/tl-wdr4900-v1_switch.sh
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment