[openwrt/openwrt] ipq40xx: fix up Linksys WHW01 board name, device definition

LEDE Commits lede-commits at lists.infradead.org
Sat Dec 31 09:57:31 PST 2022


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/2a9f3b7717d081a9d6cb34d7ad04e14b4e50d69e

commit 2a9f3b7717d081a9d6cb34d7ad04e14b4e50d69e
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Mon Dec 5 19:44:32 2022 -0800

    ipq40xx: fix up Linksys WHW01 board name, device definition
    
    Update the board name defined in DTS to match online documentation and the
    name encoded into factory firmware. This helps supports flashing firmware
    factory images using 'sysupgrade'.
    
    Original WHW01 device definition assumes the rootfs IMAGE_SIZE is 33 MB
    instead of the correct 74 MB, and defines factory images which include
    extra adjustments/padding that do not match OEM factory images and may
    cause problems flashing. Update image size and build recipe to fix these.
    
    Suggested-by: Wyatt Martin <wawowl at gmail.com>
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 package/boot/uboot-envtools/files/ipq40xx                     |  2 +-
 target/linux/ipq40xx/base-files/etc/init.d/bootcount          |  2 +-
 target/linux/ipq40xx/base-files/lib/upgrade/platform.sh       |  2 +-
 .../dts/{qcom-ipq4018-whw01-v1.dts => qcom-ipq4018-whw01.dts} |  4 ++--
 target/linux/ipq40xx/image/generic.mk                         | 11 ++++-------
 5 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/package/boot/uboot-envtools/files/ipq40xx b/package/boot/uboot-envtools/files/ipq40xx
index 4ee83bb057..6c65ed752d 100644
--- a/package/boot/uboot-envtools/files/ipq40xx
+++ b/package/boot/uboot-envtools/files/ipq40xx
@@ -63,7 +63,7 @@ linksys,ea8300|\
 linksys,mr8300)
 	ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x40000" "0x20000"
 	;;
-linksys,whw01-v1)
+linksys,whw01)
 	ubootenv_add_uci_config "/dev/mtd6" "0x0" "0x40000" "0x10000"
 	;;
 zyxel,nbg6617)
diff --git a/target/linux/ipq40xx/base-files/etc/init.d/bootcount b/target/linux/ipq40xx/base-files/etc/init.d/bootcount
index 367ccfcd0c..6acebcef6e 100755
--- a/target/linux/ipq40xx/base-files/etc/init.d/bootcount
+++ b/target/linux/ipq40xx/base-files/etc/init.d/bootcount
@@ -11,7 +11,7 @@ boot() {
 	linksys,ea6350v3|\
 	linksys,ea8300|\
 	linksys,mr8300|\
-	linksys,whw01-v1)
+	linksys,whw01)
 		mtd resetbc s_env || true
 		;;
 	netgear,wac510)
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
index 12fa9699c5..73feefb3ea 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -164,7 +164,7 @@ platform_do_upgrade() {
 	linksys,ea6350v3 |\
 	linksys,ea8300 |\
 	linksys,mr8300 |\
-	linksys,whw01-v1)
+	linksys,whw01)
 		platform_do_upgrade_linksys "$1"
 		;;
 	meraki,mr33 |\
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-whw01-v1.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-whw01.dts
similarity index 98%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-whw01-v1.dts
rename to target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-whw01.dts
index 8ca57a0e85..09349219ed 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-whw01-v1.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-whw01.dts
@@ -6,8 +6,8 @@
 #include <dt-bindings/input/input.h>
 
 / {
-	model = "Linksys WHW01 v1";
-	compatible = "linksys,whw01-v1";
+	model = "Linksys WHW01";
+	compatible = "linksys,whw01";
 
 	aliases {
 		serial0 = &blsp1_uart1;
diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index e17db37d82..a2807c6c9c 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -720,25 +720,22 @@ define Device/linksys_mr8300
 endef
 TARGET_DEVICES += linksys_mr8300
 
-define Device/linksys_whw01-v1
+define Device/linksys_whw01
 	$(call Device/FitzImage)
 	DEVICE_VENDOR := Linksys
 	DEVICE_MODEL := WHW01
-	DEVICE_VARIANT := v1
 	KERNEL_SIZE := 6144k
-	IMAGE_SIZE := 28704512  # 28032k minus linksys signature (256-bytes).
+	IMAGE_SIZE := 75776K
 	SOC := qcom-ipq4018
 	BLOCKSIZE := 128k
 	PAGESIZE := 2048
 	UBINIZE_OPTS := -E 5    # EOD marks to "hide" factory sig at EOF
 	IMAGES += factory.bin
-	IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
-		append-ubi | linksys-image type=WHW01 | pad-to $$$$(PAGESIZE) | \
-		check-size
+	IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=WHW01
 	DEVICE_PACKAGES := uboot-envtools kmod-leds-pca963x
 endef
 # Missing DSA Setup
-#TARGET_DEVICES += linksys_whw01-v1
+#TARGET_DEVICES += linksys_whw01
 
 define Device/luma_wrtq-329acn
 	$(call Device/FitImage)




More information about the lede-commits mailing list