xtensa-build-zephyr.py: add for loop to install files into staging

Preparation to copy multiple files. Zero functional change.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2022-04-07 22:34:14 +00:00 committed by Liam Girdwood
parent 5243f0c4ee
commit f9c461009a
1 changed files with 9 additions and 3 deletions

View File

@ -435,15 +435,21 @@ def build_platforms():
# looses file owner and group - file is commonly accessible # looses file owner and group - file is commonly accessible
shutil.copy2(str(fw_file_to_copy), str(fw_file_installed)) shutil.copy2(str(fw_file_to_copy), str(fw_file_installed))
src_dest_list = []
# Install sof-logger # Install sof-logger
sof_logger_dir = pathlib.Path(west_top, platform_build_dir_name, "zephyr", sof_logger_dir = pathlib.Path(west_top, platform_build_dir_name, "zephyr",
"sof-logger_ep", "build", "logger") "sof-logger_ep", "build", "logger")
sof_logger_executable_to_copy = pathlib.Path(shutil.which("sof-logger", path=sof_logger_dir)) sof_logger_executable_to_copy = pathlib.Path(shutil.which("sof-logger", path=sof_logger_dir))
tools_output_dir = pathlib.Path(STAGING_DIR, "tools") tools_output_dir = pathlib.Path(STAGING_DIR, "tools")
sof_logger_installed_file = pathlib.Path(tools_output_dir, sof_logger_executable_to_copy.name).resolve() sof_logger_installed_file = pathlib.Path(tools_output_dir, sof_logger_executable_to_copy.name).resolve()
os.makedirs(os.path.dirname(sof_logger_installed_file), exist_ok=True)
# looses file owner and group - file is commonly accessible src_dest_list += [(sof_logger_executable_to_copy, sof_logger_installed_file)]
shutil.copy2(str(sof_logger_executable_to_copy), str(sof_logger_installed_file))
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))
def run_clone_mode(): def run_clone_mode():
if find_west_workspace(): if find_west_workspace():