mvebu: put u-boot images into image staging directory
authorJo-Philipp Wich <jo@mein.io>
Fri, 27 Jan 2017 12:14:12 +0000 (13:14 +0100)
committerJo-Philipp Wich <jo@mein.io>
Fri, 27 Jan 2017 15:53:31 +0000 (16:53 +0100)
Do not put the u-boot images into the kernel build directory as this directory
might get removed after kernel updates while the u-boot packages InstallDev
recipe is not getting re-executed because it is still considered current,
leading to image build failures later on due to missing u-boot images.

To ensure that built bootloader images persist over kernel version updates in
the buildroot, put them into the new STAGING_DIR_IMAGE directory.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
package/boot/uboot-mvebu/Makefile
target/linux/mvebu/image/Makefile

index e0cd944be93b6af523589fe139545c510b77cf06..bd95f769e94e320f0ca3218783e8682fb06ab838 100644 (file)
@@ -31,8 +31,8 @@ UBOOT_TARGETS:= \
        clearfog
 
 define Build/InstallDev
-       $(INSTALL_DIR) $(KERNEL_BUILD_DIR)/
-       $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(KERNEL_BUILD_DIR)/$(BUILD_VARIANT)-u-boot-spl.kwb
+       $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
+       $(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot-spl.kwb
 endef
 
 $(eval $(call BuildPackage/U-Boot))
index 96df359a613d5484cf594f3f0316b73ab2811c54..16d93340d52c5ef80df556ac6b009c41f7bac522 100644 (file)
@@ -39,7 +39,7 @@ endef
 define Build/sdcard-img
        ROOTFS_SIZE=$$(( $(CONFIG_TARGET_ROOTFS_PARTSIZE) * 1024 * 2 )); \
        ./gen_mvebu_sdcard_img.sh $@ \
-               "$(KDIR)/clearfog-u-boot-spl.kwb" \
+               "$(STAGING_DIR_IMAGE)/clearfog-u-boot-spl.kwb" \
                c 32768 $@.boot \
                83 $$ROOTFS_SIZE $(IMAGE_ROOTFS)
 endef