Skip to content

Commit 320cdff

Browse files
TheRootED24robimarko
authored andcommitted
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: 3307fe8 ("qualcommax: ipq50xx: add support for GL.iNET GL-B3000") Signed-off-by: Scott Mercer <TheRootEd24@gmail.com> Link: openwrt#18556 Signed-off-by: Robert Marko <robimarko@gmail.com>
1 parent f45df21 commit 320cdff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/image-commands.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,15 +511,15 @@ define Build/gl-qsdk-factory
511511
$(CP) $(BOOT_SCRIPT) $(KDIR_TMP)/
512512
$(shell mv $(GL_IMGK) $(GL_IMGK).tmp)
513513

514+
sed -i "s/rootfs_size/`wc -c $(GL_IMGK) | \
515+
cut -d " " -f 1 | xargs printf "0x%x"`/g" $(KDIR_TMP)/$(BOOT_SCRIPT);
516+
514517
$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
515518
$(GL_ITS) \
516519
$(BOOT_SCRIPT) \
517520
$(GL_UBI) \
518521
$(GL_IMGK)
519522

520-
sed -i "s/rootfs_size/`wc -c $(GL_IMGK) | \
521-
cut -d " " -f 1 | xargs printf "0x%x"`/g" $(BOOT_SCRIPT);
522-
523523
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f \
524524
$(GL_ITS) \
525525
$(GL_IMGK)

0 commit comments

Comments
 (0)