linux: Install the device tree in /boot when installing the kernel
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Thu, 14 Feb 2013 04:27:54 +0000 (04:27 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Tue, 19 Feb 2013 22:30:10 +0000 (23:30 +0100)
The option BR2_LINUX_KERNEL_INSTALL_TARGET used to install the kernel in
/boot in the rootfs. The introduction of the device tree builds made it
possible to generate device tree blobs, and stored them in IMAGES_DIR
like the kernel, but didn't copy the dtb in /boot when _INSTALL_TARGET
was enabled.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
linux/linux.mk

index 91a9f500bb43ea8724e1504d02c216dfa71a228e..0352acd505764d772788549faf67951c76491c39 100644 (file)
@@ -198,6 +198,13 @@ define LINUX_INSTALL_DTB
                $(addprefix $(KERNEL_ARCH_PATH)/boot/dts/,$(KERNEL_DTBS))),dts/),$(KERNEL_DTBS)) \
                $(BINARIES_DIR)/
 endef
+define LINUX_INSTALL_DTB_TARGET
+       # dtbs moved from arch/$ARCH/boot to arch/$ARCH/boot/dts since 3.8-rc1
+       cp $(addprefix \
+               $(KERNEL_ARCH_PATH)/boot/$(if $(wildcard \
+               $(addprefix $(KERNEL_ARCH_PATH)/boot/dts/,$(KERNEL_DTBS))),dts/),$(KERNEL_DTBS)) \
+               $(TARGET_DIR)/boot/
+endef
 endif
 endif
 
@@ -234,6 +241,7 @@ endef
 ifeq ($(BR2_LINUX_KERNEL_INSTALL_TARGET),y)
 define LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET
        install -m 0644 -D $(LINUX_IMAGE_PATH) $(TARGET_DIR)/boot/$(LINUX_IMAGE_NAME)
+       $(LINUX_INSTALL_DTB_TARGET)
 endef
 endif