Message ID | 20200312181238.2577-1-freifunk@adrianschmutzler.de |
---|---|
State | Accepted |
Headers | show |
diff --git a/src/packages/fff/fff-network/Makefile b/src/packages/fff/fff-network/Makefile index cb2d0879..49623632 100644 --- a/src/packages/fff/fff-network/Makefile +++ b/src/packages/fff/fff-network/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fff-network -PKG_RELEASE:=14 +PKG_RELEASE:=15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 index 2079fd55..ec6d6717 100644 --- a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 +++ b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 @@ -7,11 +7,10 @@ WAN_PORTS="5 0t" BATMAN_PORTS="3 4 0t" . /lib/functions/system.sh -. /lib/functions/uci-defaults.sh -. /lib/ar71xx.sh +. /lib/functions.sh -# Load second MAC from Flash because we haven't any Interface with this MAC where we can copy the MAC from -# https://github.com/lede-project/source/pull/613/files#diff-abd6f42f54204372151e73eac0556db1 +# Load second MAC address from flash because we haven't any interface with this +# address where we can copy it from ETHMESHMAC=$(macaddr_add $(mtd_get_mac_binary product-info 8) 1) ROUTERMAC=$(cat /sys/class/net/eth0/address) diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 index 4d220760..ec6d6717 100644 --- a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 +++ b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 @@ -7,11 +7,10 @@ WAN_PORTS="5 0t" BATMAN_PORTS="3 4 0t" . /lib/functions/system.sh -. /lib/functions/uci-defaults.sh -. /lib/ar71xx.sh +. /lib/functions.sh -# Load second MAC from Flash because we haven't any Interface with this MAC where we can copy the MAC from -# https://github.com/lede-project/source/pull/613/files#diff-abd6f42f54204372151e73eac0556db1 +# Load second MAC address from flash because we haven't any interface with this +# address where we can copy it from -ETHMESHMAC=$(mtd_get_mac_binary config 0x1017c) +ETHMESHMAC=$(macaddr_add $(mtd_get_mac_binary product-info 8) 1) ROUTERMAC=$(cat /sys/class/net/eth0/address)
Hier ebenfalls: Können wir das nicht aus den Devices ziehen, die OpenWRT uns gibt? Gruß Fabian On 12.03.20 19:12, Adrian Schmutzler wrote: > At the moment, the ETHMESHMAC for the TL-WR1043ND v4 is loaded from > the config partition. The data there is written by the stock firmware, > and thus is dependent on the version installed before and may even > vary in position. > > Instead, this patch uses the product-info partition, which is not > modified by stock firmware. > > While at it, update the sourced library files and the comment for > both v4 and v5. > > ref: https://github.com/openwrt/openwrt/commit/53839da46e6fb21e68b3878b4a2187c7d32d688e > > Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> > --- > src/packages/fff/fff-network/Makefile | 2 +- > .../fff/fff-network/ar71xx/network.tl-wr1043n-v5 | 7 +++---- > .../fff/fff-network/ar71xx/network.tl-wr1043nd-v4 | 9 ++++----- > 3 files changed, 8 insertions(+), 10 deletions(-) > > diff --git a/src/packages/fff/fff-network/Makefile b/src/packages/fff/fff-network/Makefile > index cb2d0879..49623632 100644 > --- a/src/packages/fff/fff-network/Makefile > +++ b/src/packages/fff/fff-network/Makefile > @@ -1,7 +1,7 @@ > include $(TOPDIR)/rules.mk > > PKG_NAME:=fff-network > -PKG_RELEASE:=14 > +PKG_RELEASE:=15 > > PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) > > diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 > index 2079fd55..ec6d6717 100644 > --- a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 > +++ b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 > @@ -7,11 +7,10 @@ WAN_PORTS="5 0t" > BATMAN_PORTS="3 4 0t" > > . /lib/functions/system.sh > -. /lib/functions/uci-defaults.sh > -. /lib/ar71xx.sh > +. /lib/functions.sh > > -# Load second MAC from Flash because we haven't any Interface with this MAC where we can copy the MAC from > -# https://github.com/lede-project/source/pull/613/files#diff-abd6f42f54204372151e73eac0556db1 > +# Load second MAC address from flash because we haven't any interface with this > +# address where we can copy it from > > ETHMESHMAC=$(macaddr_add $(mtd_get_mac_binary product-info 8) 1) > ROUTERMAC=$(cat /sys/class/net/eth0/address) > diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 > index 4d220760..ec6d6717 100644 > --- a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 > +++ b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 > @@ -7,11 +7,10 @@ WAN_PORTS="5 0t" > BATMAN_PORTS="3 4 0t" > > . /lib/functions/system.sh > -. /lib/functions/uci-defaults.sh > -. /lib/ar71xx.sh > +. /lib/functions.sh > > -# Load second MAC from Flash because we haven't any Interface with this MAC where we can copy the MAC from > -# https://github.com/lede-project/source/pull/613/files#diff-abd6f42f54204372151e73eac0556db1 > +# Load second MAC address from flash because we haven't any interface with this > +# address where we can copy it from > > -ETHMESHMAC=$(mtd_get_mac_binary config 0x1017c) > +ETHMESHMAC=$(macaddr_add $(mtd_get_mac_binary product-info 8) 1) > ROUTERMAC=$(cat /sys/class/net/eth0/address) >
Aus dem selben Grund wie beim C60: Reviewed-by: Fabian Bläse <fabian@blaese.de> On 15.03.20 15:59, Fabian Bläse wrote: > Hier ebenfalls: Können wir das nicht aus den Devices ziehen, die OpenWRT uns gibt? > > Gruß > Fabian > > On 12.03.20 19:12, Adrian Schmutzler wrote: >> At the moment, the ETHMESHMAC for the TL-WR1043ND v4 is loaded from >> the config partition. The data there is written by the stock firmware, >> and thus is dependent on the version installed before and may even >> vary in position. >> >> Instead, this patch uses the product-info partition, which is not >> modified by stock firmware. >> >> While at it, update the sourced library files and the comment for >> both v4 and v5. >> >> ref: https://github.com/openwrt/openwrt/commit/53839da46e6fb21e68b3878b4a2187c7d32d688e >> >> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> >> --- >> src/packages/fff/fff-network/Makefile | 2 +- >> .../fff/fff-network/ar71xx/network.tl-wr1043n-v5 | 7 +++---- >> .../fff/fff-network/ar71xx/network.tl-wr1043nd-v4 | 9 ++++----- >> 3 files changed, 8 insertions(+), 10 deletions(-) >> >> diff --git a/src/packages/fff/fff-network/Makefile b/src/packages/fff/fff-network/Makefile >> index cb2d0879..49623632 100644 >> --- a/src/packages/fff/fff-network/Makefile >> +++ b/src/packages/fff/fff-network/Makefile >> @@ -1,7 +1,7 @@ >> include $(TOPDIR)/rules.mk >> >> PKG_NAME:=fff-network >> -PKG_RELEASE:=14 >> +PKG_RELEASE:=15 >> >> PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) >> >> diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 >> index 2079fd55..ec6d6717 100644 >> --- a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 >> +++ b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043n-v5 >> @@ -7,11 +7,10 @@ WAN_PORTS="5 0t" >> BATMAN_PORTS="3 4 0t" >> >> . /lib/functions/system.sh >> -. /lib/functions/uci-defaults.sh >> -. /lib/ar71xx.sh >> +. /lib/functions.sh >> >> -# Load second MAC from Flash because we haven't any Interface with this MAC where we can copy the MAC from >> -# https://github.com/lede-project/source/pull/613/files#diff-abd6f42f54204372151e73eac0556db1 >> +# Load second MAC address from flash because we haven't any interface with this >> +# address where we can copy it from >> >> ETHMESHMAC=$(macaddr_add $(mtd_get_mac_binary product-info 8) 1) >> ROUTERMAC=$(cat /sys/class/net/eth0/address) >> diff --git a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 >> index 4d220760..ec6d6717 100644 >> --- a/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 >> +++ b/src/packages/fff/fff-network/ar71xx/network.tl-wr1043nd-v4 >> @@ -7,11 +7,10 @@ WAN_PORTS="5 0t" >> BATMAN_PORTS="3 4 0t" >> >> . /lib/functions/system.sh >> -. /lib/functions/uci-defaults.sh >> -. /lib/ar71xx.sh >> +. /lib/functions.sh >> >> -# Load second MAC from Flash because we haven't any Interface with this MAC where we can copy the MAC from >> -# https://github.com/lede-project/source/pull/613/files#diff-abd6f42f54204372151e73eac0556db1 >> +# Load second MAC address from flash because we haven't any interface with this >> +# address where we can copy it from >> >> -ETHMESHMAC=$(mtd_get_mac_binary config 0x1017c) >> +ETHMESHMAC=$(macaddr_add $(mtd_get_mac_binary product-info 8) 1) >> ROUTERMAC=$(cat /sys/class/net/eth0/address) >> >
applied.
At the moment, the ETHMESHMAC for the TL-WR1043ND v4 is loaded from the config partition. The data there is written by the stock firmware, and thus is dependent on the version installed before and may even vary in position. Instead, this patch uses the product-info partition, which is not modified by stock firmware. While at it, update the sourced library files and the comment for both v4 and v5. ref: https://github.com/openwrt/openwrt/commit/53839da46e6fb21e68b3878b4a2187c7d32d688e Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> --- src/packages/fff/fff-network/Makefile | 2 +- .../fff/fff-network/ar71xx/network.tl-wr1043n-v5 | 7 +++---- .../fff/fff-network/ar71xx/network.tl-wr1043nd-v4 | 9 ++++----- 3 files changed, 8 insertions(+), 10 deletions(-)