From 64302814a973ab9ff8bef200a562016d2f49e9f2 Mon Sep 17 00:00:00 2001 From: Hannes Weisbach Date: Wed, 4 Mar 2026 11:23:03 +0100 Subject: [PATCH] dfx_dtg_common: handle all URI schemes XSCTH_HDF_PATH is set in dfx_dtg_common in a way what works only if SRC_URI contains a URI using the file: scheme, i.e. http:, https:, git:, ftp:, etc will fail. This patch gets the local path from Bitbake's Fetcher and extracts the file's basename to set XSCTH_HDF_PATH to that basename. Thus this change allows dfx_dtg_common to work with all styles of fetchers. Signed-off-by: Hannes Weisbach --- classes-recipe/dfx_dtg_full_common.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes-recipe/dfx_dtg_full_common.bbclass b/classes-recipe/dfx_dtg_full_common.bbclass index 476bba4f..8a4b23f4 100644 --- a/classes-recipe/dfx_dtg_full_common.bbclass +++ b/classes-recipe/dfx_dtg_full_common.bbclass @@ -9,7 +9,8 @@ inherit dfx_dtg_common python() { - d.setVar("XSCTH_HDF_PATH",[a for a in d.getVar('SRC_URI').split() if '.xsa' in a][0].removeprefix('file://')) + localpath = bb.fetch2.localpath([a for a in d.getVar('SRC_URI').split() if '.xsa' in a][0], d) + d.setVar("XSCTH_HDF_PATH", os.path.basename(localpath)) # Optional inputs if '.xclbin' in d.getVar("SRC_URI"):