mxs: put u-boot images into image staging directory
authorJo-Philipp Wich <jo@mein.io>
Fri, 27 Jan 2017 15:26:56 +0000 (16:26 +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 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-mxs/Makefile
target/linux/mxs/image/Makefile

index eec7841..92cf9e6 100644 (file)
@@ -38,7 +38,8 @@ UBOOT_TARGETS := \
 UBOOT_MAKE_FLAGS += $(UBOOT_IMAGE)
 
 define Build/InstallDev
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(KERNEL_BUILD_DIR)/$(BUILD_VARIANT)-$(UBOOT_IMAGE)
+       $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(UBOOT_IMAGE)
 endef
 
 $(eval $(call BuildPackage/U-Boot))
index f0f1f6a..7c332cd 100644 (file)
@@ -40,7 +40,7 @@ define Image/Build/SDCard-vfat-ext4
 
        ./gen_sdcard_vfat_ext4.sh \
                $(BIN_DIR)/$(2) \
-               $(KDIR)/$(4)-u-boot.sb \
+               $(STAGING_DIR_IMAGE)/$(4)-u-boot.sb \
                $(KDIR)/boot.img \
                $(KDIR)/root.$(1) \
                $(CONFIG_TARGET_BOOTFS_PARTSIZE) \
@@ -51,7 +51,7 @@ endef
 define Image/Build/SDCard-ext4-ext4
        ./gen_sdcard_ext4_ext4.sh \
                $(BIN_DIR)/$(2) \
-               $(KDIR)/$(4)-u-boot.sb \
+               $(STAGING_DIR_IMAGE)/$(4)-u-boot.sb \
                $(KDIR)/root.$(1) \
                $(CONFIG_TARGET_ROOTFS_PARTSIZE)
        $(call Image/Gzip,$(BIN_DIR)/$(2))