[openwrt/openwrt] qualcommax: ipq5018: gl-b3000: fix rootfs_size in bootscript

LEDE Commits lede-commits at lists.infradead.org
Mon Apr 21 14:56:42 PDT 2025


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/320cdff263268b69c120952907f2452999e3fd38

commit 320cdff263268b69c120952907f2452999e3fd38
Author: Scott Mercer <TheRootEd24 at gmail.com>
AuthorDate: Mon Apr 21 13:12:37 2025 -0400

    qualcommax: ipq5018: gl-b3000: fix rootfs_size in bootscript
    
    rootfs_size was being set after the bootscript was already copied
    to KDIR_TMP/ this was sneaky because it only affected the initial
    compile. All subsequent compiles the rootfs_size is correct before
    the copy is made and the bug goes un discovered. Hence the reason I
    missed it during testing.
    
    this patch fixes the issue and also refactors the
    make recipe to update rootfs_size after the copy
    is made, and updates the copy exclusively.
    
    Fixes: 3307fe8ee4cf ("qualcommax: ipq50xx: add support for GL.iNET GL-B3000")
    
    Signed-off-by: Scott Mercer <TheRootEd24 at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18556
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 include/image-commands.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/image-commands.mk b/include/image-commands.mk
index d767ab356e..ac3f305362 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -511,15 +511,15 @@ define Build/gl-qsdk-factory
 	$(CP) $(BOOT_SCRIPT) $(KDIR_TMP)/
 	$(shell mv $(GL_IMGK) $(GL_IMGK).tmp)
 
+	sed -i "s/rootfs_size/`wc -c $(GL_IMGK) | \
+	cut -d " " -f 1 | xargs printf "0x%x"`/g" $(KDIR_TMP)/$(BOOT_SCRIPT);
+
 	$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
 		$(GL_ITS) \
 		$(BOOT_SCRIPT) \
 		$(GL_UBI) \
 		$(GL_IMGK)
 
-	sed -i "s/rootfs_size/`wc -c $(GL_IMGK) | \
-	cut -d " " -f 1 | xargs printf "0x%x"`/g" $(BOOT_SCRIPT);
-
 	PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f \
 		$(GL_ITS) \
 		$(GL_IMGK)




More information about the lede-commits mailing list