[PATCH] new file: bsp/ar71xx/root_file_system/etc/network.tl-wa860re modified: bsp/board_ar71xx.bsp modified: bsp/default/root_file_system/etc/network.sh

mayo semmel mayosemmel at googlemail.com
Mi Dez 30 09:56:48 CET 2015


Hallo zusammen,

was ist denn daraus eigentlich geworden?
Im Repo scheint es noch nicht zu sein :-(

Bin auch am überlegen, ob ich eventuell einen neuen Router dazu nehmen
soll (TL-MR3020) und wollte Christians config als Vorlage nehmen, da
die recht ähnlich scheinen.

Viele Grüße
Jan

2015-12-17 23:24 GMT+01:00  <fff at chrisi01.de>:
> From: root <root at static.165.70.76.144.clients.your-server.de>
>
> ---
>  bsp/ar71xx/root_file_system/etc/network.tl-wa860re | 32 ++++++++++++++++++++++
>  bsp/board_ar71xx.bsp                               |  2 ++
>  bsp/default/root_file_system/etc/network.sh        | 15 +++++++++-
>  3 files changed, 48 insertions(+), 1 deletion(-)
>  create mode 100644 bsp/ar71xx/root_file_system/etc/network.tl-wa860re
>
> diff --git a/bsp/ar71xx/root_file_system/etc/network.tl-wa860re b/bsp/ar71xx/root_file_system/etc/network.tl-wa860re
> new file mode 100644
> index 0000000..d4a5611
> --- /dev/null
> +++ b/bsp/ar71xx/root_file_system/etc/network.tl-wa860re
> @@ -0,0 +1,32 @@
> +WANDEV=eth0
> +SWITCHDEV=eth0
> +CLIENT_PORTS=""
> +WAN_PORTS=""
> +BATMAN_PORTS=""
> +
> +. /etc/network.mode
> +
> +CLIENTIF="w2ap"
> +ETHMESHMAC=
> +ROUTERMAC=w2mesh
> +
> +uci set network.$SWITCHDEV=interface
> +uci set network.$SWITCHDEV.ifname=$SWITCHDEV
> +uci set network.mesh.ifname="bat0"
> +
> +if [ "$ETHMODE" = "WAN" ] ; then
> +  ## Activate for WAN:
> +  echo "net.ipv6.conf.$WANDEV.accept_ra_defrtr = 1" >> /etc/sysctl.conf
> +  echo "net.ipv6.conf.$WANDEV.accept_ra_pinfo = 1" >> /etc/sysctl.conf
> +  echo "net.ipv6.conf.$WANDEV.autoconf = 1" >> /etc/sysctl.conf
> +  echo "net.ipv6.conf.$WANDEV.accept_ra_rtr_pref = 1" >> /etc/sysctl.conf
> +  uci set network.wan.ifname=$WANDEV
> +elif [ "$ETHMODE" = "CLIENT" ] ; then
> +  ## Activate Client:
> +  CLIENTIF="w2ap eth0"
> +  uci set network.mesh.ifname="bat0 $SWITCHDEV"
> +else
> +  ## Activate BATMAN:
> +  uci set network.ethmesh.ifname="$SWITCHDEV"
> +  ETH0MAC=1
> +fi
> diff --git a/bsp/board_ar71xx.bsp b/bsp/board_ar71xx.bsp
> index d6055b2..6e01f03 100644
> --- a/bsp/board_ar71xx.bsp
> +++ b/bsp/board_ar71xx.bsp
> @@ -26,6 +26,8 @@ board_postbuild() {
>
>      cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v1-squashfs-*.bin ./bin/
>      cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v2-squashfs-*.bin ./bin/
> +
> +    cp $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wa860re-v1-squashfs-*.bin ./bin/
>  }
>
>  board_clean() {
> diff --git a/bsp/default/root_file_system/etc/network.sh b/bsp/default/root_file_system/etc/network.sh
> index 63d3815..792b5cf 100644
> --- a/bsp/default/root_file_system/etc/network.sh
> +++ b/bsp/default/root_file_system/etc/network.sh
> @@ -100,4 +100,17 @@ if [[ -n "$ROUTERMAC" ]]; then
>          ifconfig br-mesh up
>          /etc/init.d/network restart
>      fi
> -fi
> \ No newline at end of file
> +fi
> +
> +if [[ -n "$ETH0MAC" ]]; then
> +        echo "Fixing MAC on eth0"
> +        sleep 10
> +        NEW_MACADDR=$(cat /sys/class/net/w2ap/address)
> +        uci set network.eth0.macaddr=$NEW_MACADDR
> +        uci commit
> +        ifconfig eth0 down
> +        ifconfig eth0 hw ether $NEW_MACADDR
> +        ifconfig eth0 up
> +        /etc/init.d/network restart
> +fi
> +
> --
> 2.1.4
>
> --
> franken-dev mailing list
> franken-dev at freifunk.net
> http://lists.freifunk.net/mailman/listinfo/franken-dev-freifunk.net



Mehr Informationen über die Mailingliste franken-dev