[openwrt/openwrt] ipq40xx: unbreak EZVIZ CS-W3-WD1200G EUP on 5.10

LEDE Commits lede-commits at lists.infradead.org
Fri Dec 3 15:37:58 PST 2021


chunkeey pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/45eb57f12f3a128a1822a20b7e536527ab92ca67

commit 45eb57f12f3a128a1822a20b7e536527ab92ca67
Author: Christian Lamparter <chunkeey at gmail.com>
AuthorDate: Sun Nov 28 15:26:18 2021 +0100

    ipq40xx: unbreak EZVIZ CS-W3-WD1200G EUP on 5.10
    
    with current images, the device is no longer booting.
    It gets stuck in the bootloader with "Config not available"
    and drops to the uboot shell.
    
    |flash_type: 0
    |Hit any key to stop autoboot:  0
    |SF: Detected MX25L12805D with page size 4 KiB, total 16 MiB
    |Config not availabale
    |(IPQ40xx) #
    
    This is because the default bootcmd "bootipq" will only read
    the first four MiB of the kernel image. With 5.10 the gzip'd
    kernel is slightly larger. So the part of the FIT image which
    had the configuration is cut off. Hence it can't find it.
    
    To update the bootcmd, you have to attach the serial console
    again and enter the following commands into the boot prompt:
    
     # setenv bootcmd "sf probe; sf read 84000000 180000 600000; bootm"
     # saveenv
     # run bootcmd
    
    This will allow booting kernels with up to six MiB. This also
    allows us to drop the DEVICE_DTS_CONFIG hack we had to use.
    
    Note:
    uboot doesn't support LZMA. It fails with:
    "Unimplemented compression type 3"
    
    Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 .../ipq40xx/base-files/etc/uci-defaults/05_fix-compat-version  | 10 ++++++++++
 target/linux/ipq40xx/image/generic.mk                          |  5 ++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/target/linux/ipq40xx/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/ipq40xx/base-files/etc/uci-defaults/05_fix-compat-version
new file mode 100644
index 0000000000..44873b9df4
--- /dev/null
+++ b/target/linux/ipq40xx/base-files/etc/uci-defaults/05_fix-compat-version
@@ -0,0 +1,10 @@
+. /lib/functions.sh
+
+case "$(board_name)" in
+ezviz,cs-w3-wd1200g-eup)
+	uci set system. at system[0].compat_version="2.0"
+	uci commit system
+	;;
+esac
+
+exit 0
diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index 872c4f957f..332fff7f45 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -493,13 +493,16 @@ define Device/ezviz_cs-w3-wd1200g-eup
 	DEVICE_VENDOR := EZVIZ
 	DEVICE_MODEL := CS-W3-WD1200G
 	DEVICE_VARIANT := EUP
-	DEVICE_DTS_CONFIG := config at 4
 	IMAGE_SIZE := 14848k
+	KERNEL_SIZE = 6m
 	SOC := qcom-ipq4018
 	IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
 		append-metadata
 	DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers \
 		ipq-wifi-ezviz_cs-w3-wd1200g-eup
+	DEVICE_COMPAT_VERSION := 2.0
+	DEVICE_COMPAT_MESSAGE := uboot's bootcmd has to be updated (see wiki). \
+		Upgrade via sysupgrade mechanism is not possible.
 endef
 TARGET_DEVICES += ezviz_cs-w3-wd1200g-eup
 



More information about the lede-commits mailing list