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
|
target=$builddir/$machine
|
||||||
|
|
||||||
board_prepare() {
|
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() {
|
board_prebuild() {
|
||||||
|
@ -12,8 +15,7 @@ board_prebuild() {
|
||||||
}
|
}
|
||||||
|
|
||||||
board_postbuild() {
|
board_postbuild() {
|
||||||
cp $target/bin/ar71xx/openwrt-ar71xx-tl-wr741nd-v1-squashfs-factory.bin ./bin/
|
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr741nd-v4-squashfs-*.bin ./bin/
|
||||||
cp $target/bin/ar71xx/openwrt-ar71xx-tl-wr741nd-v1-squashfs-sysupgrade.bin ./bin/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
board_flash() {
|
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'
|
config 'interface' 'loopback'
|
||||||
option 'ifname' 'lo'
|
option 'ifname' 'lo'
|
||||||
option 'proto' 'static'
|
option 'proto' 'static'
|
||||||
|
@ -10,17 +11,42 @@ config 'interface' 'wlanmesh'
|
||||||
|
|
||||||
config 'interface' 'mesh'
|
config 'interface' 'mesh'
|
||||||
option 'type' 'bridge'
|
option 'type' 'bridge'
|
||||||
option 'ifname' 'eth0 wlan0 bat0 tap0'
|
option 'ifname' 'eth0.1 wlan0 bat0 tap0'
|
||||||
option 'auto' '1'
|
option 'auto' '1'
|
||||||
|
|
||||||
config 'interface' 'wan'
|
config 'interface' 'wan'
|
||||||
option 'ifname' 'eth1'
|
option 'ifname' 'eth1'
|
||||||
option 'proto' 'dhcp'
|
option 'proto' 'dhcp'
|
||||||
|
|
||||||
config switch eth0
|
config 'interface' 'ethmesh1'
|
||||||
option enable_vlan 1
|
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
|
config 'switch'
|
||||||
option device eth0
|
option 'name' 'eth0'
|
||||||
option vlan 1
|
option 'reset' '1'
|
||||||
option ports "0 1 2 3 4"
|
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
|
config wifi-device radio0
|
||||||
option type mac80211
|
option type mac80211
|
||||||
option channel 6
|
option channel 6
|
||||||
option macaddr b0:48:7a:cb:2f:c0
|
option phy phy0
|
||||||
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
|
|
||||||
|
|
||||||
config wifi-iface
|
config wifi-iface
|
||||||
option device radio0
|
option device radio0
|
||||||
|
|
|
@ -2,32 +2,24 @@
|
||||||
# the system init finished. By default this file does nothing.
|
# the system init finished. By default this file does nothing.
|
||||||
|
|
||||||
#Set Mac-Addr of wr1043nd wifi interface if not right
|
#Set Mac-Addr of wr1043nd wifi interface if not right
|
||||||
HARDWARE_MACADDR=`ifconfig -a wlan0 | grep 'HWaddr' | awk '{ print $5}'`
|
WLAN0_MACADDR=`ifconfig -a wlan0 | grep 'HWaddr' | awk '{ print $5}'`
|
||||||
SOFTWARE_MACADDR=`uci get wireless.@wifi-device[0].macaddr`
|
BRMESH_MACADDR=`ifconfig -a br-mesh | grep 'HWaddr' | awk '{ print $5}'`
|
||||||
|
|
||||||
if [[ "$HARDWARE_MACADDR" != "$SOFTWARE_MACADDR" ]]; then
|
if [[ "$WLAN0_MACADDR=" != "$BRMESH_MACADDR=" ]]; then
|
||||||
uci set wireless.@wifi-device[0].macaddr=$HARDWARE_MACADDR
|
echo "Fixing wrong MAC on br-mesh"
|
||||||
uci commit
|
uci set network.mesh.macaddr=$WLAN0_MACADDR
|
||||||
#wait before reboot to generate tinc certificates and to be able
|
uci commit
|
||||||
#to login over ssh bevore reboot in case of errors
|
ifconfig br-mesh hw ether $WLAN0_MACADDR
|
||||||
sleep 30
|
ifconfig br-mesh down
|
||||||
reboot
|
ifconfig br-mesh up
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ifconfig br-mesh down
|
batctl if add wlan0-1
|
||||||
ifconfig br-mesh up
|
|
||||||
|
|
||||||
ifdown lan
|
|
||||||
ifup lan
|
|
||||||
|
|
||||||
# Starting NTP-Client Daemon
|
# Starting NTP-Client Daemon
|
||||||
ntpd -p "fe80::201:2ff:fe03:405%br-mesh"
|
ntpd -p "fe80::201:2ff:fe03:405%br-mesh"
|
||||||
|
|
||||||
chown root.root /etc/crontabs/root
|
. /etc/firewall.user
|
||||||
/etc/init.d/cron stop
|
|
||||||
/etc/init.d/cron start
|
|
||||||
|
|
||||||
sh /etc/firewall.user
|
|
||||||
|
|
||||||
/etc/init.d/qos disable
|
/etc/init.d/qos disable
|
||||||
/etc/init.d/qos stop
|
/etc/init.d/qos stop
|
||||||
|
@ -36,6 +28,4 @@ sh /etc/firewall.user
|
||||||
mkdir /tmp/crawldata
|
mkdir /tmp/crawldata
|
||||||
httpd -h /tmp/crawldata
|
httpd -h /tmp/crawldata
|
||||||
|
|
||||||
sh /etc/configurator.sh
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue