Skip to contentSkip to conversation

Add dtb image generation

PATCH New Philippe Reynes 2 participants 2 messages Jun 23, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add dtb image generation

---
 linux/Config.in |    6 ++++++
 linux/linux.mk  |    3 +++
 2 files changed, 9 insertions(+), 0 deletions(-)
linux/Config.in +6 -0
index 1cd05ae..a3c4385 100644
@@ -132,6 +132,12 @@ config BR2_LINUX_KERNEL_DTS_FILE
       The final "custom target" name depends on the
       dts file name:
           <name>.dts --> simpleImage.<name>
+
+config BR2_LINUX_KERNEL_DTB_FILE
+    string "Device Tree dtb file expected"
+    depends on BR2_arm
+    help
+      Name of the dtb file to produce
 #
 # Binary format
 #
linux/linux.mk +3 -0
index f165dda..3837c57 100644
@@ -174,6 +174,8 @@ define LINUX_BUILD_CMDS
 	@if grep -q "CONFIG_MODULES=y" $(@D)/.config; then 	\
 		$(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ;	\
 	fi
+	$(if $(BR2_LINUX_KERNEL_DTB_FILE),
+		$(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(BR2_LINUX_KERNEL_DTB_FILE))
 endef
 
 
@@ -194,6 +196,7 @@ endef
 
 define LINUX_INSTALL_IMAGES_CMDS
 	cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR)
+	cp $(KERNEL_ARCH_PATH)/boot/$(BR2_LINUX_KERNEL_DTB_FILE) $(BINARIES_DIR)
 endef
 
 define LINUX_INSTALL_TARGET_CMDS
Signature · 1 line
1.7.4.4
#1 lore raw

PATCH 1/1 Add dtb image generation

Le Sat, 23 Jun 2012 14:11:30 +0200,
Philippe Reynes <[email protected]> a ?crit :

Quoted 1 line

My colleague Maxime has posted yesterday something, which, even though not fully complete, provides more possibilities than this proposal (for example it supports generating kernel images that directly include the DTB, as is used these days on ARM when the platform does not have a DT capable bootloader). Would you mind testing his proposal?

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com