[OpenWrt-Devel] [PATCH] wireguard: bump to 0.0.20180620

2018-06-20 Thread Kevin Darbyshire-Bryant via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
0bc4230 version: bump snapshot
ed04799 poly1305: add missing string.h header
cbd4e34 compat: use stabler lkml links
caa718c ratelimiter: do not allow concurrent init and uninit
894ddae ratelimiter: mitigate reference underflow
0a8a62c receive: drop handshake packets if rng is not initialized
cad9e52 noise: wait for crng before taking locks
83c0690 netlink: maintain static_identity lock over entire private key update
0913f1c noise: take locks for ss precomputation
073f31a qemu: bump default kernel
bec4c48 wg-quick: android: don't forget to free compiled regexes
7ce2ef3 wg-quick: android: disable roaming to v6 networks when v4 is specified
9132be4 dns-hatchet: apply resolv.conf's selinux context to new resolv.conf
41a5747 simd: no need to restore fpu state when no preemption
6d7f0b0 simd: encapsulate fpu amortization into nice functions
f8b57d5 queueing: re-enable preemption periodically to lower latency
b7b193f queueing: remove useless spinlocks on sc
5bb62fe tools: getentropy requires 10.12
4e9f120 chacha20poly1305: use slow crypto on -rt kernels on arm too

Compiled-for: ar71xx, lantiq
Run-tested-on: ar71xx Archer C7 v2 & lantiq HH5a

Signed-off-by: Kevin Darbyshire-Bryant 
---
 package/network/services/wireguard/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/services/wireguard/Makefile 
b/package/network/services/wireguard/Makefile
index 3a5fd9cf3b..8edd556ea9 100644
--- a/package/network/services/wireguard/Makefile
+++ b/package/network/services/wireguard/Makefile
@@ -11,12 +11,12 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=wireguard
 
-PKG_VERSION:=0.0.20180531
+PKG_VERSION:=0.0.20180620
 PKG_RELEASE:=1
 
 PKG_SOURCE:=WireGuard-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://git.zx2c4.com/WireGuard/snapshot/
-PKG_HASH:=ff653095cc0e4c491ab6cd095ddf5d1db207f48f947fb92873a73220363f423c
+PKG_HASH:=b4db98ea751c8e667454f98ea1c15d704a784fe1bc093b03bd64575418a7c242
 
 PKG_LICENSE:=GPL-2.0 Apache-2.0
 PKG_LICENSE_FILES:=COPYING
-- 
2.15.2 (Apple Git-101.1)


--- End Message ---
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] brcm2708: Add wifi driver, firmware and NVRAM for Raspberry Pi 3 b

2018-06-20 Thread Daniel Golle
On Wed, Jun 20, 2018 at 07:29:39PM +, Christo Nedev wrote:
> 2708 -> 43430 -> pi0w
> 
> 2709 -> 43430 -> pi3b
> 2709 -> 43455 -> pi3bplus
> 
> 2709 -> 43430 -> pi3b
> 2709 -> 43455 -> pi3bplus
> 
> Signed-off-by: Christo Nedev 

Applied. Thanks!

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] brcm2708: Add wifi driver, firmware and NVRAM for Raspberry Pi 3 b

2018-06-20 Thread Christo Nedev
2708 -> 43430 -> pi0w

2709 -> 43430 -> pi3b
2709 -> 43455 -> pi3bplus

2710 -> 43430 -> pi3b
2710 -> 43455 -> pi3bplus

Signed-off-by: Christo Nedev 
---
 target/linux/brcm2708/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/brcm2708/image/Makefile 
b/target/linux/brcm2708/image/Makefile
index 456570cdec..80a019270d 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -78,7 +78,7 @@ define Device/rpi-3
   DEVICE_TITLE := Raspberry Pi 3B/3B+
   DEVICE_DTS := broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-3-b-plus
   SUPPORTED_DEVICES := rpi-3-b rpi-3-b-plus raspberrypi,3-model-b 
raspberrypi,3-model-b-plus
-  DEVICE_PACKAGES := brcmfmac-firmware-43455-sdio brcmfmac-board-rpi3 
kmod-brcmfmac wpad-mini
+  DEVICE_PACKAGES := brcmfmac-firmware-43430-sdio brcmfmac-board-rpi2 
brcmfmac-firmware-43455-sdio brcmfmac-board-rpi3 kmod-brcmfmac wpad-mini
 endef
 ifeq ($(SUBTARGET),bcm2710)
   TARGET_DEVICES += rpi-3
-- 
2.11.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] brcm2708: Add wifi driver, firmware and NVRAM for Raspberry Pi 3 b

2018-06-20 Thread Christo Nedev
2708 -> 43430 -> pi0w

2709 -> 43430 -> pi3b
2709 -> 43455 -> pi3bplus

2709 -> 43430 -> pi3b
2709 -> 43455 -> pi3bplus

Signed-off-by: Christo Nedev 
---
 target/linux/brcm2708/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/brcm2708/image/Makefile 
b/target/linux/brcm2708/image/Makefile
index 456570cdec..80a019270d 100644
--- a/target/linux/brcm2708/image/Makefile
+++ b/target/linux/brcm2708/image/Makefile
@@ -78,7 +78,7 @@ define Device/rpi-3
   DEVICE_TITLE := Raspberry Pi 3B/3B+
   DEVICE_DTS := broadcom/bcm2710-rpi-3-b broadcom/bcm2710-rpi-3-b-plus
   SUPPORTED_DEVICES := rpi-3-b rpi-3-b-plus raspberrypi,3-model-b 
raspberrypi,3-model-b-plus
-  DEVICE_PACKAGES := brcmfmac-firmware-43455-sdio brcmfmac-board-rpi3 
kmod-brcmfmac wpad-mini
+  DEVICE_PACKAGES := brcmfmac-firmware-43430-sdio brcmfmac-board-rpi2 
brcmfmac-firmware-43455-sdio brcmfmac-board-rpi3 kmod-brcmfmac wpad-mini
 endef
 ifeq ($(SUBTARGET),bcm2710)
   TARGET_DEVICES += rpi-3
-- 
2.11.0


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ieee80211 phy0: rt2x00queue_write_tx_frame: Error - Dropping frame due to full tx queue...?

2018-06-20 Thread Tom Psyborg
god damn it guys, i need new hardware and aliexpress won't just send
me one by mistake :P

https://forum.lede-project.org/t/archer-c50-2-4ghz-wifi-not-stable/575/6

On 30/05/2018, Daniel Golle  wrote:
> Hi!
>
> On Mon, May 28, 2018 at 03:54:33PM +0200, Daniel Golle wrote:
>> Hi!
>>
>> On Mon, May 28, 2018 at 02:50:40PM +0200, Stanislaw Gruszka wrote:
>> > I have some updates here.
>> >
>> > ...
>> ...
>> I've imported the patch to OpenWrt git:
>> https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=f4a639a3d7d40b4f63c431c2d554c479fbcc6b74
>>
>> Once we got some feedback from users (please test!) we can push that
>> also to still be part of the openwrt-18.06 release.
>
> The buildbot run successfully and assembled ready-to-try images for
> MT7620 devices including this latest patch:
>
> http://phase1.builds.openwrt.org/builders/ramips%2Fmt7620/builds/837
>
> Snapshot images from a later build can be found on:
>
> https://downloads.openwrt.org/snapshots/targets/ramips/mt7620/
>
> Please test on your MT7620 devices report back so this can be included
> in the upcoming openwrt-18.06 and lede-17.01.5 releases.
>
>
> Cheers
>
>
> Daniel
>

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ath79: DSA with qca8k

2018-06-20 Thread Lucian Cristian

On 20.06.2018 12:02, John Crispin wrote:



On 20/06/18 10:39, Lucian Cristian wrote:

On 20.06.2018 11:26, Robert Marko wrote:

You are missing CONFIG_NET_DSA_TAG_QCA


Thanks but it doesn't help !


Regards


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


which HW are you using for this ?

    John


wr1043nd-v3 (8327N) or wr1043nd-v4 (8337N)

for 8327N I patched like this:


--- a/drivers/net/dsa/qca8k.c   2018-05-10 22:19:15.885054832 +0300
+++ b/drivers/net/dsa/qca8k.c   2018-05-10 22:19:41.911438171 +0300
@@ -868,8 +868,9 @@
    id = qca8k_read(priv, QCA8K_REG_MASK_CTRL);
    id >>= QCA8K_MASK_CTRL_ID_S;
    id &= QCA8K_MASK_CTRL_ID_M;
-   if (id != QCA8K_ID_QCA8337)
-   return -ENODEV;
+   pr_info ("qca8k detect: \n");
+   if (id != QCA8K_ID_QCA8337 || id != QCA8K_ID_QCA8327N)
+   return -ENODEV;

    priv->ds = dsa_switch_alloc(>dev, DSA_MAX_PORTS);
    if (!priv->ds)
--- a/drivers/net/dsa/qca8k.h   2018-06-02 17:08:44.783407224 +0300
+++ b/drivers/net/dsa/qca8k.h   2018-06-02 17:11:33.339463372 +0300
@@ -23,6 +23,8 @@

 #define PHY_ID_QCA8337 0x004dd036
 #define QCA8K_ID_QCA8337   0x13
+#define PHY_ID_QCA8327N 0x004dd034
+#define QCA8K_ID_QCA8327N  0x12

 #define QCA8K_NUM_FDB_RECORDS  2048


Regards


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 1/2] ath79: add Netgear WNR612 v2

2018-06-20 Thread Zoltan HERPAI
Netgear WNR612 v2:
 - cpu Atheros AR7240 (Python) @400MHz
 - flash 4MB
 - ram 32MB
 - ethernet 10/100: 1xwan + 2xlan (only two)
 - radio AR9285

As there is a rebranded WNR612v2 called ON Networks N150R, add
a dtsi which includes all device support, and add a separate dts
for the device only (with a separate one for the subsequent N150R).

Signed-off-by: Zoltan HERPAI 
---
 target/linux/ath79/base-files/etc/board.d/01_leds  |   5 +
 .../linux/ath79/base-files/etc/board.d/02_network  |   6 +
 .../etc/hotplug.d/firmware/10-ath9k-eeprom |   1 +
 .../linux/ath79/dts/ar7240_netgear_wnr612-v2.dts   |  10 ++
 .../linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi  | 147 +
 target/linux/ath79/image/Makefile  |   1 +
 target/linux/ath79/image/tiny-netgear.mk   |  19 +++
 7 files changed, 189 insertions(+)
 create mode 100644 target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts
 create mode 100644 target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
 create mode 100644 target/linux/ath79/image/tiny-netgear.mk

diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds 
b/target/linux/ath79/base-files/etc/board.d/01_leds
index 92b7e7d..68f94ed 100755
--- a/target/linux/ath79/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/base-files/etc/board.d/01_leds
@@ -22,6 +22,11 @@ case "$board" in
ucidef_set_led_oneshot "modbus" "Modbus" "$boardname:red:modbus" "100" 
"33"
ucidef_set_led_default "etactica" "etactica" "$boardname:red:etactica" 
"ignore"
;;
+"netgear,wnr612-v2")
+   ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0"
+   ucidef_set_led_switch "lan1" "LAN1" "netgear:green:lan1" "switch0" 
"0x02" "0x0f"
+   ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" 
"0x04" "0x0f"
+   ;;
 "tplink,tl-mr3020-v1")
ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x02"
;;
diff --git a/target/linux/ath79/base-files/etc/board.d/02_network 
b/target/linux/ath79/base-files/etc/board.d/02_network
index f734518..2caf443 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -33,6 +33,12 @@ ath79_setup_interfaces()
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
 
+   "netgear,wnr612-v2")
+   ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
+   ucidef_add_switch "switch0" \
+   "0@eth1" "1:lan" "2:lan" "3:lan:3" "4:lan:4"
+   ;;
+
"tplink,tl-mr3020-v1")
ucidef_set_interface_lan "eth0.1"
ucidef_add_switch "switch0" "0@eth0" "1:lan"
diff --git 
a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom 
b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 498cc4e..1ed7460 100644
--- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -54,6 +54,7 @@ case "$FIRMWARE" in
"tplink,tl-wdr4300")
ath9k_eeprom_extract "art" 20480 1088
;;
+   "netgear,wnr612-v2"|\
"tplink,tl-wr740n-v2"|\
"ubnt,unifi")
ath9k_eeprom_extract "art" 4096 2048
diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts 
b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts
new file mode 100644
index 000..d804064
--- /dev/null
+++ b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7240_netgear_wnr612-v2.dtsi"
+
+/ {
+   model = "Netgear WNR612 v2";
+   compatible = "netgear,wnr612-v2";
+};
+
diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi 
b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
new file mode 100644
index 000..c5ceb6e
--- /dev/null
+++ b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
@@ -0,0 +1,147 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include 
+#include 
+
+#include "ar7240.dtsi"
+
+/ {
+   compatible = "netgear,wnr612-v2", "qca,ar7240";
+   model = "Netgear WNR612 V2";
+
+   aliases {
+   led-status = _power;
+   };
+
+   memory@0 {
+   device_type = "memory";
+   reg = <0x0 0x200>;
+   };
+
+   gpio-keys-polled {
+   compatible = "gpio-keys-polled";
+   #address-cells = <1>;
+   #size-cells = <0>;
+   poll-interval = <20>;
+
+   reset {
+   label = "reset";
+   linux,code = ;
+   gpios = < 7 GPIO_ACTIVE_LOW>;
+   debounce-interval = <60>;
+   };
+   };
+
+   gpio-leds {
+   compatible = "gpio-leds";
+   led_power: power {
+   label = "netgear:green:power";
+   

[OpenWrt-Devel] [PATCH v2 2/2] ath79: add support for ON Networks N150R

2018-06-20 Thread Zoltan HERPAI
This is a rebranded Netgear WNR612v2, specs are the same.

 - Atheros AR7240 (Python) @400MHz
 - flash 4MB
 - ram 32MB
 - ethernet 10/100: 1xwan + 2xlan (only two)
 - radio AR9285

Signed-off-by: Zoltan HERPAI 
---
 target/linux/ath79/base-files/etc/board.d/01_leds   |  3 ++-
 target/linux/ath79/base-files/etc/board.d/02_network|  3 ++-
 .../base-files/etc/hotplug.d/firmware/10-ath9k-eeprom   |  1 +
 target/linux/ath79/dts/ar7240_on_n150r.dts  | 10 ++
 target/linux/ath79/image/tiny-netgear.mk| 17 +
 5 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100644 target/linux/ath79/dts/ar7240_on_n150r.dts

diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds 
b/target/linux/ath79/base-files/etc/board.d/01_leds
index 68f94ed..29416ad 100755
--- a/target/linux/ath79/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/base-files/etc/board.d/01_leds
@@ -22,7 +22,8 @@ case "$board" in
ucidef_set_led_oneshot "modbus" "Modbus" "$boardname:red:modbus" "100" 
"33"
ucidef_set_led_default "etactica" "etactica" "$boardname:red:etactica" 
"ignore"
;;
-"netgear,wnr612-v2")
+"netgear,wnr612-v2"|\
+"on,n150r")
ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0"
ucidef_set_led_switch "lan1" "LAN1" "netgear:green:lan1" "switch0" 
"0x02" "0x0f"
ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" 
"0x04" "0x0f"
diff --git a/target/linux/ath79/base-files/etc/board.d/02_network 
b/target/linux/ath79/base-files/etc/board.d/02_network
index 2caf443..743b877 100755
--- a/target/linux/ath79/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/base-files/etc/board.d/02_network
@@ -33,7 +33,8 @@ ath79_setup_interfaces()
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
 
-   "netgear,wnr612-v2")
+   "netgear,wnr612-v2"|\
+   "on,n150r")
ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
ucidef_add_switch "switch0" \
"0@eth1" "1:lan" "2:lan" "3:lan:3" "4:lan:4"
diff --git 
a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom 
b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 1ed7460..5b22b15 100644
--- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -55,6 +55,7 @@ case "$FIRMWARE" in
ath9k_eeprom_extract "art" 20480 1088
;;
"netgear,wnr612-v2"|\
+   "on,n150r"|\
"tplink,tl-wr740n-v2"|\
"ubnt,unifi")
ath9k_eeprom_extract "art" 4096 2048
diff --git a/target/linux/ath79/dts/ar7240_on_n150r.dts 
b/target/linux/ath79/dts/ar7240_on_n150r.dts
new file mode 100644
index 000..cb4cf92
--- /dev/null
+++ b/target/linux/ath79/dts/ar7240_on_n150r.dts
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "ar7240_netgear_wnr612-v2.dtsi"
+
+/ {
+   model = "ON Network N150R";
+   compatible = "on,n150r";
+};
+
diff --git a/target/linux/ath79/image/tiny-netgear.mk 
b/target/linux/ath79/image/tiny-netgear.mk
index 81f83fd..48d14e9 100644
--- a/target/linux/ath79/image/tiny-netgear.mk
+++ b/target/linux/ath79/image/tiny-netgear.mk
@@ -17,3 +17,20 @@ define Device/netgear_wnr612-v2
   SUPPORTED_DEVICES := netgear,wnr612-v2 wnr612-v2
 endef
 TARGET_DEVICES += netgear_wnr612-v2
+
+define Device/n150r
+  ATH_SOC := ar7240
+  DEVICE_TITLE := ON Network N150R
+  DEVICE_DTS := ar7240_on_n150r
+  NETGEAR_KERNEL_MAGIC := 0x32303631
+  KERNEL := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma
+  KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma
+  NETGEAR_BOARD_ID := N150R
+  IMAGE_SIZE := 3904k
+  IMAGES := sysupgrade.bin factory.img
+  IMAGE/default := append-kernel | pad-to (BLOCKSIZE) | netgear-squashfs | 
append-rootfs | pad-rootfs
+  IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size 
(IMAGE_SIZE)
+  IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size 
(IMAGE_SIZE)
+  SUPPORTED_DEVICES := on,n150r n150r
+endef
+TARGET_DEVICES += n150r
-- 
2.1.4


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/4] ramips: RE350: add rootfs offset to header

2018-06-20 Thread Alex Maclean
Have mktplinkfw fill in the rootfs offset so the firmware splitter can
find it without aligning to erase blocks.

Signed-off-by: Alex Maclean 
---
 target/linux/ramips/image/mt7621.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/image/mt7621.mk 
b/target/linux/ramips/image/mt7621.mk
index f6f8ea065b..54ae76474c 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -242,7 +242,7 @@ define Device/re350-v1
   TPLINK_HWREV := 0
   TPLINK_HEADER_VERSION := 1
   IMAGE_SIZE := 6016k
-  KERNEL := $(KERNEL_DTB) | tplink-v1-header -e
+  KERNEL := $(KERNEL_DTB) | tplink-v1-header -e -O
   IMAGES := sysupgrade.bin factory.bin
   IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | 
append-metadata | check-size (IMAGE_SIZE)
   IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
-- 
2.17.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/4] firmware-utils: tplink-safeloader: add dynamic partitions

2018-06-20 Thread Alex Maclean
Add support to dynamically split the firmware partition into os-image
and file-system partitions. This is done by replacing those entries in
the partition table with a single unified firmware partition, which is
then split according to actual kernel image size.

The factory image will have the file-system partition aligned to a 64K
erase block, but the sysupgrade image skips this and aligns only the
JFFS2 EOF marker to squeeze out more space.

This should prevent further creeping updates to the kernel partition
size while maximizing space for the overlay filesystem on smaller
devices.

Signed-off-by: Alex Maclean 
---
 tools/firmware-utils/src/tplink-safeloader.c | 71 
 1 file changed, 58 insertions(+), 13 deletions(-)

diff --git a/tools/firmware-utils/src/tplink-safeloader.c 
b/tools/firmware-utils/src/tplink-safeloader.c
index 27c5aa8497..1d011446f5 100644
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -65,7 +65,7 @@ struct image_partition_entry {
 
 /** A flash partition table entry */
 struct flash_partition_entry {
-   const char *name;
+   char *name;
uint32_t base;
uint32_t size;
 };
@@ -77,7 +77,7 @@ struct device_info {
const char *support_list;
char support_trail;
const char *soft_ver;
-   const struct flash_partition_entry partitions[MAX_PARTITIONS+1];
+   struct flash_partition_entry partitions[MAX_PARTITIONS+1];
const char *first_sysupgrade_partition;
const char *last_sysupgrade_partition;
 };
@@ -1135,7 +1135,7 @@ static struct image_partition_entry 
make_soft_version_from_string(const char *so
 }
 
 /** Generates the support-list partition */
-static struct image_partition_entry make_support_list(const struct device_info 
*info) {
+static struct image_partition_entry make_support_list(struct device_info 
*info) {
size_t len = strlen(info->support_list);
struct image_partition_entry entry = 
alloc_image_partition("support-list", len + 9);
 
@@ -1148,7 +1148,7 @@ static struct image_partition_entry 
make_support_list(const struct device_info *
 }
 
 /** Creates a new image partition with an arbitrary name from a file */
-static struct image_partition_entry read_file(const char *part_name, const 
char *filename, bool add_jffs2_eof) {
+static struct image_partition_entry read_file(const char *part_name, const 
char *filename, bool add_jffs2_eof, struct flash_partition_entry 
*file_system_partition) {
struct stat statbuf;
 
if (stat(filename, ) < 0)
@@ -1157,7 +1157,10 @@ static struct image_partition_entry read_file(const char 
*part_name, const char
size_t len = statbuf.st_size;
 
if (add_jffs2_eof)
-   len = ALIGN(len, 0x1) + sizeof(jffs2_eof_mark);
+   if (file_system_partition)
+   len = ALIGN(len + file_system_partition->base, 0x1) 
+ sizeof(jffs2_eof_mark) - file_system_partition->base;
+   else
+   len = ALIGN(len, 0x1) + sizeof(jffs2_eof_mark);
 
struct image_partition_entry entry = alloc_image_partition(part_name, 
len);
 
@@ -1273,7 +1276,7 @@ static void put_md5(uint8_t *md5, uint8_t *buffer, 
unsigned int len) {
  1014-1813Image partition table (2048 bytes, padded with 0xff)
  1814-Firmware partitions
 */
-static void * generate_factory_image(const struct device_info *info, const 
struct image_partition_entry *parts, size_t *len) {
+static void * generate_factory_image(struct device_info *info, const struct 
image_partition_entry *parts, size_t *len) {
*len = 0x1814;
 
size_t i;
@@ -1306,7 +1309,7 @@ static void * generate_factory_image(const struct 
device_info *info, const struc
should be generalized when TP-LINK starts building its safeloader into 
hardware with
different flash layouts.
 */
-static void * generate_sysupgrade_image(const struct device_info *info, const 
struct image_partition_entry *image_parts, size_t *len) {
+static void * generate_sysupgrade_image(struct device_info *info, const struct 
image_partition_entry *image_parts, size_t *len) {
size_t i, j;
size_t flash_first_partition_index = 0;
size_t flash_last_partition_index = 0;
@@ -1369,10 +1372,53 @@ static void build_image(const char *output,
uint32_t rev,
bool add_jffs2_eof,
bool sysupgrade,
-   const struct device_info *info) {
+   struct device_info *info) {
+
+   size_t i;
 
struct image_partition_entry parts[7] = {};
 
+   struct flash_partition_entry *firmware_partition = NULL;
+   struct flash_partition_entry *os_image_partition = NULL;
+   struct flash_partition_entry *file_system_partition = NULL;
+   size_t firmware_partition_index = 0;
+
+   for (i = 0; info->partitions[i].name; i++) {
+   if (!strcmp(info->partitions[i].name, 

[OpenWrt-Devel] [PATCH 4/4] firmware-utils: tplink-safeloader: switch RE350 to dynamic partitions

2018-06-20 Thread Alex Maclean
Use the new dynamic partition split in tplink-safeloader so we no longer
have to worry about kernel size increases.

Signed-off-by: Alex Maclean 
---
 tools/firmware-utils/src/tplink-safeloader.c | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/tools/firmware-utils/src/tplink-safeloader.c 
b/tools/firmware-utils/src/tplink-safeloader.c
index 1d011446f5..38825bfaa1 100644
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -889,14 +889,10 @@ static struct device_info boards[] = {
.support_trail = '\x00',
.soft_ver = NULL,
 
-   /**
-   The original os-image partition is too small,
-   so we enlarge it to 1.75M
-   */
+   /** We're using a dynamic kernel/rootfs split here */
.partitions = {
{"fs-uboot", 0x0, 0x2},
-   {"os-image", 0x2, 0x1c},
-   {"file-system", 0x1e, 0x42},
+   {"firmware", 0x2, 0x5e},
{"partition-table", 0x60, 0x02000},
{"default-mac", 0x61, 0x00020},
{"pin", 0x610100, 0x00020},
-- 
2.17.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/4] firmware-utils: mktplinkfw: add rootfs offset for combined images

2018-06-20 Thread Alex Maclean
Add an option (-O) to calculate rootfs offset for combined images.

This is needed for the TP-Link mtdsplit driver to locate the rootfs
when the start is not aligned to an erase block. This will be the
case for sysupgrade images produced by tplink-safeloader with upcoming
dynamic partition splitting.

Signed-off-by: Alex Maclean 
---
 tools/firmware-utils/src/mktplinkfw.c | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tools/firmware-utils/src/mktplinkfw.c 
b/tools/firmware-utils/src/mktplinkfw.c
index ab5fd6d58b..ce2acc20c9 100644
--- a/tools/firmware-utils/src/mktplinkfw.c
+++ b/tools/firmware-utils/src/mktplinkfw.c
@@ -107,6 +107,7 @@ static uint32_t reserved_space;
 static struct file_info inspect_info;
 static int extract = 0;
 static bool endian_swap = false;
+static bool rootfs_ofs_calc = false;
 
 static const char md5salt_normal[MD5SUM_LEN] = {
0xdc, 0xd7, 0x3a, 0xa5, 0xc3, 0x95, 0x98, 0xfb,
@@ -202,6 +203,7 @@ static void usage(int status)
 "  -rread rootfs image from the file \n"
 "  -a   align the rootfs start on an  bytes boundary\n"
 "  -R  overwrite rootfs offset with  (hexval prefixed with 
0x)\n"
+"  -O  calculate rootfs offset for combined images\n"
 "  -owrite output to the file \n"
 "  -s  strip padding from the end of the image\n"
 "  -j  add jffs2 end-of-filesystem markers\n"
@@ -384,6 +386,10 @@ void fill_header(char *buf, int len)
hdr->rootfs_len = htonl(rootfs_info.file_size);
}
 
+   if (combined && rootfs_ofs_calc) {
+   hdr->rootfs_ofs = htonl(sizeof(struct fw_header) + kernel_len);
+   }
+
hdr->ver_hi = htons(fw_ver_hi);
hdr->ver_mid = htons(fw_ver_mid);
hdr->ver_lo = htons(fw_ver_lo);
@@ -539,7 +545,7 @@ int main(int argc, char *argv[])
while ( 1 ) {
int c;
 
-   c = getopt(argc, argv, 
"a:H:E:F:L:m:V:N:W:C:ci:k:r:R:o:xX:ehsjv:");
+   c = getopt(argc, argv, 
"a:H:E:F:L:m:V:N:W:C:ci:k:r:R:o:OxX:ehsjv:");
if (c == -1)
break;
 
@@ -592,6 +598,9 @@ int main(int argc, char *argv[])
case 'o':
ofname = optarg;
break;
+   case 'O':
+   rootfs_ofs_calc = 1;
+   break;
case 's':
strip_padding = 1;
break;
-- 
2.17.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


[OpenWrt-Devel] ipq806x/ipq40xx: Dropped VLAN patch

2018-06-20 Thread Matej Kupljen

Hi all,

I was wondering why the following patch was not used for ipq40xx boards?
https://github.com/chunkeey/LEDE-IPQ40XX/blob/608803737f1c072d3be141f5d8561bc8dd9a4c2d/target/linux/ipq806x/patches-4.9/712-net-essedma-disable-default-vlan.patch

It seems it got dropped when the split of ipq806x and ipq40xx happened.

As described in the patch itself, the driver uses some unique management
of the VLANs and this patch fixes this so it uses the kernel's VLAN
feature.

I tested this on a IPQ4019 based board and is working O.K.

Any ideas why it is not used?

Regards,
Matej

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Add BlueZ Firmware package

2018-06-20 Thread Alberto Bursi




On 20/06/2018 11:54, Matej Kupljen wrote:

Hi all,

the following patch adds a BlueZ Firmware support.

It was tested on Raspberry PI Zero W board only, but I believe it should
work also on other boards, since it is not board specific.

Signed-off-by: Matej Kupljen 
---


Bluez package is in community package repository, 
https://github.com/openwrt/packages so the firmwares should go there as 
well. Please open a PR in that github repository.


This is bluez packages makefile, for example 
https://github.com/openwrt/packages/blob/master/utils/bluez/Makefile


-Alberto

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Add BlueZ Firmware package

2018-06-20 Thread Matej Kupljen

Hi all,

the following patch adds a BlueZ Firmware support.

It was tested on Raspberry PI Zero W board only, but I believe it should
work also on other boards, since it is not board specific.

Signed-off-by: Matej Kupljen 
---


diff --git a/package/firmware/bluez-firmware/Makefile 
b/package/firmware/bluez-firmware/Makefile

new file mode 100644
index 000..0f6046b
--- /dev/null
+++ b/package/firmware/bluez-firmware/Makefile
@@ -0,0 +1,38 @@
+#
+# Copyright (C) 2018 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bluez-firmware
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/RPi-Distro/bluez-firmware.git
+PKG_SOURCE_DATE:=2018-06-15
+PKG_SOURCE_VERSION:=ade2bae1aaaebede09abb8fb546f767a0e4c7804
+PKG_RELEASE:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/bluez-firmware
+  SECTION:=firmware
+  CATEGORY:=Firmware
+  URL:=$(PKG_SOURCE_URL)
+  TITLE:=BlueZ Firmware
+  DEPENDS:=
+endef
+
+define Package/bluez-firmware/compile
+endef
+
+define Package/bluez-firmware/install
+   $(INSTALL_DIR) $(1)/lib/firmware/brcm
+   $(INSTALL_DATA) $(PKG_BUILD_DIR)/broadcom/*.bin $(1)/lib/firmware/brcm
+   $(INSTALL_DATA) $(PKG_BUILD_DIR)/broadcom/*.hex $(1)/lib/firmware/brcm
+   $(INSTALL_DATA) $(PKG_BUILD_DIR)/broadcom/*.hcd $(1)/lib/firmware/brcm
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/broadcom/BCM-LEGAL.txt 
$(1)/lib/firmware/brcm

+endef
+
+$(eval $(call BuildPackage,bluez-firmware))

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ath79: DSA with qca8k

2018-06-20 Thread John Crispin



On 20/06/18 10:39, Lucian Cristian wrote:

On 20.06.2018 11:26, Robert Marko wrote:

You are missing CONFIG_NET_DSA_TAG_QCA


Thanks but it doesn't help !


Regards


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


which HW are you using for this ?

    John

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ath79: DSA with qca8k

2018-06-20 Thread Lucian Cristian

On 20.06.2018 11:26, Robert Marko wrote:

You are missing CONFIG_NET_DSA_TAG_QCA


Thanks but it doesn't help !


Regards


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel


[OpenWrt-Devel] ath79: DSA with qca8k

2018-06-20 Thread Lucian Cristian
I tried the example found in bindings and in qca8k staging but I don't 
have any output when the device starts or when the module is loaded, if 
is built as module.


Tried with a qca9563+qca8337n switch and also with a qca9558+qca8327n 
switch with id added to qca8k driver, I also enabled printk on every 
function in the driver but nothing is printed.


I added a new dsa subtarget with this kernel options

# CONFIG_AG71XX is not set
# CONFIG_AG71XX_DEBUG is not set
# CONFIG_AG71XX_DEBUG_FS is not set
# CONFIG_AR8216_PHY is not set
# CONFIG_AR8216_PHY_LEDS is not set
# CONFIG_RTL8366RB_PHY is not set
# CONFIG_RTL8366S_PHY is not set
# CONFIG_RTL8366_SMI is not set
# CONFIG_SWCONFIG is not set
# CONFIG_SWCONFIG_LEDS is not set
CONFIG_NET_DSA=y
CONFIG_NET_DSA_RTK_SMI=y
CONFIG_NET_DSA_QCA8K=y
CONFIG_NET_NS=y
CONFIG_NET_PACKET_ENGINE=y
CONFIG_NET_SWITCHDEV=y

Is there something missing or the problem should be in dts file ?


Regards


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel