at91: put u-boot images into image staging directory
authorRobert Marko <robimarko@gmail.com>
Fri, 4 Apr 2025 09:55:08 +0000 (11:55 +0200)
committerRobert Marko <robimarko@gmail.com>
Fri, 4 Apr 2025 12:39:00 +0000 (14:39 +0200)
Currently, building at91 subtargets via image builder will fail as the
required built u-boot is not present in the image builder at all since its
presumed to be in the binary directory which obviously does not exist yet.

So, lets install the u-boot binary into image staging directory and use
that instead.

Link: https://github.com/openwrt/openwrt/pull/18414
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/boot/uboot-at91/Makefile
target/linux/at91/image/sam9x.mk
target/linux/at91/image/sama5.mk
target/linux/at91/image/sama7.mk

index 81ea22ded621c122f71b4bf92b2ffec5aded3696..67c9d8f365a7149754315fae596aaa9d8e87cdcf 100644 (file)
@@ -179,4 +179,9 @@ define Build/Compile
                $(UBOOT_MAKE_FLAGS)
 endef
 
+define Build/InstallDev
+       $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(UBOOT_IMAGE)
+endef
+
 $(eval $(call BuildPackage/U-Boot))
index d0722c5d30ffb27f032bebfecbab0e6e16a90521..009a41b3039ae5d55d28d77bfad307f2746955b7 100644 (file)
@@ -16,7 +16,7 @@ define Build/at91-sdcard
        ::$(DEVICE_NAME)-fit.itb
 
   mcopy -i $@.boot \
-       $(BIN_DIR)/u-boot-$(if $(findstring sam9x60,$@),$(DEVICE_DTS:at91-%=%),at91sam9x5ek)_mmc/u-boot.bin \
+       $(STAGING_DIR_IMAGE)/$(if $(findstring sam9x60,$@),$(DEVICE_DTS:at91-%=%),at91sam9x5ek)_mmc-u-boot.bin \
        ::u-boot.bin
 
   mcopy -i $@.boot \
index 7f4dd3316a888e6fc73d5eb42256ca81661169ee..036cac4de9eec98ee06094815df98f12a35207ad 100644 (file)
@@ -16,7 +16,7 @@ define Build/at91-sdcard
        ::$(DEVICE_NAME)-fit.itb
 
   mcopy -i $@.boot \
-       $(BIN_DIR)/u-boot-$(DEVICE_DTS:at91-%=%)_mmc/u-boot.bin \
+       $(STAGING_DIR_IMAGE)/$(DEVICE_DTS:at91-%=%)_mmc-u-boot.bin \
        ::u-boot.bin
 
   $(if $(findstring sama5d4-xplained,$@), \
index 8d6f67d80e63560778db4d3ffca2636eebf20004..29043050edf6bf04772a21f4c49274c75f29babc 100644 (file)
@@ -16,7 +16,7 @@ define Build/at91-sdcard
        ::$(DEVICE_NAME)-fit.itb
 
   mcopy -i $@.boot \
-       $(BIN_DIR)/u-boot-$(DEVICE_DTS:at91-%=%)_mmc1/u-boot.bin \
+       $(STAGING_DIR_IMAGE)/$(DEVICE_DTS:at91-%=%)_mmc1-u-boot.bin \
        ::u-boot.bin
 
   mcopy -i $@.boot \