forked from freifunk-franken/firmware
bsp/wdr4300: initial support for WDR3500,WDR3600,WDR4300,WDR4310
Series-to: ffol Series-version: 1 Series-name: for_0.5.0 Cover-letter: This patchset is meant to be applied to a branch which stores the changes for the upcoming 0.5.0 release. It hold also all patches from my last set for 0.4.2. This sets bumps up our OpenWRT base version. Currently not working: - Network on WDR3500 have wrong VLAN-IDs Currently untested: - All WRxxx and DIR300/Fonera boards END Series-changes: 1 - First version of this Patchset Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
parent
c0c0b0780e
commit
37805e0e7e
|
@ -0,0 +1,34 @@
|
|||
|
||||
machine=wdr4300
|
||||
target=$builddir/$machine
|
||||
|
||||
board_prepare() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_prebuild() {
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_postbuild() {
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3500-v1-squashfs-sysupgrade.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr3600-v1-squashfs-sysupgrade.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4300-v1-squashfs-sysupgrade.bin ./bin/
|
||||
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4310-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wdr4310-v1-squashfs-sysupgrade.bin ./bin/
|
||||
}
|
||||
|
||||
board_flash() {
|
||||
echo "nothing implemented"
|
||||
}
|
||||
|
||||
board_clean() {
|
||||
/bin/rm -rf $target bin/*$machine*
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,2 @@
|
|||
config model 'model'
|
||||
option name 'wdr4300'
|
|
@ -0,0 +1,55 @@
|
|||
config 'interface' 'loopback'
|
||||
option 'ifname' 'lo'
|
||||
option 'proto' 'static'
|
||||
option 'ipaddr' '127.0.0.1'
|
||||
option 'netmask' '255.0.0.0'
|
||||
|
||||
config interface 'w2mesh'
|
||||
option mtu '1528'
|
||||
option proto 'batadv'
|
||||
option mesh 'bat0'
|
||||
|
||||
config interface 'w5mesh'
|
||||
option mtu '1528'
|
||||
option proto 'batadv'
|
||||
option mesh 'bat0'
|
||||
|
||||
config 'interface' 'mesh'
|
||||
option 'type' 'bridge'
|
||||
option 'ifname' 'eth0.1 w2ap w5ap bat0 tap0'
|
||||
option 'auto' '1'
|
||||
|
||||
config 'interface' 'wan'
|
||||
option 'ifname' 'eth0.2'
|
||||
option 'proto' 'dhcp'
|
||||
|
||||
config 'interface' 'ethmesh'
|
||||
option 'ifname' 'eth0.3'
|
||||
option 'mtu' '1528'
|
||||
option proto 'batadv'
|
||||
option mesh 'bat0'
|
||||
|
||||
config 'switch'
|
||||
option 'name' 'switch0'
|
||||
option 'reset' '1'
|
||||
option 'enable_vlan' '1'
|
||||
|
||||
#3. und 4. LAN Port
|
||||
config 'switch_vlan'
|
||||
option 'device' 'switch0'
|
||||
option 'vlan' '1'
|
||||
option 'ports' '0t 4 5'
|
||||
|
||||
#WAN
|
||||
config 'switch_vlan'
|
||||
option 'device' 'switch0'
|
||||
option 'vlan' '2'
|
||||
option 'ports' '0t 1'
|
||||
|
||||
#1. und 2. LAN Port
|
||||
config 'switch_vlan'
|
||||
option 'device' 'switch0'
|
||||
option 'vlan' '3'
|
||||
option 'ports' '0t 2 3'
|
||||
|
||||
# vim: noexpandtab
|
|
@ -0,0 +1,13 @@
|
|||
config 'system'
|
||||
option 'hostname' 'OpenWrt'
|
||||
option 'timezone' 'CET-1CEST,M3.5.0,M10.5.0/3'
|
||||
|
||||
config 'rdate'
|
||||
option 'interface' 'wan'
|
||||
|
||||
config 'led' 'status_led'
|
||||
option 'name' 'status'
|
||||
option 'sysfs' 'tp-link:blue:system'
|
||||
option 'trigger' 'heartbeat'
|
||||
|
||||
# vim: noexpandtab
|
|
@ -0,0 +1,55 @@
|
|||
config wifi-device radio0
|
||||
option type mac80211
|
||||
option channel ${BATMAN_CHANNEL}
|
||||
option phy phy0
|
||||
option hwmode 11ng
|
||||
option htmode HT40+
|
||||
option country DE
|
||||
|
||||
config wifi-iface 'w2mesh'
|
||||
option device radio0
|
||||
option network w2mesh
|
||||
option ifname w2mesh
|
||||
option mode adhoc
|
||||
option bssid '${BSSID_MESH}'
|
||||
option ssid '${ESSID_MESH}'
|
||||
option mcast_rate 6000
|
||||
option 'encryption' 'none'
|
||||
option 'hidden' '1'
|
||||
|
||||
config wifi-iface 'w2ap'
|
||||
option device radio0
|
||||
option network w2ap
|
||||
option ifname w2ap
|
||||
option mode ap
|
||||
option ssid '${ESSID_AP}'
|
||||
option 'encryption' 'none'
|
||||
|
||||
config wifi-device radio1
|
||||
option type mac80211
|
||||
option channel ${BATMAN_CHANNEL_5GHZ}
|
||||
option phy phy1
|
||||
option hwmode 11na
|
||||
option htmode HT40+
|
||||
option country DE
|
||||
|
||||
config wifi-iface 'w5mesh'
|
||||
option device radio1
|
||||
option network w5mesh
|
||||
option ifname w5mesh
|
||||
option mode adhoc
|
||||
option bssid '${BSSID_MESH}'
|
||||
option ssid '${ESSID_MESH}'
|
||||
option mcast_rate 6000
|
||||
option 'encryption' 'none'
|
||||
option 'hidden' '1'
|
||||
|
||||
config wifi-iface 'w5ap'
|
||||
option device radio1
|
||||
option network w5ap
|
||||
option ifname w5ap
|
||||
option mode ap
|
||||
option ssid '${ESSID_AP}'
|
||||
option 'encryption' 'none'
|
||||
|
||||
# vim: noexpandtab
|
|
@ -0,0 +1,7 @@
|
|||
*/5 * * * * sh /etc/fastdstart.sh; sh /etc/nodewatcher.sh; sh /etc/configurator.sh; sh /etc/statistics.sh; sh /etc/wlanwatchdog.sh >> /var/log/wlanwatchdog.log 2>&1
|
||||
|
||||
#15 01 * * * rdate -s time.fu-berlin.de > /dev/null
|
||||
|
||||
#Enable zapp script if you are running a gateway
|
||||
#*/1 * * * * /etc/init.d/zapp
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
if [[ "$(cat /var/sysinfo/board_name)" = "tl-wdr3500" ]]; then
|
||||
WLAN0_MACADDR=$(cat /sys/class/net/w2mesh/address)
|
||||
else
|
||||
WLAN0_MACADDR=$(cat /sys/class/net/w5mesh/address)
|
||||
fi
|
||||
|
||||
BRMESH_MACADDR=$(cat /sys/class/net/br-mesh/address)
|
||||
|
||||
if [[ "$WLAN0_MACADDR=" != "$BRMESH_MACADDR=" ]]; then
|
||||
echo "Fixing wrong MAC on br-mesh"
|
||||
uci set network.mesh.macaddr=$WLAN0_MACADDR
|
||||
uci commit
|
||||
ifconfig br-mesh hw ether $WLAN0_MACADDR
|
||||
ifconfig br-mesh down
|
||||
ifconfig br-mesh up
|
||||
fi
|
||||
|
||||
# vim: noexpandtab
|
|
@ -1,4 +1,4 @@
|
|||
WLAN0_MACADDR=$(cat /sys/class/net/wlan0/address)
|
||||
WLAN0_MACADDR=$(cat /sys/class/net/w5mesh/address)
|
||||
BRMESH_MACADDR=$(cat /sys/class/net/br-mesh/address)
|
||||
|
||||
if [[ "$WLAN0_MACADDR=" != "$BRMESH_MACADDR=" ]]; then
|
||||
|
|
Loading…
Reference in New Issue