[PATCH] new file: bsp/board_wa860re.bsp modified: bsp/default/root_file_system/etc/network.sh new file: bsp/wa860re/.config new file: bsp/wa860re/root_file_system/etc/network.mode new file: bsp/wa860re/root_file_system/etc/network.tl-wa860re

Tobias Klaus tk+ff at meskal.net
Do Dez 17 09:56:12 CET 2015


Hey Christian!

Sehr coole Sache! Gratulation zu deinem ersten Patch!

Was mir beim Überfliegen gerade aufgefallen ist: Dieser wa860re ist doch auch 
einer der Router mit einem ar71xx soc. Die werden aber mittlerweile im 
Firmwarerepo unter einem BSP verwaltet. Ich denke es wäre sinnvoll dein bsp da 
mit zu integrieren. Allein schon weil wir dadurch massiv Ressourcen und Zeit 
beim Bauen sparen. Auch der Patch sollte übersichtlicher werden.
Wenn ich da den richtigen Überlick habe, müsstest du eigentlich nur die 
bsp/wa860re/root_file_system/etc/network.tl-wa860re in das bsp kopieren und 
und die bsp/board_ar71xx.bsp entsprechend anpassen müssen. .config sollte dann 
eigentlich schon passen.

Grüße
Tobias


Am Donnerstag, 17. Dezember 2015, 09:23:27 schrieb fff at chrisi01.de:
> From: root <root at static.165.70.76.144.clients.your-server.de>
> 
> ---
>  bsp/board_wa860re.bsp                              |   20 +
>  bsp/default/root_file_system/etc/network.sh        |   14 +-
>  bsp/wa860re/.config                                | 2772
> ++++++++++++++++++++ bsp/wa860re/root_file_system/etc/network.mode      |  
> 19 +
>  .../root_file_system/etc/network.tl-wa860re        |   32 +
>  5 files changed, 2856 insertions(+), 1 deletion(-)
>  create mode 100644 bsp/board_wa860re.bsp
>  create mode 100644 bsp/wa860re/.config
>  create mode 100644 bsp/wa860re/root_file_system/etc/network.mode
>  create mode 100644 bsp/wa860re/root_file_system/etc/network.tl-wa860re
> 
> diff --git a/bsp/board_wa860re.bsp b/bsp/board_wa860re.bsp
> new file mode 100644
> index 0000000..7a24573
> --- /dev/null
> +++ b/bsp/board_wa860re.bsp
> @@ -0,0 +1,20 @@
> +machine=wa860re
> +target=$builddir/$machine
> +
> +board_prepare() {
> +        echo "nothing todo" > /dev/null
> +}
> +
> +board_prebuild() {
> +        echo "nothing todo" > /dev/null
> +}
> +
> +board_postbuild() {
> +    cp
> $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wa860re-v1-squashfs-factory.bi
> n ./bin/ +    cp
> $target/bin/ar71xx/openwrt-ar71xx-generic-tl-wa860re-v1-squashfs-sysupgrade
> .bin ./bin/ +}
> +
> +board_clean() {
> +        /bin/rm -rf $target bin/*$machine*
> +}
> +
> diff --git a/bsp/default/root_file_system/etc/network.sh
> b/bsp/default/root_file_system/etc/network.sh index 63d3815..6c64083 100644
> --- a/bsp/default/root_file_system/etc/network.sh
> +++ b/bsp/default/root_file_system/etc/network.sh
> @@ -100,4 +100,16 @@ 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

> diff --git a/bsp/wa860re/root_file_system/etc/network.mode
> b/bsp/wa860re/root_file_system/etc/network.mode new file mode 100644
> index 0000000..f0bb77e
> --- /dev/null
> +++ b/bsp/wa860re/root_file_system/etc/network.mode
> @@ -0,0 +1,19 @@
> +#what should the one eth0 ethernet port be used for?
> +#directly connect to other mesh nodes - this is the default
> +ETHMODE="BATMAN"
> +
> +#Connect with fastd vpn
> +#ETHMODE="WAN"
> +
> +#connect normal ff-clients
> +
> +#ETHMODE="CLIENT"
> +
> +################
> +## If you want to change the behavior of eth0, you can change it above.
> +## After that you have to reset the config with following commands.
> +#cp /rom/etc/sysctl.conf /etc/sysctl.conf
> +#cp /rom/etc/config/network /etc/config/network
> +#reboot
> +################
> +
> diff --git a/bsp/wa860re/root_file_system/etc/network.tl-wa860re
> b/bsp/wa860re/root_file_system/etc/network.tl-wa860re new file mode 100644
> index 0000000..d4a5611
> --- /dev/null
> +++ b/bsp/wa860re/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
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : signature.asc
Dateityp    : application/pgp-signature
Dateigröße  : 819 bytes
Beschreibung: This is a digitally signed message part.
URL         : <http://lists.freifunk.net/pipermail/franken-dev-freifunk.net/attachments/20151217/cdae1057/attachment-0002.sig>


Mehr Informationen über die Mailingliste franken-dev