Ubinize: made UBI volume name and volume alignment configurable
PATCH 1/1 Ubinize: made UBI volume name and volume alignment configurable
From: Roland Uuesoo <[email protected]>
Signed-off-by Roland Uuesoo <[email protected]>
--- fs/ubifs/Config.in | 14 ++++++++++++++ fs/ubifs/ubi.mk | 12 ++++++++---- fs/ubifs/ubinize.cfg | 2 -- 3 files changed, 22 insertions(+), 6 deletions(-)
fs/ubifs/Config.in +14 -0
@@ -98,3 +98,17 @@ 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_VOL_ALIGNMENT + int "UBI volume alignment" + depends on BR2_TARGET_ROOTFS_UBI + default 1 + help + Default volume alignment + +config BR2_TARGET_ROOTFS_UBI_VOL_NAME + string "UBI volume name" + depends on BR2_TARGET_ROOTFS_UBI + default rootfs + help + UBI volume name
fs/ubifs/ubi.mk +8 -4
@@ -13,11 +13,15 @@ endif ROOTFS_UBI_DEPENDENCIES = rootfs-ubifs define ROOTFS_UBI_CMD - cp fs/ubifs/ubinize.cfg . ;\ + cp fs/ubifs/ubinize.cfg $(BUILD_DIR)/_ubinize.cfg ;\ + echo "vol_name=$(BR2_TARGET_ROOTFS_UBI_VOL_NAME)" \ + >> $(BUILD_DIR)/_ubinize.cfg ;\ + echo "vol_alignment=$(BR2_TARGET_ROOTFS_UBI_VOL_ALIGNMENT)" \ + >> $(BUILD_DIR)/_ubinize.cfg ; \ echo "image=$$@fs" \ - >> ./ubinize.cfg ;\ - $(HOST_DIR)/usr/sbin/ubinize -o $$@ $(UBI_UBINIZE_OPTS) ubinize.cfg ;\ - rm ubinize.cfg + >> $(BUILD_DIR)/_ubinize.cfg ;\ + $(HOST_DIR)/usr/sbin/ubinize -o $$@ $(UBI_UBINIZE_OPTS) $(BUILD_DIR)/_ubinize.cfg ;\ + rm $(BUILD_DIR)/_ubinize.cfg endef $(eval $(call ROOTFS_TARGET,ubi))
fs/ubifs/ubinize.cfg +0 -2
@@ -2,6 +2,4 @@ mode=ubi vol_id=0 vol_type=dynamic -vol_name=rootfs -vol_alignment=1 vol_flags=autoresize
Signature · 1 line
1.7.5.4
PATCH 1/1 Ubinize: made UBI volume name and volume alignment configurable
Hello Roland,
Thanks, it looks good to me. One comment below.
Le Mon, 5 Mar 2012 21:14:12 +0200,
Roland Uuesoo <[email protected]> a ?crit :
fs/ubifs/Config.in config BR2_TARGET_ROOTFS_UBI_SUBSIZE · line 107
Quoted 6 lines
fs/ubifs/Config.in +6
-0+config BR2_TARGET_ROOTFS_UBI_VOL_ALIGNMENT + int "UBI volume alignment" + depends on BR2_TARGET_ROOTFS_UBI + default 1 + help + Default volume alignment
Could you add a bit more detail on what this 'volume alignment' parameter is useful for.
Quoted 14 lines
define
ROOTFS_UBI_CMDfs/ubifs/ubi.mk +5
-3- cp fs/ubifs/ubinize.cfg . ;\ + cp fs/ubifs/ubinize.cfg $(BUILD_DIR)/_ubinize.cfg ;\ + echo "vol_name=$(BR2_TARGET_ROOTFS_UBI_VOL_NAME)" \ + >> $(BUILD_DIR)/_ubinize.cfg ;\ + echo "vol_alignment=$(BR2_TARGET_ROOTFS_UBI_VOL_ALIGNMENT)" \ + >> $(BUILD_DIR)/_ubinize.cfg ; \ echo "image=$$@fs" \ - >> ./ubinize.cfg ;\ - $(HOST_DIR)/usr/sbin/ubinize -o $$@ $(UBI_UBINIZE_OPTS)ubinize.cfg ;\
fs/ubifs/ubi.mk +2
-1- rm ubinize.cfg + >> $(BUILD_DIR)/_ubinize.cfg ;\ + $(HOST_DIR)/usr/sbin/ubinize -o $$@ $(UBI_UBINIZE_OPTS)
Quoted 2 lines
$(BUILD_DIR)/_ubinize.cfg ;\
+ rm $(BUILD_DIR)/_ubinize.cfg
The indentation is a bit funky here. Can you keep the indentation at one tab?
Thanks for your work!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com