浏览代码

oxnas: 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 年之前
父节点
当前提交
7f9d537f21
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 2 2
      package/boot/uboot-oxnas/Makefile
  2. 1 1
      target/linux/oxnas/image/Makefile

+ 2 - 2
package/boot/uboot-oxnas/Makefile

@@ -29,8 +29,8 @@ endef
 UBOOT_TARGETS:=ox820
 UBOOT_TARGETS:=ox820
 
 
 define Build/InstallDev
 define Build/InstallDev
-	$(CP) $(PKG_BUILD_DIR)/u-boot.bin \
-		$(KERNEL_BUILD_DIR)/u-boot.bin
+	$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
+	$(CP) $(PKG_BUILD_DIR)/u-boot.bin $(STAGING_DIR_IMAGE)/u-boot.bin
 endef
 endef
 
 
 $(eval $(call BuildPackage/U-Boot))
 $(eval $(call BuildPackage/U-Boot))

+ 1 - 1
target/linux/oxnas/image/Makefile

@@ -15,7 +15,7 @@ DEVICE_VARS += DTS UBIFS_OPTS
 KERNEL_LOADADDR := 0x60008000
 KERNEL_LOADADDR := 0x60008000
 
 
 define Build/ubootable
 define Build/ubootable
-	(dd if="$(KDIR)/u-boot.bin" bs=128k conv=sync; \
+	(dd if="$(STAGING_DIR_IMAGE)/u-boot.bin" bs=128k conv=sync; \
 	 dd if="$@" bs=128k conv=sync ) >> [email protected]
 	 dd if="$@" bs=128k conv=sync ) >> [email protected]
 	@mv "[email protected]" "$@"
 	@mv "[email protected]" "$@"
 endef
 endef