forked from freifunk-franken/firmware
Adds support for TP Link WR741ND v4
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
parent
c07415d049
commit
03c794cdfa
|
@ -3,7 +3,10 @@ machine=wr741nd
|
|||
target=$builddir/$machine
|
||||
|
||||
board_prepare() {
|
||||
echo "nothing todo" > /dev/null
|
||||
# Das ist für die mangelnde entropie Werte für den Zufallsgenerator
|
||||
# Siehe http://ticket.freifunk-ol.de/issues/406
|
||||
# https://dev.openwrt.org/changeset/33559
|
||||
cat build_patches/backport_the_upstream_entropy_changes.patch | patch -p2 -d $target
|
||||
}
|
||||
|
||||
board_prebuild() {
|
||||
|
@ -12,8 +15,7 @@ board_prebuild() {
|
|||
}
|
||||
|
||||
board_postbuild() {
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-tl-wr741nd-v1-squashfs-factory.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-tl-wr741nd-v1-squashfs-sysupgrade.bin ./bin/
|
||||
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr741nd-v4-squashfs-*.bin ./bin/
|
||||
}
|
||||
|
||||
board_flash() {
|
||||
|
|
2507
bsp/wr741nd/.config
2507
bsp/wr741nd/.config
File diff suppressed because it is too large
Load Diff
|
@ -1,11 +0,0 @@
|
|||
config 'mesh' 'bat0'
|
||||
option 'interfaces' 'wlan0-1'
|
||||
option 'aggregated_ogms'
|
||||
option 'bonding'
|
||||
option 'fragmentation'
|
||||
option 'gw_bandwidth'
|
||||
option 'gw_mode'
|
||||
option 'gw_sel_class'
|
||||
option 'log_level'
|
||||
option 'orig_interval'
|
||||
option 'vis_mode'
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
config 'interface' 'loopback'
|
||||
option 'ifname' 'lo'
|
||||
option 'proto' 'static'
|
||||
|
@ -10,17 +11,42 @@ config 'interface' 'wlanmesh'
|
|||
|
||||
config 'interface' 'mesh'
|
||||
option 'type' 'bridge'
|
||||
option 'ifname' 'eth0 wlan0 bat0 tap0'
|
||||
option 'ifname' 'eth0.1 wlan0 bat0 tap0'
|
||||
option 'auto' '1'
|
||||
|
||||
config 'interface' 'wan'
|
||||
option 'ifname' 'eth1'
|
||||
option 'proto' 'dhcp'
|
||||
|
||||
config switch eth0
|
||||
option enable_vlan 1
|
||||
config 'interface' 'ethmesh1'
|
||||
option 'type' 'bridge'
|
||||
option 'ifname' 'eth0.3'
|
||||
option 'mtu' '1528'
|
||||
|
||||
config 'interface' 'ethmesh2'
|
||||
option 'type' 'bridge'
|
||||
option 'ifname' 'eth0.4'
|
||||
option 'mtu' '1528'
|
||||
|
||||
config switch_vlan
|
||||
option device eth0
|
||||
option vlan 1
|
||||
option ports "0 1 2 3 4"
|
||||
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. LAN Port
|
||||
config 'switch_vlan'
|
||||
option 'device' 'eth0'
|
||||
option 'vlan' '3'
|
||||
option 'ports' '2 0t'
|
||||
|
||||
#2. LAN Port
|
||||
config 'switch_vlan'
|
||||
option 'device' 'eth0'
|
||||
option 'vlan' '4'
|
||||
option 'ports' '3 0t'
|
||||
|
|
|
@ -1,15 +1,7 @@
|
|||
config wifi-device radio0
|
||||
option type mac80211
|
||||
option channel 6
|
||||
option macaddr b0:48:7a:cb:2f:c0
|
||||
option hwmode 11ng
|
||||
option htmode HT20
|
||||
list ht_capab SHORT-GI-40
|
||||
list ht_capab TX-STBC
|
||||
list ht_capab RX-STBC1
|
||||
list ht_capab DSSS_CCK-40
|
||||
# REMOVE THIS LINE TO ENABLE WIFI:
|
||||
option disabled 0
|
||||
option phy phy0
|
||||
|
||||
config wifi-iface
|
||||
option device radio0
|
||||
|
|
|
@ -2,32 +2,24 @@
|
|||
# the system init finished. By default this file does nothing.
|
||||
|
||||
#Set Mac-Addr of wr1043nd wifi interface if not right
|
||||
HARDWARE_MACADDR=`ifconfig -a wlan0 | grep 'HWaddr' | awk '{ print $5}'`
|
||||
SOFTWARE_MACADDR=`uci get wireless.@wifi-device[0].macaddr`
|
||||
WLAN0_MACADDR=`ifconfig -a wlan0 | grep 'HWaddr' | awk '{ print $5}'`
|
||||
BRMESH_MACADDR=`ifconfig -a br-mesh | grep 'HWaddr' | awk '{ print $5}'`
|
||||
|
||||
if [[ "$HARDWARE_MACADDR" != "$SOFTWARE_MACADDR" ]]; then
|
||||
uci set wireless.@wifi-device[0].macaddr=$HARDWARE_MACADDR
|
||||
uci commit
|
||||
#wait before reboot to generate tinc certificates and to be able
|
||||
#to login over ssh bevore reboot in case of errors
|
||||
sleep 30
|
||||
reboot
|
||||
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
|
||||
|
||||
ifconfig br-mesh down
|
||||
ifconfig br-mesh up
|
||||
|
||||
ifdown lan
|
||||
ifup lan
|
||||
batctl if add wlan0-1
|
||||
|
||||
# Starting NTP-Client Daemon
|
||||
ntpd -p "fe80::201:2ff:fe03:405%br-mesh"
|
||||
|
||||
chown root.root /etc/crontabs/root
|
||||
/etc/init.d/cron stop
|
||||
/etc/init.d/cron start
|
||||
|
||||
sh /etc/firewall.user
|
||||
. /etc/firewall.user
|
||||
|
||||
/etc/init.d/qos disable
|
||||
/etc/init.d/qos stop
|
||||
|
@ -36,6 +28,4 @@ sh /etc/firewall.user
|
|||
mkdir /tmp/crawldata
|
||||
httpd -h /tmp/crawldata
|
||||
|
||||
sh /etc/configurator.sh
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue