forked from freifunk-franken/firmware
add support for wr841nd7
This commit is contained in:
parent
31b3c3715c
commit
3e1a5cf8be
|
@ -0,0 +1,28 @@
|
|||
|
||||
machine=wr841nd7
|
||||
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-wr841nd-v7-squashfs-*.bin ./bin/
|
||||
}
|
||||
|
||||
board_flash() {
|
||||
echo "nothing implemented"
|
||||
}
|
||||
|
||||
board_clean() {
|
||||
/bin/rm -rf $target bin/*$machine*
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -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 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'
|
|
@ -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:green:system'
|
||||
option trigger 'heartbeat'
|
||||
|
|
@ -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.oldenburg.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 'oldenburg.freifunk.net'
|
||||
option 'encryption' 'none'
|
|
@ -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