The default behavior of using an XSCT tarball, either from file or as a download worked fine before. However, disabling this was not implemented but is a key workflow for PetaLinux.
Add support to disable the download and simply point to the location specified by the user. Signed-off-by: Mark Hatle <[email protected]> --- conf/xsct-tarball.inc | 5 +++++ recipes-utils/xsct/xsct-native.bb | 32 ++++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/conf/xsct-tarball.inc b/conf/xsct-tarball.inc index 8a0886e..1c574d3 100644 --- a/conf/xsct-tarball.inc +++ b/conf/xsct-tarball.inc @@ -32,5 +32,10 @@ XSCT_CHECKSUM ?= "${@d.getVarFlag('XSCT_CHECKSUM', d.getVar('TOOL_VER_MAIN'))}" VALIDATE_XSCT_CHECKSUM ?= '1' VALIDATE_XSCT_CHECKSUM[doc] = "Ignore the checksum when set to 0" +USE_XSCT_TARBALL ?= '1' +USE_XSCT_TARBALL[doc] = "Flag to determine whether or not to use the xsct-tarball class. \ +If enabled, the tarball from path EXTERNAL_XSCT_TARBALL is copied to downloads/xsct, and extracted \ +to tmp/sysroots-xsct. XILINX_SDK_TOOLCHAIN is set accordingly to use xsct from this path." + EXTERNAL_XSCT_TARBALL ?= "" EXTERNAL_XSCT_TARBALL[doc] = "Variable that defines where the xsct tarball is stored" diff --git a/recipes-utils/xsct/xsct-native.bb b/recipes-utils/xsct/xsct-native.bb index 93917fe..d62b251 100644 --- a/recipes-utils/xsct/xsct-native.bb +++ b/recipes-utils/xsct/xsct-native.bb @@ -87,19 +87,29 @@ XSCT_LOADER ?= "${XILINX_SDK_TOOLCHAIN}/bin/xsct" # Remove files we don't want do_compile() { - # Validation routines - if [ ! -d ${PV} ]; then - bbfatal "XSCT version mismatch.\nUnable to find `pwd`/${PV}.\nThis usually means the wrong version of XSCT is being used." - fi - - if [ ! -e ${PV}/bin/xsct ]; then - bbfatal "XSCT binary is not found.\nUnable to find `pwd`/${PV}/bin/xsct." + if [ "${USE_XSCT_TARBALL}" = "1" ]; then + # Validation routines + if [ ! -d ${PV} ]; then + bbfatal "XSCT version mismatch.\nUnable to find `pwd`/${PV}.\nThis usually means the wrong version of XSCT is being used." + fi + + if [ ! -e ${PV}/bin/xsct ]; then + bbfatal "XSCT binary is not found.\nUnable to find `pwd`/${PV}/bin/xsct." + fi + else + if [ ! -e ${XSCT_LOADER} ]; then + bbfatal "${XSCT_LOADER} not found. Please configure XILINX_SDK_TOOLCHAIN with the path to the extracted xsct-trim." + fi fi } do_install() { - install -d ${D}${STAGING_DIR_NATIVE}/Vitis - cp --preserve=mode,timestamps -R ${S}/* ${D}${STAGING_DIR_NATIVE}/Vitis/. + if [ "${USE_XSCT_TARBALL}" = "1" ]; then + install -d ${D}${STAGING_DIR_NATIVE}/Vitis + cp --preserve=mode,timestamps -R ${S}/* ${D}${STAGING_DIR_NATIVE}/Vitis/. + else + bbwarn "Using external XSCT: ${XILINX_SDK_TOOLCHAIN}" + fi } # If the user overrides with EXTERNAL_XSCT_TARBALL, use it instead @@ -108,6 +118,10 @@ python() { if ext_tarball: d.setVar('XSCT_URL', 'file://${EXTERNAL_XSCT_TARBALL}') + + use_xsct_tarball = d.getVar("USE_XSCT_TARBALL") + if use_xsct_tarball != '1': + d.setVar('SRC_URI', '') } ERROR_QA:remove = "already-stripped" -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#5418): https://lists.yoctoproject.org/g/meta-xilinx/message/5418 Mute This Topic: https://lists.yoctoproject.org/mt/106610009/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-xilinx/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
