Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3] Add support for Flattened Image Trees
@ 2014-09-18 20:13 Yegor Yefremov
  2014-09-18 20:44 ` Thomas Petazzoni
  2014-09-21  6:46 ` Baruch Siach
  0 siblings, 2 replies; 7+ messages in thread
From: Yegor Yefremov @ 2014-09-18 20:13 UTC (permalink / raw)
  To: buildroot

This patch provides an option to specify a FIT source
file (*.its), that will usually be stored in a board directory,
and the resulting blob file name (*.itb).

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
Changes:
	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 | 23 +++++++++++++++++++++++
 fs/fit/fit.mk    | 23 +++++++++++++++++++++++
 3 files changed, 47 insertions(+)
 create mode 100644 fs/fit/Config.in
 create mode 100644 fs/fit/fit.mk

diff --git a/fs/Config.in b/fs/Config.in
index 5853113..8d882d0 100644
--- a/fs/Config.in
+++ b/fs/Config.in
@@ -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"
diff --git a/fs/fit/Config.in b/fs/fit/Config.in
new file mode 100644
index 0000000..12e977b
--- /dev/null
+++ b/fs/fit/Config.in
@@ -0,0 +1,23 @@
+config BR2_TARGET_ROOTFS_FIT
+	bool "Flattened Image Tree support"
+	select BR2_PACKAGE_HOST_UBOOT_TOOLS
+	help
+	  Compile a flattened image tree source into a flattened
+	  image tree blob. Specify the *.its file to compile in the
+	  options below.
+
+if BR2_TARGET_ROOTFS_FIT
+
+config BR2_FIT_PATH
+	string "Flattened Image Tree source file path"
+	help
+	  Path to the image tree source files.
+
+config BR2_FIT_INSTALL_TARGET
+	bool "Install Flattened Image Tree blob to /boot in target"
+	depends on !BR2_TARGET_ROOTFS_INITRAMFS
+	help
+	  Select this option to have the FIT image installed to
+	  /boot in the target root filesystem.
+
+endif
diff --git a/fs/fit/fit.mk b/fs/fit/fit.mk
new file mode 100644
index 0000000..2283cd7
--- /dev/null
+++ b/fs/fit/fit.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# Build the FIT image
+#
+################################################################################
+
+ROOTFS_FIT_DEPENDENCIES = host-uboot-tools
+
+ifeq ($(BR2_FIT_INSTALL_TARGET),y)
+define ROOTFS_FIT_CMD
+	cp $(BR2_FIT_PATH) $(BINARIES_DIR) && \
+	$(HOST_DIR)/usr/bin/mkimage -f $(BINARIES_DIR)/$(notdir $(call qstrip,$(BR2_FIT_PATH))) $(BINARIES_DIR)/$(basename $(notdir $(call qstrip,$(BR2_FIT_PATH)))).itb && \
+	mkdir -p $(TARGET_DIR)/boot/ && \
+	cp $(BINARIES_DIR)/$(basename $(notdir $(call qstrip,$(BR2_FIT_PATH)))).itb $(TARGET_DIR)/boot/
+endef
+else
+define ROOTFS_FIT_CMD
+	cp $(BR2_FIT_PATH) $(BINARIES_DIR) && \
+	$(HOST_DIR)/usr/bin/mkimage -f $(BINARIES_DIR)/$(notdir $(call qstrip,$(BR2_FIT_PATH))) $(BINARIES_DIR)/$(basename $(notdir $(call qstrip,$(BR2_FIT_PATH)))).itb
+endef
+endif
+
+$(eval $(call ROOTFS_TARGET,fit))
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-09-22 13:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-18 20:13 [Buildroot] [PATCH v3] Add support for Flattened Image Trees Yegor Yefremov
2014-09-18 20:44 ` Thomas Petazzoni
2014-09-22 12:56   ` Yegor Yefremov
2014-09-21  6:46 ` Baruch Siach
2014-09-22 12:34   ` Yegor Yefremov
2014-09-22 12:45     ` [Buildroot] [PATCH v4] " Yegor Yefremov
2014-09-22 13:00       ` Yegor Yefremov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox