bsp/wdr4900: initial support for WDR4900

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
Tim Niemeyer 2013-12-02 21:53:31 +01:00
parent 777f9788d8
commit c0c0b0780e
10 changed files with 1753 additions and 0 deletions

25
bsp/board_wdr4900.bsp Normal file
View File

@ -0,0 +1,25 @@
machine=wdr4900
target=$builddir/$machine
board_prepare() {
echo "nothing todo" > /dev/null
}
board_prebuild() {
echo "nothing todo" > /dev/null
}
board_postbuild() {
cp $target/bin/mpc85xx/openwrt-mpc85xx-generic-tl-wdr4900-v1-squashfs-factory.bin ./bin/
cp $target/bin/mpc85xx/openwrt-mpc85xx-generic-tl-wdr4900-v1-squashfs-sysupgrade.bin ./bin/
}
board_flash() {
echo "nothing implemented"
}
board_clean() {
/bin/rm -rf $target bin/*$machine*
}

1581
bsp/wdr4900/.config Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,2 @@
config model 'model'
option name 'wdr4900'

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,55 @@
config wifi-device radio0
option type mac80211
option channel ${BATMAN_CHANNEL_5GHZ}
option phy phy0
option hwmode 11na
option htmode HT40+
option country DE
config wifi-iface 'w5mesh'
option device radio0
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 radio0
option network w5ap
option ifname w5ap
option mode ap
option ssid '${ESSID_AP}'
option 'encryption' 'none'
config wifi-device radio1
option type mac80211
option channel ${BATMAN_CHANNEL}
option phy phy1
option hwmode 11ng
option htmode HT40+
option country DE
config wifi-iface 'w2mesh'
option device radio1
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 radio1
option network w2ap
option ifname w2ap
option mode ap
option ssid '${ESSID_AP}'
option 'encryption' 'none'
# vim: noexpandtab

View File

@ -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

View File

@ -0,0 +1,13 @@
WLAN0_MACADDR=$(cat /sys/class/net/wlan0/address)
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

View File

@ -1,4 +1,5 @@
BATMAN_CHANNEL=1
BATMAN_CHANNEL_5GHZ=36
ESSID_AP=franken.freifunk.net
ESSID_MESH=batman.franken.freifunk.net
BSSID_MESH=02:CA:FF:EE:BA:BE

View File

@ -1,4 +1,5 @@
BATMAN_CHANNEL=6
BATMAN_CHANNEL_5GHZ=36
ESSID_AP=oldenburg.freifunk.net
ESSID_MESH=batman.oldenburg.freifunk.net
BSSID_MESH=02:CA:FF:EE:BA:BE