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>
Note this change does NOT affect Zephyr builds in any shape or form as
Zephyr builds simply don't use the CMake files changed by this commit.
Downloading missing submodules at build time was never a good idea;
always a hack. Downloading and building should always be kept separate
from each other for version control and bill of materials reasons and to
support "off-line" builds; build inputs should always be available.
Now that Zephyr builds have just moved away from git submodules
(replaced by west), stop sneakily downloading missing submodules at
build time while the user cannot notice, overwhelmed by the volume of
build logs. Someone building XTOS first and Zephyr second could
unknowningly end up in a "hybrid" and undesired situation where git
submodules and west would be BOTH pointing at the same rimage clone.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes pylint warning `scripts/xtensa-build-zephyr.py:426:5: W0621:
Redefining name 'platform' from outer scope (line 14)
(redefined-outer-name)` and reduce "grep confusion": the script uses
`platform` A LOT.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
There's just too many of them and fixing them would cause a lot of churn
at a wrong time (big migration to west happening now)
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
shlex.join() requires 3.8, maybe others too. 3.8 is 3 years old and it's
the default Python version in Ubuntu 20.04
Fixes#6121
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
West tool returns on windows OS different white characters
than on Linux OS. Paths outputted from west tool had been
stripped for any trailing whitespaces.
Fixes "xtensa-build-zephyr.py: use west manifest"
(608833cf27)
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Stop immediately when `west build` fails. Do no keep going and show a
totally unrelated smex build failure.
Also fix error message when zephyr/ is missing.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Make the new -p pristine build option also delete the staging_dir. This
solves a problem where the following sequence was leaving a stale
platform1 build in staging:
xtensa-build-zephyr.py -p platform1
< code >
xtensa-build-zephyr.py -p platform2
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Added versioning to scripts/xtensa-build-zephyr.py to get version
information when incompatible changes are done to the script.
Added yml schema version number to west.yml manifest.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>