Allow extra options to be passed to ubifs creation tools
PATCH 1/1 Allow extra options to be passed to ubifs creation tools
--- fs/ubifs/Config.in | 14 ++++++++++++++ fs/ubifs/ubi.mk | 2 ++ fs/ubifs/ubifs.mk | 4 +++- 3 files changed, 19 insertions(+), 1 deletion(-)
fs/ubifs/Config.in +14 -0
@@ -77,6 +77,13 @@ config BR2_TARGET_ROOTFS_UBIFS_LZMA endchoice +config BR2_TARGET_ROOTFS_UBIFS_OPTS + string "Additional mkfs.ubifs options" + default "" + depends on BR2_TARGET_ROOTFS_UBIFS + help + Any additional mkfs.ubifs options you may want to include. + config BR2_TARGET_ROOTFS_UBI depends on BR2_TARGET_ROOTFS_UBIFS bool "Embed into an UBI image"
@@ -98,3 +105,10 @@ config BR2_TARGET_ROOTFS_UBI_SUBSIZE help Tells ubinize that the flash supports sub-pages and the sub-page size. Use 0 if subpages are not supported on flash chip. + +config BR2_TARGET_ROOTFS_UBI_OPTS + string "Additional ubinize options" + default "" + depends on BR2_TARGET_ROOTFS_UBI + help + Any additional ubinize options you may want to include.
fs/ubifs/ubi.mk +2 -0
@@ -10,6 +10,8 @@ ifneq ($(BR2_TARGET_ROOTFS_UBI_SUBSIZE),0) UBI_UBINIZE_OPTS += -s $(BR2_TARGET_ROOTFS_UBI_SUBSIZE) endif +UBI_UBINIZE_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_OPTS)) + ROOTFS_UBI_DEPENDENCIES = rootfs-ubifs define ROOTFS_UBI_CMD
fs/ubifs/ubifs.mk +3 -1
@@ -16,10 +16,12 @@ ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_NONE),y) UBIFS_OPTS += -x none endif +UBIFS_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBIFS_OPTS)) + ROOTFS_UBIFS_DEPENDENCIES = host-mtd define ROOTFS_UBIFS_CMD $(HOST_DIR)/usr/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $@ endef -$(eval $(call ROOTFS_TARGET,ubifs)) +$(eval $(call ROOTFS_TARGET,ubifs))
Signature · 1 line
1.7.9.5
PATCH 1/1 Allow extra options to be passed to ubifs creation tools
Quoted 59 lines · Mark Jackson
Signed-off-by Mark Jackson <[email protected]>--- fs/ubifs/Config.in | 14 ++++++++++++++ fs/ubifs/ubi.mk | 2 ++ fs/ubifs/ubifs.mk | 4 +++- 3 files changed, 19 insertions(+), 1 deletion(-)fs/ubifs/Config.in +14
-0@@ -77,6 +77,13 @@ config BR2_TARGET_ROOTFS_UBIFS_LZMA endchoice +config BR2_TARGET_ROOTFS_UBIFS_OPTS + string "Additional mkfs.ubifs options" + default "" + depends on BR2_TARGET_ROOTFS_UBIFS + help + Any additional mkfs.ubifs options you may want to include. + config BR2_TARGET_ROOTFS_UBI depends on BR2_TARGET_ROOTFS_UBIFS bool "Embed into an UBI image"@@ -98,3 +105,10 @@ config BR2_TARGET_ROOTFS_UBI_SUBSIZE help Tells ubinize that the flash supports sub-pages and the sub-page size. Use 0 if subpages are not supported on flash chip. + +config BR2_TARGET_ROOTFS_UBI_OPTS + string "Additional ubinize options" + default "" + depends on BR2_TARGET_ROOTFS_UBI + help + Any additional ubinize options you may want to include.fs/ubifs/ubi.mk +2
-0@@ -10,6 +10,8 @@ ifneq ($(BR2_TARGET_ROOTFS_UBI_SUBSIZE),0) UBI_UBINIZE_OPTS += -s $(BR2_TARGET_ROOTFS_UBI_SUBSIZE) endif +UBI_UBINIZE_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_OPTS)) + ROOTFS_UBI_DEPENDENCIES = rootfs-ubifs define ROOTFS_UBI_CMDfs/ubifs/ubifs.mk +1
-0@@ -16,10 +16,12 @@ ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_NONE),y) UBIFS_OPTS += -x none endif +UBIFS_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBIFS_OPTS))
fs/ubifs/ubifs.mk ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_NONE),y) · line 27
Quoted 10 lines
fs/ubifs/ubifs.mk +2
-1+ ROOTFS_UBIFS_DEPENDENCIES = host-mtd define ROOTFS_UBIFS_CMD $(HOST_DIR)/usr/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $@ endef -$(eval $(call ROOTFS_TARGET,ubifs)) +$(eval $(call ROOTFS_TARGET,ubifs))
Does anyone have any comments on this ?
Can it be added ?
Cheers
Mark J.
PATCH 1/1 Allow extra options to be passed to ubifs creation tools
In reply to Mark JacksonDear Mark Jackson,
It would be good if the commit title was:
fs/ubifs: allow extra options to be passed to ubifs creation tools
Quoted 12 lines · Mark Jackson
Signed-off-by Mark Jackson <[email protected]>--- fs/ubifs/Config.in | 14 ++++++++++++++ fs/ubifs/ubi.mk | 2 ++ fs/ubifs/ubifs.mk | 4 +++- 3 files changed, 19 insertions(+), 1 deletion(-)fs/ubifs/Config.in +0
-0
fs/ubifs/Config.in config BR2_TARGET_ROOTFS_UBIFS_LZMA · line 82
Quoted 6 lines
fs/ubifs/Config.in +3
-0@@ -77,6 +77,13 @@ config BR2_TARGET_ROOTFS_UBIFS_LZMA endchoice +config BR2_TARGET_ROOTFS_UBIFS_OPTS + string "Additional mkfs.ubifs options" + default ""
I believe that the default "" is not needed, since this is the default (empty value).
fs/ubifs/Config.in config BR2_TARGET_ROOTFS_UBIFS_LZMA · line 83
Quoted 1 line
fs/ubifs/Config.in +1
-0+ depends on BR2_TARGET_ROOTFS_UBIFS
If you have some time, you could send a follow-up patch that factorizes all the "depends on BR2_TARGET_ROOTFS_UBIFS" by enclosing the UBI options in a "if BR2_TARGET_ROOTFS_UBIFS .. endif" block. But if you do it, do it as a separate patch.
Quoted 7 lines
fs/ubifs/Config.in +3
-0+ help + Any additional mkfs.ubifs options you may want to include. + config BR2_TARGET_ROOTFS_UBI depends on BR2_TARGET_ROOTFS_UBIFS bool "Embed into an UBI image"
fs/ubifs/Config.in config BR2_TARGET_ROOTFS_UBI_SUBSIZE · line 111
Quoted 7 lines
fs/ubifs/Config.in +4
-0@@ -98,3 +105,10 @@ config BR2_TARGET_ROOTFS_UBI_SUBSIZE help Tells ubinize that the flash supports sub-pages and the sub-page size. Use 0 if subpages are not supported on flash chip. + +config BR2_TARGET_ROOTFS_UBI_OPTS + string "Additional ubinize options" + default ""
Ditto for default.
fs/ubifs/Config.in config BR2_TARGET_ROOTFS_UBI_SUBSIZE · line 112
Quoted 1 line
fs/ubifs/Config.in +1
-0+ depends on BR2_TARGET_ROOTFS_UBI
... and for the separate patch to factor out the depends on here.
Once the minor details above (title and removal of default "") are fixed, you can resend a v2 with my:
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com