[Buildroot] [PATCH] fs/ubi: add option to use custom volume config file
Danomi Manchego
danomimanchego123 at gmail.com
Sun Sep 15 19:08:28 UTC 2013
On Sun, Sep 15, 2013 at 2:53 PM, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:
> and Buildroot replaces BR2_ROOTFS_UBIFS_PATH by the proper
> $(O)/images/ubifs.img.
>
> Note that this could also be used in the fs/ubifs/ubinize.cfg file,
> therefore making the default and custom cases more similar:
>
> 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
> endef
>
> define ROOTFS_UBI_CMD
> cp $(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
That does appeal to me; I think that we can combine the cp and the sed
lines as well ...
$(SED) 's/BR2_ROOTFS_UBIFS_PATH/$@fs/'
$(UBINIZE_CONFIG_FILE_PATH) > $(BUILD_DIR)/ubinize.cfg
Cleaner all the way around. I'll look into it tonight.
Thanks,
Danomi -
More information about the buildroot
mailing list