mirror of https://github.com/thesofproject/sof.git
xtensa-build-zephyr: copy ALL cavstool*.py scripts
Quoting https://github.com/zephyrproject-rtos/zephyr/pull/46880#pullrequestreview-1020096140 > No complaints about the code here. Just a general comment: > I do worry that as cavstool grows features (first to add the test > integration support, now the new client/server architecture) that > we're obscuring the core code that does the loading behind a big > facade of other stuff that also has to be run In Just The Right Way to > make things work. That impedes development flow. It might be time to > split the code up so that a minimal "just run this file please" tool > can continue to be maintained.` Long story short: `cavstool.py` is likely to be split in the future. To be readi-er, copy the entire `zephyr/soc/xtensa/intel_adsp/tools/` directory. Copying the entire directory also copies scripts that will never be used on a test device like `cavstool_client.py`. They're small Python script sso we don't care: keep it simple. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
e5b29d1a9d
commit
7c5bf651f8
|
@ -538,15 +538,21 @@ def build_platforms():
|
||||||
|
|
||||||
src_dest_list += [(sof_logger_executable_to_copy, sof_logger_installed_file)]
|
src_dest_list += [(sof_logger_executable_to_copy, sof_logger_installed_file)]
|
||||||
|
|
||||||
src_dest_list += [(pathlib.Path(west_top) /
|
# Append future files to `src_dest_list` here (but prefer
|
||||||
"zephyr" / "soc" / "xtensa" / "intel_adsp" / "tools" / "cavstool.py",
|
# copying entire directories; more flexible)
|
||||||
tools_output_dir)]
|
|
||||||
|
|
||||||
for _src, _dst in src_dest_list:
|
for _src, _dst in src_dest_list:
|
||||||
os.makedirs(os.path.dirname(_dst), exist_ok=True)
|
os.makedirs(os.path.dirname(_dst), exist_ok=True)
|
||||||
# looses file owner and group - file is commonly accessible
|
# looses file owner and group - file is commonly accessible
|
||||||
shutil.copy2(str(_src), str(_dst))
|
shutil.copy2(str(_src), str(_dst))
|
||||||
|
|
||||||
|
# cavstool and friends
|
||||||
|
shutil.copytree(pathlib.Path(west_top) /
|
||||||
|
"zephyr" / "soc" / "xtensa" / "intel_adsp" / "tools",
|
||||||
|
tools_output_dir,
|
||||||
|
symlinks=True, ignore_dangling_symlinks=True, dirs_exist_ok=True)
|
||||||
|
|
||||||
|
|
||||||
def run_clone_mode():
|
def run_clone_mode():
|
||||||
if find_west_workspace():
|
if find_west_workspace():
|
||||||
raise RuntimeError("Zephyr found already! Not downloading it again")
|
raise RuntimeError("Zephyr found already! Not downloading it again")
|
||||||
|
|
Loading…
Reference in New Issue