Skip to contentSkip to conversation

arm/dt: Add dtb make rule

PATCH New Rob Herring 4 participants 5 messages Mar 10, 2011 – Mar 16, 2011 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm/dt: Add dtb make rule

From: Rob Herring <[email protected]>

Add a make rule to compile dt blobs for ARM.

---
 arch/arm/Makefile      |    3 +++
 arch/arm/boot/Makefile |    6 ++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/Makefile +3 -0
index b49dea6..566763f 100644
@@ -284,6 +284,9 @@ zImage Image xipImage bootpImage uImage: vmlinux
 zinstall install: vmlinux
 	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
 
+%.dtb:
+	$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@
+
 # We use MRPROPER_FILES and CLEAN_FILES now
 archclean:
 	$(Q)$(MAKE) $(clean)=$(boot)
arch/arm/boot/Makefile +6 -0
index dcf323d..bb63922 100644
@@ -13,6 +13,8 @@
 
 MKIMAGE         := $(srctree)/scripts/mkuboot.sh
 
+DTC_FLAGS := -p 1024
+
 ifneq ($(MACHINE),)
 include $(srctree)/$(MACHINE)/Makefile.boot
 endif
@@ -59,6 +61,10 @@ $(obj)/zImage:	$(obj)/compressed/vmlinux FORCE
 
 endif
 
+# Rule to build device tree blobs
+$(obj)/%.dtb: $(src)/dts/%.dts
+	$(call cmd,dtc)
+
 quiet_cmd_uimage = UIMAGE  $@
       cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
 		   -C none -a $(LOADADDR) -e $(STARTADDR) \
Signature · 1 line
1.7.1
#2 lore raw

PATCH 1/1 arm/dt: Add dtb make rule

Quoted 11 lines · Rob Herring

Grant,

Quoted 5 lines · Rob Herring

From: Rob Herring<[email protected]>

Add a make rule to compile dt blobs for ARM.

Can you pick this one up in your ARM tree.

+1

It's handy.

Signature · 2 lines
Regards,
Shawn
#3 lore raw

PATCH 1/1 arm/dt: Add dtb make rule

In reply to Rob Herring

2011/3/15 Rob Herring <[email protected]>:

Quoted 11 lines

Grant,

Quoted 6 lines · Rob Herring

From: Rob Herring<[email protected]>

Add a make rule to compile dt blobs for ARM.

Can you pick this one up in your ARM tree.

Test result on i.MX51 babbage board:

gcl/linux-2.6$ make babbage.dtb ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
DTC arch/arm/boot/babbage.dtb
DTC: dts->dtb on file "arch/arm/boot/dts/babbage.dts"

Jason

Quoted 8 lines

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel