From: Thomas De Schampheleire Date: Tue, 15 May 2012 08:18:25 +0000 (+0000) Subject: linux: install dtc (device tree compiler) as host tool if selected X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=707d44d0a28906ebda49584dd5f55985406f0bde;p=buildroot.git linux: install dtc (device tree compiler) as host tool if selected Having dtc as a host tool can be useful for users that have a custom boot scenario where the device tree is not embedded in the kernel. Signed-off-by: Thomas De Schampheleire Acked-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- diff --git a/linux/linux.mk b/linux/linux.mk index 34f86236c5..f165dda50c 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -183,6 +183,15 @@ define LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET endef endif + +define LINUX_INSTALL_HOST_TOOLS + # Installing dtc (device tree compiler) as host tool, if selected + if grep -q "CONFIG_DTC=y" $(@D)/.config; then \ + $(INSTALL) -D -m 0755 $(@D)/scripts/dtc/dtc $(HOST_DIR)/usr/bin/dtc ; \ + fi +endef + + define LINUX_INSTALL_IMAGES_CMDS cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR) endef @@ -197,6 +206,7 @@ define LINUX_INSTALL_TARGET_CMDS rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/build ; \ rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/source ; \ fi + $(LINUX_INSTALL_HOST_TOOLS) endef include linux/linux-ext-*.mk