summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core
diff options
context:
space:
mode:
authorSandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>2023-03-15 16:43:56 -0600
committerMark Hatle <mark.hatle@amd.com>2023-03-15 18:50:31 -0500
commit493e7f063aac00e643b0fff9cbe8b3489400d85c (patch)
treee4e0271bc8dad50fad504ae4540c21f42929db0c /meta-xilinx-core
parentdc96cae4b70252a7d5f0aff5ac3d4f9ab52889b9 (diff)
downloadmeta-xilinx-493e7f063aac00e643b0fff9cbe8b3489400d85c.tar.gz
fpgamanager_custom: Fix logic for deploying shell json file
fpgamanager_custom bbclass allowed only accel.json file as user input from firmware recipes, if user want to use flat or DFx static design using shell.json, then shell.json is not deployed in rootfs/${nonarch_base_libdir}/firmware/xilinx/${PN} directory. Fix the logic to deploy shell.json (flat or DFx Static) or accel.json (DFx RP) for flat, DFx Static and DFx RP use cases. Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> Signed-off-by: Mark Hatle <mark.hatle@amd.com> (cherry picked from commit 6d3f12d1feee8b90f3dc72a05266fb3614788ced) Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-core')
-rw-r--r--meta-xilinx-core/classes/fpgamanager_custom.bbclass12
1 files changed, 8 insertions, 4 deletions
diff --git a/meta-xilinx-core/classes/fpgamanager_custom.bbclass b/meta-xilinx-core/classes/fpgamanager_custom.bbclass
index 466c615b..179169af 100644
--- a/meta-xilinx-core/classes/fpgamanager_custom.bbclass
+++ b/meta-xilinx-core/classes/fpgamanager_custom.bbclass
@@ -1,3 +1,7 @@
1# This bbclass is inherited by flat, DFx Static and DFx RP firmware recipes.
2# fpgamanager_custom.bbclass expects user to generate pl dtsi for flat, DFx Static
3# and DFx RP xsa outside of yocto.
4
1inherit devicetree 5inherit devicetree
2 6
3DEPENDS = "dtc-native bootgen-native" 7DEPENDS = "dtc-native bootgen-native"
@@ -61,8 +65,8 @@ python() {
61 raise bb.parse.SkipRecipe("Need one '.dtsi' or one '.dtbo' file added to SRC_URI ") 65 raise bb.parse.SkipRecipe("Need one '.dtsi' or one '.dtbo' file added to SRC_URI ")
62 66
63 # Optional input 67 # Optional input
64 if 'accel.json' in d.getVar("SRC_URI"): 68 if '.json' in d.getVar("SRC_URI"):
65 d.setVar("JSON_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if 'accel.json' in a][0].lstrip('file://'))) 69 d.setVar("JSON_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.json' in a][0].lstrip('file://')))
66 70
67 if '.xclbin' in d.getVar("SRC_URI"): 71 if '.xclbin' in d.getVar("SRC_URI"):
68 d.setVar("XCL_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.xclbin' in a][0].lstrip('file://'))) 72 d.setVar("XCL_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.xclbin' in a][0].lstrip('file://')))
@@ -151,8 +155,8 @@ do_install() {
151 install -Dm 0644 ${S}/${XCL_PATH}/*.xclbin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.xclbin 155 install -Dm 0644 ${S}/${XCL_PATH}/*.xclbin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.xclbin
152 fi 156 fi
153 157
154 if [ -f ${WORKDIR}/${JSON_PATH}/accel.json ]; then 158 if [ -f ${S}/${JSON_PATH}/shell.json ] || [ -f ${S}/${JSON_PATH}/accel.json ]; then
155 install -Dm 0644 ${S}/${JSON_PATH}/accel.json ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/accel.json 159 install -Dm 0644 ${S}/${JSON_PATH}/*.json ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
156 fi 160 fi
157} 161}
158 162