Signed-off-by: Mark Hatle <[email protected]>
---
 classes-global/vivado.bbclass            |  16 ---
 classes-global/xilinx-tool-check.bbclass |  45 -------
 classes/externalxsctsrc.bbclass          | 146 -----------------------
 3 files changed, 207 deletions(-)
 delete mode 100644 classes-global/vivado.bbclass
 delete mode 100644 classes-global/xilinx-tool-check.bbclass
 delete mode 100644 classes/externalxsctsrc.bbclass

diff --git a/classes-global/vivado.bbclass b/classes-global/vivado.bbclass
deleted file mode 100644
index b79c192..0000000
--- a/classes-global/vivado.bbclass
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Copyright (C) 2018-2022, Xilinx, Inc.  All rights reserved.
-# Copyright (C) 2023, Advanced Micro Devices, Inc.  All rights reserved.
-#
-# SPDX-License-Identifier: MIT
-#
-
-inherit xilinx-tool-check
-
-VIVADO_PATH_ADD = "${XILINX_VIVADO_DESIGN_SUIT}/bin:"
-PATH =. "${VIVADO_PATH_ADD}"
-
-TOOL_PATH = "${XILINX_VIVADO_DESIGN_SUIT}/bin"
-TOOL_VERSION_COMMAND = "vivado -version"
-TOOL_VER_MAIN ??= "${XILINX_XSCT_VERSION}"
-TOOL_NAME = "vivado"
diff --git a/classes-global/xilinx-tool-check.bbclass 
b/classes-global/xilinx-tool-check.bbclass
deleted file mode 100644
index 9f8ddc4..0000000
--- a/classes-global/xilinx-tool-check.bbclass
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# Copyright (C) 2016-2022, Xilinx, Inc.  All rights reserved.
-# Copyright (C) 2023, Advanced Micro Devices, Inc.  All rights reserved.
-#
-# SPDX-License-Identifier: MIT
-#
-# Check Xilinx tool version
-
-def run_tool(d):
-    import bb.process
-    import subprocess
-
-    topdir = d.getVar('TOPDIR')
-    toolchain_path = d.getVar('TOOL_PATH')
-    if not toolchain_path:
-        return 'UNKNOWN', 'UNKNOWN'
-
-    os.environ["RDI_VERBOSE"] = "0"
-    cmd = os.path.join(toolchain_path, d.getVar('TOOL_VERSION_COMMAND'))
-    return bb.process.run(cmd, cwd=topdir, stderr=subprocess.PIPE)
-
-def tool_get_version(d):
-    import re
-    try:
-        stdout, stderr = run_tool(d)
-    except bb.process.CmdError as exc:
-        bb.error('Failed to execute app version is : %s' % exc)
-        return 'UNKNOWN'
-    else:
-        if stdout != 'UNKNOWN':
-            last_line = stdout.splitlines()[0].split()[-2]
-            return last_line[1:7]
-
-python tool_eventhandler () {
-    TOOL_VERSION = tool_get_version(d)
-    TOOL_REQ_VERSION = d.getVar("TOOL_VER_MAIN")
-    CURRENT_TOOL_NAME = d.getVar("TOOL_NAME")
-    if TOOL_VERSION != TOOL_REQ_VERSION:
-        bb.fatal("%s version does not match. Version is %s: checking for %s. 
Check if XILINX_SDK_TOOLCHAIN or XILINX_VIVADO_DESIGN_SUIT in your local.conf 
is pointing to the right location. " % (CURRENT_TOOL_NAME, TOOL_VERSION, 
TOOL_REQ_VERSION))
-
-    print("%s is valid, version is %s" % (CURRENT_TOOL_NAME,TOOL_REQ_VERSION))
-}
-
-addhandler tool_eventhandler
-tool_eventhandler[eventmask] = "bb.event.BuildStarted"
diff --git a/classes/externalxsctsrc.bbclass b/classes/externalxsctsrc.bbclass
deleted file mode 100644
index c33c84f..0000000
--- a/classes/externalxsctsrc.bbclass
+++ /dev/null
@@ -1,146 +0,0 @@
-#
-# Copyright (C) 2023, Advanced Micro Devices, Inc.  All rights reserved.
-# Copyright (C) 2017-2022, Xilinx, Inc.  All rights reserved.
-# Based on externalsrc.bbclass, original copyrights follow:
-# Copyright (C) 2012 Linux Foundation
-# Some code and influence taken from srctree.bbclass:
-# Copyright (C) 2009 Chris Larson <[email protected]>
-#
-# SPDX-License-Identifier: MIT
-#
-
-SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
-EXTERNALXSCTSRCHASH ?= "src build"
-
-python () {
-    externalsrc = d.getVar('EXTERNALXSCTSRC')
-
-    if externalsrc:
-        import oe.recipeutils
-        import oe.path
-
-        d.setVar('BB_DONT_CACHE', '1')
-        d.setVar('S', externalsrc)
-        externalsrcbuild = d.getVar('EXTERNALXSCTSRC_BUILD')
-        if externalsrcbuild:
-            d.setVar('B', externalsrcbuild)
-        else:
-            d.setVar('B', '${UNPACKDIR}/${BPN}-${PV}/')
-
-        if d.getVar('S') == d.getVar('B'):
-            bb.error("Cannot set build directory to be same as source 
directory")
-            return None
-
-        local_srcuri = []
-        fetch = bb.fetch2.Fetch((d.getVar('SRC_URI') or '').split(), d)
-        for url in fetch.urls:
-            url_data = fetch.ud[url]
-            if (url_data.type == 'file'):
-                    local_srcuri.append(url)
-
-        d.setVar('SRC_URI', ' '.join(local_srcuri))
-
-        if '{SRCPV}' in d.getVar('PV', False):
-            # Dummy value because the default function can't be called with 
blank SRC_URI
-            d.setVar('SRCPV', '999')
-
-        tasks = filter(lambda k: d.getVarFlag(k, "task", True), d.keys())
-
-        for task in tasks:
-            if task.endswith("_setscene"):
-                # sstate is never going to work for external source trees, 
disable it
-                bb.build.deltask(task, d)
-            else:
-                # Since configure will likely touch ${S}, ensure only we lock 
so one task has access at a time
-                d.appendVarFlag(task, "lockfiles", " 
${TMPDIR}/singlexscttask.lock")
-
-            # We do not want our source to be wiped out, ever (kernel.bbclass 
does this for do_clean)
-            cleandirs = oe.recipeutils.split_var_value(d.getVarFlag(task, 
'cleandirs', False) or '')
-            setvalue = False
-            for cleandir in cleandirs[:]:
-                if oe.path.is_path_parent(externalsrc, d.expand(cleandir)):
-                    cleandirs.remove(cleandir)
-                    setvalue = True
-            if setvalue:
-                d.setVarFlag(task, 'cleandirs', ' '.join(cleandirs))
-
-        fetch_tasks = ['do_fetch', 'do_unpack']
-        # If we deltask do_patch, there's no dependency to ensure do_unpack 
gets run, so add one
-        # Note that we cannot use d.appendVarFlag() here because deps is 
expected to be a list object, not a string
-        d.setVarFlag('do_configure', 'deps', (d.getVarFlag('do_configure', 
'deps', False) or []) + ['do_unpack'])
-
-        for task in d.getVar("SRCTREECOVEREDTASKS").split():
-            if local_srcuri and task in fetch_tasks:
-                continue
-            bb.build.deltask(task, d)
-
-        d.prependVarFlag('do_compile', 'prefuncs', 
"xsct_externalsrc_compile_prefunc")
-
-        external_xsct_src_hash = d.getVar('EXTERNALXSCTSRCHASH')
-
-        # If EXTERNALXSCTSRCHASH is set to both build and src, hash both.
-        # If EXTERNALXSCTSRCHASH is set to build, hash build file. By default 
hash src files if EXTERNALXSCTSRCHASH is empty. 
-        if ((external_xsct_src_hash.find('build') != -1) and 
(external_xsct_src_hash.find('src')!= -1)):
-            d.setVarFlag('do_compile', 'file-checksums', 
'${@xsct_buildtree_hash_files(d)} ${@xsct_srctree_hash_files(d)}')
-
-        elif external_xsct_src_hash.find('build') != -1:
-            d.setVarFlag('do_compile', 'file-checksums', 
'${@xsct_buildtree_hash_files(d)}')
-
-        else:
-            d.setVarFlag('do_compile', 'file-checksums', 
'${@xsct_srctree_hash_files(d)}')
-
-        # We don't want the workdir to go away
-        d.appendVar('RM_WORK_EXCLUDE', ' ' + d.getVar('PN'))
-}
-
-COMPILE_TRIGGER_FILES = "${XSCTH_WS}/${XSCTH_PROJ}"
-
-python xsct_externalsrc_compile_prefunc() {
-    # Make it obvious that this is happening, since forgetting about it could 
lead to much confusion
-    bb.plain('NOTE: %s: compiling from external source tree %s' % 
(d.getVar('PN'), d.getVar('EXTERNALXSCTSRC')))
-}
-
-
-def xsct_srctree_hash_files(d):
-    import shutil
-    import subprocess
-    import tempfile
-
-    s_dir = d.getVar('EXTERNALXSCTSRC')
-    git_dir = os.path.join(s_dir, '.git')
-    oe_hash_file = os.path.join(git_dir, 'oe-devtool-tree-sha1')
-
-    ret = " "
-    if os.path.exists(git_dir):
-        with tempfile.NamedTemporaryFile(dir=git_dir, 
prefix='oe-devtool-index') as tmp_index:
-            # Clone index
-            shutil.copy2(os.path.join(git_dir, 'index'), tmp_index.name)
-            # Update our custom index
-            env = os.environ.copy()
-            env['GIT_INDEX_FILE'] = tmp_index.name
-            subprocess.check_output(['git', 'add', '.'], cwd=s_dir, env=env)
-            sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, 
env=env).decode("utf-8")
-        with open(oe_hash_file, 'w') as fobj:
-            fobj.write(sha1)
-        ret = oe_hash_file + ':True'
-    else:
-        ret = d.getVar('EXTERNALXSCTSRC') + '/*:True'
-    return ret
-
-def xsct_buildtree_hash_files(d):
-    import os
-
-    """
-    Get the list of files that should trigger do_compile to re-execute,
-    """
-    in_files = (d.getVar('COMPILE_TRIGGER_FILES') or '').split()
-    out_items = []
-    for entry in in_files:
-        if os.path.isdir(entry):
-            for path, subdirs, files in os.walk(entry):
-                for file in files:
-                    if file.endswith(('.c', '.h', '.tcl')):
-                        out_items.append('%s:True' % (os.path.join(path, 
file)))
-        else:
-            out_items.append('%s:%s' % (entry, os.path.exists(entry)))
-    return ' '.join(out_items)
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5408): 
https://lists.yoctoproject.org/g/meta-xilinx/message/5408
Mute This Topic: https://lists.yoctoproject.org/mt/106609999/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-xilinx/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to