[openwrt/openwrt] build: add additional parameter support to Build/jffs2

LEDE Commits lede-commits at lists.infradead.org
Tue Jan 21 09:39:13 PST 2025


svanheule pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5410d1299ebc4ba316bbe16f0d336772731e5245

commit 5410d1299ebc4ba316bbe16f0d336772731e5245
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Mon Jan 13 17:30:26 2025 +0900

    build: add additional parameter support to Build/jffs2
    
    Allow specifying additional parameters on Build/jffs2.
    This is useful to specify additional options or overriding existing
    ones.
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/17593
    Signed-off-by: Sander Vanheule <sander at svanheule.net>
---
 include/image-commands.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/image-commands.mk b/include/image-commands.mk
index aa48e19399..030cd17dd8 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -438,13 +438,14 @@ endef
 
 define Build/jffs2
 	rm -rf $(KDIR_TMP)/$(DEVICE_NAME)/jffs2 && \
-		mkdir -p $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$$(dirname $(1)) && \
-		cp $@ $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$(1) && \
+		mkdir -p $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$$(dirname $(word 1,$(1))) && \
+		cp $@ $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$(word 1,$(1)) && \
 		$(STAGING_DIR_HOST)/bin/mkfs.jffs2 --pad \
 			$(if $(CONFIG_BIG_ENDIAN),--big-endian,--little-endian) \
 			--squash-uids -v -e $(patsubst %k,%KiB,$(BLOCKSIZE)) \
 			-o $@.new \
 			-d $(KDIR_TMP)/$(DEVICE_NAME)/jffs2 \
+			$(wordlist 2,$(words $(1)),$(1)) \
 			2>&1 1>/dev/null | awk '/^.+$$$$/' && \
 		$(STAGING_DIR_HOST)/bin/padjffs2 $@.new -J $(patsubst %k,,$(BLOCKSIZE))
 	-rm -rf $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/




More information about the lede-commits mailing list