at91bootstrap: put at91bootstrap images into image staging directory
authorRobert Marko <robimarko@gmail.com>
Fri, 4 Apr 2025 10:25:21 +0000 (12:25 +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 at91bootstrap 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 at91bootstrap 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/at91bootstrap/Makefile
target/linux/at91/image/sam9x.mk
target/linux/at91/image/sama5.mk
target/linux/at91/image/sama7.mk

index 456f9fa5ff1f86821beddcbb018d3733d84d057f..12b747c38d074034193270542ba95b24f6382ddb 100644 (file)
@@ -201,4 +201,9 @@ define Build/Compile
                CROSS_COMPILE=$(TARGET_CROSS)
 endef
 
+define Build/InstallDev
+       $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(BINARIES_DIR)/at91bootstrap.bin $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-at91bootstrap.bin
+endef
+
 $(eval $(call BuildPackage/AT91Bootstrap))
index 009a41b3039ae5d55d28d77bfad307f2746955b7..6f2ba19d9fef197338aff30964989d1da7f2f025 100644 (file)
@@ -20,7 +20,7 @@ define Build/at91-sdcard
        ::u-boot.bin
 
   mcopy -i $@.boot \
-       $(BIN_DIR)/at91bootstrap-$(if $(findstring sam9x60,$@),$(DEVICE_DTS:at91-%=%),at91sam9x5ek)sd_uboot/at91bootstrap.bin \
+       $(STAGING_DIR_IMAGE)/$(if $(findstring sam9x60,$@),$(DEVICE_DTS:at91-%=%),at91sam9x5ek)sd_uboot-at91bootstrap.bin \
        ::BOOT.bin
 
   $(CP) uboot-env.txt $@-uboot-env.txt
index 036cac4de9eec98ee06094815df98f12a35207ad..268af5999c518df43b446d1c256f5cafcd95a399 100644 (file)
@@ -21,10 +21,10 @@ define Build/at91-sdcard
 
   $(if $(findstring sama5d4-xplained,$@), \
          mcopy -i $@.boot \
-              $(BIN_DIR)/at91bootstrap-$(DEVICE_DTS:at91-%=%)sd_uboot_secure/at91bootstrap.bin \
+              $(STAGING_DIR_IMAGE)/$(DEVICE_DTS:at91-%=%)sd_uboot_secure-at91bootstrap.bin \
               ::BOOT.bin,
           mcopy -i $@.boot \
-              $(BIN_DIR)/at91bootstrap-$(DEVICE_DTS:at91-%=%)sd_uboot/at91bootstrap.bin \
+              $(STAGING_DIR_IMAGE)/$(DEVICE_DTS:at91-%=%)sd_uboot-at91bootstrap.bin \
               ::BOOT.bin)
 
   $(CP) uboot-env.txt $@-uboot-env.txt
index 29043050edf6bf04772a21f4c49274c75f29babc..924d950e229e9d3df11b6656c032a1e631c40383 100644 (file)
@@ -20,7 +20,7 @@ define Build/at91-sdcard
        ::u-boot.bin
 
   mcopy -i $@.boot \
-       $(BIN_DIR)/at91bootstrap-$(DEVICE_DTS:at91-%=%)sd_uboot/at91bootstrap.bin \
+       $(STAGING_DIR_IMAGE)/$(DEVICE_DTS:at91-%=%)sd_uboot-at91bootstrap.bin \
        ::BOOT.bin
 
   $(CP) uboot-env.txt $@-uboot-env.txt