Skip to content

Commit

Permalink
xtensa-build-zephyr: copy ALL cavstool*.py scripts
Browse files Browse the repository at this point in the history
Quoting zephyrproject-rtos/zephyr#46880 (review)

> 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 <[email protected]>
  • Loading branch information
marc-hb authored and lgirdwood committed Jul 4, 2022
1 parent e5b29d1 commit 7c5bf65
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions scripts/xtensa-build-zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,15 +538,21 @@ def build_platforms():

src_dest_list += [(sof_logger_executable_to_copy, sof_logger_installed_file)]

src_dest_list += [(pathlib.Path(west_top) /
"zephyr" / "soc" / "xtensa" / "intel_adsp" / "tools" / "cavstool.py",
tools_output_dir)]
# Append future files to `src_dest_list` here (but prefer
# copying entire directories; more flexible)

for _src, _dst in src_dest_list:
os.makedirs(os.path.dirname(_dst), exist_ok=True)
# looses file owner and group - file is commonly accessible
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():
if find_west_workspace():
raise RuntimeError("Zephyr found already! Not downloading it again")
Expand Down

0 comments on commit 7c5bf65

Please sign in to comment.