forked from freifunk-franken/firmware
This adds support for the wr741nd V2
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
parent
ce90577b5d
commit
5fbf402168
28
bsp/board_wr741nd2.bsp
Normal file
28
bsp/board_wr741nd2.bsp
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
|
||||||
|
machine=wr741nd2
|
||||||
|
target=$builddir/$machine
|
||||||
|
|
||||||
|
board_prepare() {
|
||||||
|
# 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() {
|
||||||
|
cp ./bsp/$machine/.config $target/.config
|
||||||
|
cp -r ./bsp/$machine/root_file_system/* $target/files/
|
||||||
|
}
|
||||||
|
|
||||||
|
board_postbuild() {
|
||||||
|
cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr741nd-v2-squashfs-*.bin ./bin/
|
||||||
|
}
|
||||||
|
|
||||||
|
board_flash() {
|
||||||
|
echo "nothing implemented"
|
||||||
|
}
|
||||||
|
|
||||||
|
board_clean() {
|
||||||
|
/bin/rm -rf $target bin/*$machine*
|
||||||
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
machine=wr741nd
|
machine=wr741nd4
|
||||||
target=$builddir/$machine
|
target=$builddir/$machine
|
||||||
|
|
||||||
board_prepare() {
|
board_prepare() {
|
52
bsp/wr741nd2/root_file_system/etc/config/network
Normal file
52
bsp/wr741nd2/root_file_system/etc/config/network
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
|
||||||
|
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' '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'
|
||||||
|
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 2 0t'
|
||||||
|
|
||||||
|
#1. LAN Port
|
||||||
|
config 'switch_vlan'
|
||||||
|
option 'device' 'eth0'
|
||||||
|
option 'vlan' '3'
|
||||||
|
option 'ports' '4 0t'
|
||||||
|
|
||||||
|
#2. LAN Port
|
||||||
|
config 'switch_vlan'
|
||||||
|
option 'device' 'eth0'
|
||||||
|
option 'vlan' '4'
|
||||||
|
option 'ports' '3 0t'
|
22
bsp/wr741nd2/root_file_system/etc/config/wireless
Normal file
22
bsp/wr741nd2/root_file_system/etc/config/wireless
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
config wifi-device radio0
|
||||||
|
option type mac80211
|
||||||
|
option channel 6
|
||||||
|
option phy phy0
|
||||||
|
|
||||||
|
config wifi-iface
|
||||||
|
option device radio0
|
||||||
|
option network wlanmesh
|
||||||
|
option mode adhoc
|
||||||
|
option bssid '02:CA:FF:EE:BA:BE'
|
||||||
|
option ssid 'batman.franken.freifunk.net'
|
||||||
|
option mcast_rate 6000
|
||||||
|
# option bintval 1000
|
||||||
|
option 'encryption' 'none'
|
||||||
|
option 'hidden' '1'
|
||||||
|
|
||||||
|
config wifi-iface
|
||||||
|
option device radio0
|
||||||
|
option network mesh
|
||||||
|
option mode ap
|
||||||
|
option ssid 'franken.freifunk.net'
|
||||||
|
option 'encryption' 'none'
|
3762
bsp/wr741nd4/.config
Normal file
3762
bsp/wr741nd4/.config
Normal file
File diff suppressed because it is too large
Load Diff
11
bsp/wr741nd4/root_file_system/etc/config/system
Normal file
11
bsp/wr741nd4/root_file_system/etc/config/system
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
config 'system'
|
||||||
|
option 'hostname' 'OpenWrt'
|
||||||
|
option 'timezone' 'CET-1CEST,M3.5.0,M10.5.0/3'
|
||||||
|
|
||||||
|
config 'rdate'
|
||||||
|
option 'interface' 'wan'
|
||||||
|
|
||||||
|
config 'led' 'wlan_led'
|
||||||
|
option 'name' 'WLAN'
|
||||||
|
option 'sysfs' 'tl-wr1043nd:green:wlan'
|
||||||
|
option 'trigger' 'phy0rx'
|
31
bsp/wr741nd4/root_file_system/etc/rc.local
Executable file
31
bsp/wr741nd4/root_file_system/etc/rc.local
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
# Put your custom commands here that should be executed once
|
||||||
|
# the system init finished. By default this file does nothing.
|
||||||
|
|
||||||
|
#Set Mac-Addr of wr1043nd wifi interface if not right
|
||||||
|
WLAN0_MACADDR=`ifconfig -a wlan0 | grep 'HWaddr' | awk '{ print $5}'`
|
||||||
|
BRMESH_MACADDR=`ifconfig -a br-mesh | grep 'HWaddr' | awk '{ print $5}'`
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
batctl if add wlan0-1
|
||||||
|
|
||||||
|
# Starting NTP-Client Daemon
|
||||||
|
ntpd -p "fe80::201:2ff:fe03:405%br-mesh"
|
||||||
|
|
||||||
|
. /etc/firewall.user
|
||||||
|
|
||||||
|
/etc/init.d/qos disable
|
||||||
|
/etc/init.d/qos stop
|
||||||
|
|
||||||
|
#busybox-httpd for crawldata
|
||||||
|
mkdir /tmp/crawldata
|
||||||
|
httpd -h /tmp/crawldata
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user