Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions scripts/xtensa-build-zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ def build_platforms():
if platform not in RI_INFO_UNSUPPORTED:
reproducible_checksum(platform, west_top / platform_build_dir_name / "zephyr" / "zephyr.ri")

install_platform(platform, sof_platform_output_dir)
install_platform(platform, sof_platform_output_dir, platf_build_environ)

src_dest_list = []

Expand Down Expand Up @@ -706,7 +706,7 @@ def build_platforms():
symlinks=True, ignore_dangling_symlinks=True, dirs_exist_ok=True)


def install_platform(platform, sof_platform_output_dir):
def install_platform(platform, sof_platform_output_dir, platf_build_environ):

# Keep in sync with caller
platform_build_dir_name = f"build-{platform}"
Expand Down Expand Up @@ -797,7 +797,12 @@ class InstFile:
# Remove it like some gcc test scripts do:
# https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=c7046906c3ae
if "strip" in str(dstname):
execute_command([str(x) for x in [objcopy, "--remove-section", ".comment", src, dst]])
execute_command(
[str(x) for x in [objcopy, "--remove-section", ".comment", src, dst]],
# Some xtensa installs don't have a
# XtensaTools/config/default-params symbolic link
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure the comment is really needed, the vendor toolchain passes junk in the environment. No reason to expect the binutils equivalents to work any differently from the compiler.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review!

The toolchain install process in xtensa is really fragile. It's almost enough to just tar up and copy the directory around, but some things break.

While investigating #7114 I had the... "opportunity" to compare installation across different machines. All the binaries are (fortunately!) identical and the only differences are absolute paths in a number of text config files (set by the installer script). It's much simpler than what I feared initially.

Not sure the comment is really needed, the vendor toolchain passes junk in the environment. No reason to expect the binutils equivalents to work any differently from the compiler.

I've successfully invoked xt-objdump many times without any XTENSA_ variable thanks to this default-params symlink - without realizing it until today! I think that symlink is worth knowing. Here for a lack of a better place.

env=platf_build_environ,
)
elif f.txt:
dos2unix(src, dst)
else:
Expand Down