added board config for TP-Link TL-WR740N

This commit is contained in:
Jan-Philipp Litza 2013-12-15 16:26:04 +01:00 committed by Tim Niemeyer
parent 7b63e123bc
commit 673c05fd7e
7 changed files with 1800 additions and 0 deletions

24
bsp/board_wr740n.bsp Normal file
View File

@ -0,0 +1,24 @@
machine=wr740n
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-wr740n-v4-squashfs-*.bin ./bin/
}
board_flash() {
echo "nothing implemented"
}
board_clean() {
/bin/rm -rf $target bin/*$machine*
}

1686
bsp/wr740n/.config Normal file

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -0,0 +1,40 @@
config 'interface' 'loopback'
option 'ifname' 'lo'
option 'proto' 'static'
option 'ipaddr' '127.0.0.1'
option 'netmask' '255.0.0.0'
config 'interface' 'wlanmesh'
option 'ifname' 'wlan1'
option 'mtu' '1528'
config 'interface' 'mesh'
option 'type' 'bridge'
option 'ifname' 'eth0.1 wlan0 bat0 tap0'
option 'auto' '1'
config 'interface' 'wan'
option 'ifname' 'eth1'
option 'proto' 'dhcp'
config 'interface' 'ethmesh'
option 'ifname' 'eth0.3'
option 'mtu' '1528'
config 'switch'
option 'name' 'eth0'
option 'reset' '1'
option 'enable_vlan' '1'
#3. und 4. LAN Port
config 'switch_vlan'
option 'device' 'eth0'
option 'vlan' '1'
option 'ports' '1 4 0t'
#1. und 2. LAN Port
config 'switch_vlan'
option 'device' 'eth0'
option 'vlan' '3'
option 'ports' '2 3 0t'

View File

@ -0,0 +1,12 @@
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:green:system'
option trigger 'heartbeat'

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,29 @@
#Set Mac-Addr of wr1043nd wifi interface if not right
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
if uci get network.ethmesh.macaddr
then
echo "MAC for ETH-BATMAN is set already"
else
echo "Fixing MAC on eth0.3 (ethmesh)"
NEW=$(awk -F: '{ printf("%02x:%02x:%02x:%02x:%02x:%02x\n", ("0x"$1)+2, "0x"$2, "0x"$3, "0x"$4, "0x"$5, "0x"$6 ) }' /sys/class/net/eth0/address)
uci set network.ethmesh.macaddr=$NEW
uci commit
ifconfig eth0.3 hw ether $NEW
ifconfig eth0.3 down
ifconfig eth0.3 up
fi
batctl if add wlan0-1
batctl if add eth0.3