During testing of Windows CI workflow on windows-latest turned out
that github action console has issues rendering python
anytree.RenderTree graph with default style of
anytree.render.ContStyle (continuous vertical and horizontal lines).
Tests on local machines in cmd, pwershell and msys shells
proves, that all shells can render the graph (while powershell
does not do this correctly and graph is malformed).
Changing graph style to ASCII resolves the issue with Github actions.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
On my system this brings the install_platform() duration down from about
3 seconds to less than 1 second.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
In theory a failure from this script should immediately stop the show
and no one should then use the staging directory.
In practice we cannot make sure, especially not with shell scripts. So
make sure no previous build of a requested platform is left behind.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
.config is not deterministic because it has absolute paths in comments
and its order seems hard to predict. configs.c has the same information
generated in a determistic way.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Make sure any forward slashes in strings are immediately converted to
OS-dependent directory separators.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Make stripped ELF files compiled by XCC identical across different
machines.
Some Xtensa compilers (ab?)use the .ident / .comment
section and append the typically absolute and not
reproducible /path/to/the.c file after the usual
compiler ID.
https://sourceware.org/binutils/docs/as/Ident.html
strip --strip-all does not remove the .comment section.
Remove ourselves like some gcc test scripts do:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=c7046906c3ae
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This reverts commit ce28e09bd3.
This fixes Zephyr's git describe command and build reproducibility.
I tried fairly hard various git fetch options like --shallow-exclude
and --shallow-since but they did not save that much download (200MB at
best), required some hardcoding and most importantly they make complete
clones shallow again when invoked unconditionally. Not worth the
effort, build reproducibility is more important.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This saves a couple seconds when building from scratch on Linux.
On Linux the default CMake generator is "Makefiles" which is _not_
parallel by default.
Thanks to the previous commit it's still possible to manually switch to
"Makefiles" if desired.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
It's pointless and hardcodes the CMake generator.
Also remove wrong comment added in commit
6cba64d2cb ("xtensa-build-zephyr.py: fix a few minor pylint warnings")
The rimage part of the comment was flat out wrong.
The smex part of the comment is correct but in the wrong place.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Update READY_IPC value based on changes regarding MU reset.
READY_IPC value comes from:
- clear GP pending interrupt #0 and #1 from MU's xSR register;
- enable GP #0 and #1 for Host -> DSP and DSP -> Host
message notification from MU's xCR register;
- now interrupt host to tell it we are done booting
by setting GIRn bit in MU's xCR register.
So, "00 00 00 c0 00 00 04 c0" is the MU's xSR and xCR registers:
xSR: c0000000 and xCR: c0040000
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Zero functional change.
Lowers the score of the following pylint warnings:
- Too many local variables (38/15) (too-many-locals) 41->38
- Too many branches (26/12) (too-many-branches) 29->26
- Too many statements (116/50)(too-many-statements) 127->116
Keep existing indentation for now to help git blame -Mnn. Will fix in next
commit.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Copy the entire list of UNSIGNED_RI platforms from
src/arch/xtensa/CMakeLists.txt, adding the ones that don't use Zephyr
yet.
Also rename NO_RIMAGE_PLATFORMS to RI_INFO_UNSUPPORTED not to give the
wrong impression that imx8* don't use rimage.
Fixes commit 3a9413eebd ("xtensa-build-zephyr.py: restore lost
reproducible .ri checksum")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
When cloning sof under a different directory name like
sof-experiment1 ((which is bad but we can't stop it unfortunately and it
keeps happening), it's common to end up with two rimage git checkouts:
sof/rimage and sof-experiment1/rimage. Detect this and fail immediately.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
These hardcoded 511 permissions came with the initial commit
1de3ef3675 ("Rewritten xtensa-build-zephyr.sh to python") without any
particular explanation.
On Unix, permissions of new files and directories are a user preference
set with the `umask`, different applications are not supposed to create
directories differently.
On Windows/NTFS it's not clear what 511 maps to.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
At the end of the build, parse the .ri file and print a reproducible
checksum of the its content.
This feature was in xtensa-build-zephyr.sh but never made it to the .py
conversion. It was lost when the .sh file was deleted in commit
ef028f634a ("Removed obsolete xtensa-build-zephyr.sh")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This is especially useful when compiling each C file requires a
network round-trip to a license server
Also stop overriding the ninja default when building rimage.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Simplify the final installation code to prepare for installing more
files. Zero functional change.
Notably perform the cavs naming trick inside the build directory first
which allows using a destination directory instead of a destination file.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Very minor, zero-change re-ordering to make the next commit easier to
review. Fixes commit 762f63bf8b ("xtensa-build-zephyr: add option to
build FW in cavs naming style")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
`pathlib.glob()` (and filesystems in general) provide no ordering
guarantee, which is likely why every glob() example in
https://docs.python.org/3/library/pathlib.html#pathlib.Path.glob
is sorted(). Follow these examples and use `sorted()`.
Fix error handling to run _before_ the `list index out of range`
exception hits. Also make it fatal now because there's no more any good
reason for this to fail.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Make prints a line for every topology that is already up to date and not
rebuilt. It's impossible to see what was done.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes commit d09844ab98 ("zephyr/docker-build.sh: match UID with
'adduser' instead of 'chgrp -R'")
Also clarify comment and add reference to new sudo-cwd.sh script.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Besides making things more obvious, the important functional change is
that the user switch is now performed for _every_ invoked, command, not
just for the build command.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Environment variables like XTENSA_SYSTEM are an absolute CMake
pain. Add a link to the CMake FAQ and a one-line description why.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Don't ask the user to delete the build directory when they are using the
option that deletes the build directory.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
`./xtensa-build-zephyr.py -i IPC3 mtl` builds the MTL default: IPC4.
This is wrong, remove the misleading "IPC3" option which never did
anything at all.
Fix the --help string to describe what actually happens. This is a build
script, no need for fancy abstractions and indirections that don't even
match reality. Just tell it like it is.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Added new mtl platform to xtensa-build-zephyr.py.
Added ace directories to cmake files.
Added ACE to kconfig.
Add Meteorlake platform to be built with Zephyr under
CONFIG_ACE_VERSION_1_5 flag.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Signed-off-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
FullTest variable is by default 0. When fulltest is required,
set the variable and run the script like,
$ FullTest=1 ./scripts/host-testbench.sh
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Expand to more components with process_test. Components for test are
volume, eq-iir, eq-fir, dcblock, drc, multiband-drc, src and tdfb.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
we will switch to using this new logging tool, copy it to the tools
folder, then it will be uploaded to CI storage after building.
Signed-off-by: Keqiao Zhang <keqiao.zhang@intel.com>
Fixes commit d09844ab98 ("zephyr/docker-build.sh: match UID with
'adduser' instead of 'chgrp -R'")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The rmb toolchain was added in commit 4e85dfc95f ("docker: add
AMD/Rembrandt gcc toolchain") and before.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>