forked from freifunk-franken/firmware
bsp/wr841n8: Initial support
Basically, this is a clone from wr841nd7. Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
parent
d41a1bd919
commit
82b3d32006
|
@ -0,0 +1,25 @@
|
||||||
|
|
||||||
|
machine=wr841n8
|
||||||
|
target=$builddir/$machine
|
||||||
|
|
||||||
|
board_prepare() {
|
||||||
|
echo "nothing todo" > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
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-wr841n-v8-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,41 @@
|
||||||
|
|
||||||
|
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'
|
||||||
|
|
||||||
|
#1. und 2. LAN Port
|
||||||
|
config 'switch_vlan'
|
||||||
|
option 'device' 'eth0'
|
||||||
|
option 'vlan' '1'
|
||||||
|
option 'ports' '1 2 0t'
|
||||||
|
|
||||||
|
#3. und 4. LAN Port
|
||||||
|
config 'switch_vlan'
|
||||||
|
option 'device' 'eth0'
|
||||||
|
option 'vlan' '3'
|
||||||
|
option 'ports' '3 4 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,23 @@
|
||||||
|
config wifi-device radio0
|
||||||
|
option type mac80211
|
||||||
|
option channel 1
|
||||||
|
option phy phy0
|
||||||
|
option hwmode 11ng
|
||||||
|
|
||||||
|
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'
|
|
@ -0,0 +1,46 @@
|
||||||
|
# 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=$(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
|
||||||
|
|
||||||
|
# Starting NTP-Client Daemon
|
||||||
|
ntpd -p "fe80::ff:feee:1%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