diff options
author | Danomi Manchego <danomimanchego123@gmail.com> | 2014-01-28 23:54:00 -0500 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2014-02-08 22:57:31 +0100 |
commit | 74a0f963ed364f90b937fc24f06573f5512c612c (patch) | |
tree | db99b4409b480e897318082c42a0eb54ff7b51cf /fs/ubifs/ubi.mk | |
parent | d517415bcda380336f4a27bf248cef4d81791c9e (diff) | |
download | buildroot-74a0f963ed364f90b937fc24f06573f5512c612c.tar.gz buildroot-74a0f963ed364f90b937fc24f06573f5512c612c.zip |
fs/ubi: add option to use custom ubinize config file
By default, the UBI FS target creates a ubinize configuration
file on-the-fly, for a single volume. Add an option to specify
a custom config file.
E.g., one might want to deploy a system with a volume for the
built ubifs image, a volume for a future upgrade image, and a
volume for user data.
Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'fs/ubifs/ubi.mk')
-rw-r--r-- | fs/ubifs/ubi.mk | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/fs/ubifs/ubi.mk b/fs/ubifs/ubi.mk index 08c952c296..aba3bea83b 100644 --- a/fs/ubifs/ubi.mk +++ b/fs/ubifs/ubi.mk @@ -1,6 +1,6 @@ ################################################################################ # -# Embed the ubifs image into an ubi one +# Embed the ubifs image into an ubi image # ################################################################################ @@ -14,12 +14,17 @@ UBI_UBINIZE_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_OPTS)) ROOTFS_UBI_DEPENDENCIES = rootfs-ubifs +ifeq ($(BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG),y) +UBINIZE_CONFIG_FILE_PATH = $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE)) +else +UBINIZE_CONFIG_FILE_PATH = fs/ubifs/ubinize.cfg +endif + define ROOTFS_UBI_CMD - cp fs/ubifs/ubinize.cfg . ;\ - echo "image=$@fs" \ - >> ./ubinize.cfg ;\ - $(HOST_DIR)/usr/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) ubinize.cfg ;\ - rm ubinize.cfg + $(INSTALL) -m 0644 $(UBINIZE_CONFIG_FILE_PATH) $(BUILD_DIR)/ubinize.cfg ;\ + $(SED) 's;BR2_ROOTFS_UBIFS_PATH;$@fs;' $(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)) |