[Buildroot] [PATCH] boot/ti-k3-image-gen: avoid a wget in the build step

Francois Perrad fperrad at gmail.com
Sun Dec 11 20:38:26 UTC 2022


Signed-off-by: Francois Perrad <francois.perrad at gadz.org>
---
 boot/ti-k3-image-gen/ti-k3-image-gen.hash |  1 +
 boot/ti-k3-image-gen/ti-k3-image-gen.mk   | 18 +++++++++++++++---
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/boot/ti-k3-image-gen/ti-k3-image-gen.hash b/boot/ti-k3-image-gen/ti-k3-image-gen.hash
index 82c5b1706..90b908130 100644
--- a/boot/ti-k3-image-gen/ti-k3-image-gen.hash
+++ b/boot/ti-k3-image-gen/ti-k3-image-gen.hash
@@ -1,2 +1,3 @@
 # Locally calculated
 sha256  d13e9556bfba32d14071e172589683e48f6fea705a0b05ddd7fe984002089888  k3-image-gen-08.05.00.004.tar.gz
+sha256  623e2f8d73d8da725188200f613e4c53228856dfac8af5a791dc7d1ea18b5f29  ti-sci-firmware-am64x-gp.bin
diff --git a/boot/ti-k3-image-gen/ti-k3-image-gen.mk b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
index f8e6105bf..152a39d03 100644
--- a/boot/ti-k3-image-gen/ti-k3-image-gen.mk
+++ b/boot/ti-k3-image-gen/ti-k3-image-gen.mk
@@ -15,13 +15,25 @@ TI_K3_IMAGE_GEN_INSTALL_IMAGES = YES
 # from the ti-k3-r5-loader package. Hence the dependency on ti-k3-r5-loader.
 TI_K3_IMAGE_GEN_DEPENDENCIES = host-arm-gnu-toolchain ti-k3-r5-loader
 
+TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
+TI_K3_IMAGE_GEN_SOC_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE))
+TI_K3_IMAGE_GEN_CONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG))
+
+# this hash comes from the Makefile in ti-k3-image-gen
+TI_K3_SYSFW_VERSION = 59d6f921b3b562e0aa1f42ce322e4645b1bfc52c
+TI_K3_SYSFW_SITE = https://git.ti.com/processor-firmware/ti-linux-firmware/blobs/raw/$(TI_K3_SYSFW_VERSION)/ti-sysfw
+TI_K3_SYSFW_SOURCE = ti-sci-firmware-$(TI_K3_IMAGE_GEN_SOC)-$(TI_K3_IMAGE_GEN_SOC_TYPE).bin
+TI_K3_IMAGE_GEN_EXTRA_DOWNLOADS = $(TI_K3_SYSFW_SITE)/$(TI_K3_SYSFW_SOURCE)
+
+define TI_K3_SYSFW_COPY
+	cp $(TI_K3_IMAGE_GEN_DL_DIR)/$(TI_K3_SYSFW_SOURCE) $(@D)/$(TI_K3_SYSFW_SOURCE)
+endef
+TI_K3_IMAGE_GEN_POST_EXTRACT_HOOKS += TI_K3_SYSFW_COPY
+
 # The ti-k3-image-gen makefiles seem to need some feature from Make v4.0,
 # similar to u-boot. Explicitly use $(BR2_MAKE) here, as the build
 # otherwise fails with some misleading error message.
 TI_K3_IMAGE_GEN_MAKE = $(BR2_MAKE)
-TI_K3_IMAGE_GEN_SOC = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC))
-TI_K3_IMAGE_GEN_SOC_TYPE = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_SOC_TYPE))
-TI_K3_IMAGE_GEN_CONFIG = $(call qstrip,$(BR2_TARGET_TI_K3_IMAGE_GEN_CONFIG))
 TI_K3_IMAGE_GEN_MAKE_OPTS = \
 	SOC=$(TI_K3_IMAGE_GEN_SOC) \
 	SOC_TYPE=$(TI_K3_IMAGE_GEN_SOC_TYPE) \
-- 
2.37.2




More information about the buildroot mailing list