Add support for Flattened Image Trees
PATCH v5 1/1 Add support for Flattened Image Trees
This patch introduces a new file system image type FIT. User can specify one or more *.its files, that will be compiled and copied into images or installed into /boot directory.
---
Changes:
v5: change patch description
v4: add support for multiple *.its files, reduce code duplication
v3: fix syntax errors, remove itb name, add uboot-tools dependency
v2: moved configuration to fs infra instead of linux
fs/Config.in | 1 + fs/fit/Config.in | 31 +++++++++++++++++++++++++++++++ fs/fit/fit.mk | 29 +++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 fs/fit/Config.in create mode 100644 fs/fit/fit.mk
fs/Config.in +1 -0
@@ -4,6 +4,7 @@ source "fs/cloop/Config.in" source "fs/cpio/Config.in" source "fs/cramfs/Config.in" source "fs/ext2/Config.in" +source "fs/fit/Config.in" source "fs/initramfs/Config.in" source "fs/iso9660/Config.in" source "fs/jffs2/Config.in"
fs/fit/Config.in new file +31 -0
@@ -0,0 +1,31 @@ +config BR2_TARGET_ROOTFS_FIT + bool "Flattened Image Tree support" + select BR2_PACKAGE_HOST_UBOOT_TOOLS + help + Compile a flattened image tree sources into a flattened + image tree blobs. Specify the *.its files to compile in + the options below. + + Please note, that all files referenced in *.its files, + should be available in output/images folder. + +if BR2_TARGET_ROOTFS_FIT + +config BR2_FIT_PATH + string "Flattened Image Tree source file paths" + help + Paths to the image tree source files. You can + provide a list of *.its paths to copy and build, + separated by spaces. + + Please note, that all *.its files must be named uniquely, + otherwise the files with the same name will be overwritten. + +config BR2_FIT_INSTALL_TARGET + bool "Install Flattened Image Tree blobs to /boot in target" + depends on !BR2_TARGET_ROOTFS_INITRAMFS + help + Select this option to have the FIT images installed to + /boot in the target root filesystem. + +endif
fs/fit/fit.mk new file +29 -0
@@ -0,0 +1,29 @@ +################################################################################ +# +# Build the FIT image +# +################################################################################ + +ROOTFS_FIT_DEPENDENCIES = host-uboot-tools + +FIT_SRCS = $(addprefix $(BINARIES_DIR)/,$(notdir $(call qstrip,$(BR2_FIT_PATH)))) +FIT_BLOBS = $(addsuffix .itb, $(basename $(FIT_SRCS))) + +ifeq ($(BR2_FIT_INSTALL_TARGET),y) +define FIT_INSTALL_ITB_TARGET + mkdir -p $(TARGET_DIR)/boot/ && \ + cp $(FIT_BLOBS) $(TARGET_DIR)/boot/ +endef +else +define FIT_INSTALL_ITB_TARGET + true +endef +endif + +define ROOTFS_FIT_CMD + cp $(BR2_FIT_PATH) $(BINARIES_DIR) && \ + $(foreach its,$(FIT_SRCS),$(HOST_DIR)/usr/bin/mkimage -f $(its) $(basename $(its)).itb &&) \ + $(FIT_INSTALL_ITB_TARGET) +endef + +$(eval $(call ROOTFS_TARGET,fit))
Signature · 1 line
1.8.3.2
PATCH v5 1/1 Add support for Flattened Image Trees
Dear Yegor Yefremov,
Quoted 5 lines · Yegor Yefremov
This patch introduces a new file system image type FIT. User can specify one or more *.its files, that will be compiled and copied into images or installed into /boot directory.
Signed-off-by Yegor Yefremov <[email protected]>
Sorry for the long delay getting back to you about this. We discussed this patch at the D?sseldorf Buildroot Meeting, and it was decided that it was not the effort supporting generating FIT images directly in Buildroot:
* Depending on whether you want a FIT image that bundles your kernel+DTB and sits in your filesystem, or a FIT image that actually bundles your filesystem, it would have to be generated at a completely different time (first case should be handled as a normal Buildroot package, second case more as a filesystem image).
* It's all about calling a single mkimage command, which can easily be enabled for the host in the "Host utilities" menu of Buildroot, and then called from either a post-build or a post-image script depending on your use-case.
Therefore, we've decided to mark your patch as 'Rejected' in patchwork. Thanks nonetheless for your contribution!
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com