[openwrt/openwrt] ath79: add factory.bin for ALLNET ALL-WAP02860AC

LEDE Commits lede-commits at lists.infradead.org
Fri Jun 11 00:01:39 PDT 2021


ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/a97f4f3b2997fb3e10c711062b4eeaf9cb9da613

commit a97f4f3b2997fb3e10c711062b4eeaf9cb9da613
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Fri Feb 12 18:58:00 2021 -0500

    ath79: add factory.bin for ALLNET ALL-WAP02860AC
    
    This device is a Senao-based product
    using hardware and software from Senao
    with the tar-gz platform for factory.bin
    and checksum verification at boot time
    using variables stored in uboot environment
    and a 'failsafe' image when it fails.
    
    Extremely similar hardware/software to Engenius EAP1200H
    and other Engenius APs with qca955x
    
    Tested-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    (cherry picked from commit 37ea5d9a658a15783b0ac68583db9e67a43e960d)
---
 .../ath79/dts/qca9558_allnet_all-wap02860ac.dts    | 35 ++++++++++++++++++++--
 .../generic/base-files/lib/upgrade/platform.sh     |  1 +
 target/linux/ath79/image/generic.mk                |  5 +++-
 3 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts b/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts
index ba6be49fce..3afbc04ddf 100644
--- a/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts
+++ b/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts
@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
 	model = "ALLNET ALL-WAP02860AC";
@@ -53,6 +54,25 @@
 			gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
 		};
 	};
+
+	virtual_flash {
+		compatible = "mtd-concat";
+
+		devices = <&fwconcat0 &fwconcat1>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				compatible = "openwrt,uimage", "denx,uimage";
+				openwrt,ih-magic = <0x73714f4b>;
+				label = "firmware";
+				reg = <0x0 0x0>;
+			};
+		};
+	};
 };
 
 &eth0 {
@@ -119,9 +139,18 @@
 			};
 
 			partition at a0000 {
-				compatible = "denx,uimage";
-				label = "firmware";
-				reg = <0x0a0000 0xcd0000>;
+				label = "loader";
+				reg = <0x0a0000 0x010000>;
+			};
+
+			fwconcat1: partition at b0000 {
+				label = "fwconcat1";
+				reg = <0x0b0000 0x170000>;
+			};
+
+			fwconcat0: partition at 220000 {
+				label = "fwconcat0";
+				reg = <0x220000 0xb50000>;
 			};
 
 			partition at d70000 {
diff --git a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh
index 19699332fc..f8b1c13677 100644
--- a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh
@@ -47,6 +47,7 @@ platform_do_upgrade() {
 	adtran,bsap1840)
 		redboot_fis_do_upgrade "$1" vmlinux_2
 		;;
+	allnet,all-wap02860ac|\
 	engenius,eap1200h|\
 	engenius,eap300-v2|\
 	engenius,eap600|\
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index bda47ce74d..303907e5bb 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -290,11 +290,14 @@ endef
 TARGET_DEVICES += alfa-network_r36a
 
 define Device/allnet_all-wap02860ac
+  $(Device/senao_loader_okli)
   SOC := qca9558
   DEVICE_VENDOR := ALLNET
   DEVICE_MODEL := ALL-WAP02860AC
   DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct
-  IMAGE_SIZE := 13120k
+  IMAGE_SIZE := 11584k
+  LOADER_FLASH_OFFS := 0x220000
+  SENAO_IMGNAME := senao-allwap02860ac
 endef
 TARGET_DEVICES += allnet_all-wap02860ac
 



More information about the lede-commits mailing list