Bläddra i källkod

sunxi: put u-boot images into image staging directory

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 <[email protected]>
Jo-Philipp Wich 8 år sedan
förälder
incheckning
cf3d1b61bf
2 ändrade filer med 5 tillägg och 4 borttagningar
  1. 3 2
      package/boot/uboot-sunxi/Makefile
  2. 2 2
      target/linux/sunxi/image/Makefile

+ 3 - 2
package/boot/uboot-sunxi/Makefile

@@ -131,9 +131,10 @@ UBOOT_TARGETS := \
 UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
 
 define Build/InstallDev
-	$(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(KERNEL_BUILD_DIR)/$(BUILD_DEVICES)-u-boot-with-spl.bin
+	$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
+	$(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-u-boot-with-spl.bin
 	mkimage -C none -A arm -T script -d uEnv-$(UENV).txt \
-		$(KERNEL_BUILD_DIR)/$(BUILD_DEVICES)-boot.scr
+		$(STAGING_DIR_IMAGE)/$(BUILD_DEVICES)-boot.scr
 endef
 
 define Package/u-boot/install/default

+ 2 - 2
target/linux/sunxi/image/Makefile

@@ -18,7 +18,7 @@ define Build/sunxi-sdcard
 	rm -f [email protected]
 	mkfs.fat [email protected] -C $(FAT32_BLOCKS)
 
-	mcopy -i [email protected] $(KDIR)/$(DEVICE_NAME)-boot.scr ::boot.scr
+	mcopy -i [email protected] $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)-boot.scr ::boot.scr
 	mcopy -i [email protected] $(DTS_DIR)/$(SUNXI_DTS).dtb ::dtb
 	mcopy -i [email protected] $(IMAGE_KERNEL) ::uImage
 	./gen_sunxi_sdcard_img.sh $@ \
@@ -26,7 +26,7 @@ define Build/sunxi-sdcard
 		$(IMAGE_ROOTFS) \
 		$(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \
 		$(CONFIG_TARGET_ROOTFS_PARTSIZE) \
-		$(KDIR)/$(DEVICE_NAME)-u-boot-with-spl.bin
+		$(STAGING_DIR_IMAGE)/$(DEVICE_NAME)-u-boot-with-spl.bin
 	rm -f [email protected]
 endef