Zephyr XCC builds for Apollolake can be re-enabled now after the RAM
footprint has been reduced.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
... because there's no reason to make one depend on the other.
Same for the opportunistic creation of the sof symbolic link.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Do not define a default WEST_TOP at the very start because we may not
have one. Define WEST_TOP only when the user gives one or when we
actually find one. And search harder.
Do not trust optional WEST_TOP user input blindly either. This was
leading mkdir -p to create a bogus modules/audio/ directory.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
"tree" is very useful but it's not critical, not worth failing the build
for.
Also remove a single quote from the help message as it breaks parsing
in one simple editor I use (jed) and possibly others.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This is needed by CI to clone only once and then take control of the
iteration over platform builds. CI already does all that but by
copy/paste/diverge of this clone() function.
Once cloning Zephyr in CI code is de-duplicated and uses this new
clone-only feature instead, it will be possible to submit any Zephyr
commit to SOF testing. In other words it will make failed attempt
https://github.com/thesofproject/sof/pull/4728 possible
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
main() was growing too big. Zero functional change.
Also rename the too generic "build()" to build_all()
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Recently merged rework of multicore support in Zephyr has
broken builds with XCC. Disable XCC based builds in CI until
issue is resolved in Zephyr mainline. Issue tracked as:
https://github.com/zephyrproject-rtos/zephyr/issues/38349
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
We care about other build errors more.
This also makes it easier to test locally that "west build" does not
depend on rimage to create zephyr.elf
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The BSS usage exceeds available memory when building for
APL/cavs15 hardware with XCC, so disable it for now. Issue
tracked as https://github.com/thesofproject/sof/issues/4645
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Remove the unnecessary assumption that Xtensa tools are installed under
'XtDevTools'.
Align indentation to use tabs as is used elsewhere in this file.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add support to build with XCC compiler by setting XTENSA_TOOLS_ROOT
env variable. The interface follows xtensa-build-all.sh, so existing
CI scripts for SOF builds can easily update to build with XCC.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add imx8 platform for local testing.
TODO: Update xtensa-build-zephyr.sh when Zephyr repo
is updated with imx8 support.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
-p is required when the real (not symbolic) directories are not nested
in one another.
The documentation gap was clearly demonstrated by me getting confused
even though _I_ implemented this logic some time back.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Ready to be transferred to the remote system. Sample output:
build-sof-staging
├── sof
│ ├── community
│ │ ├── sof-apl.ri
│ │ └── sof-tgl-h.ri
│ ├── sof-apl.ldc
│ └── sof-tgl-h.ldc
└── tools
└── sof-logger
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Zephyr's incremental build works and saves time. I have been using it
with SOF for a long time. Slowly rebuilding from scratch is as simple as
deleting the build-$platform/ build directory. Quickly building not from
scratch is not possible without this commit.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Zero functional change.
Makes the code and the build logs clearer, especially for SOF people new
to west. Short options are for saving repetitive typing; no reason to
use them in a script.
Also show the real /bin/pwd which can help when west gets lost in
complex symbolic link situations.
https://github.com/zephyrproject-rtos/west/issues/419
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
More robust support for "manual" installations.
Also rephrase usage string to remove a single quote breaking
the shell parser in one editor I use (sorry).
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
By default, the Zephyr build does not log its version. The fix has
already been submitted at
https://github.com/zephyrproject-rtos/zephyr/pull/34842 however:
- 34842 may take some time. Zephyr reviewers are even busier than the
SOF reviewer.
- 34842 could even be rejected
- 34842 will at best log the SHA1 and no context. This is more verbose
and future-proof because it supports more complex situations like
testing a pull/12345/merge
As seen in (unrelated) PR #4123, we need Zephyr git versions NOW.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes 33c5f5d38e ("xtensa-build-zephyr: do not clone a second version of
sof.git")
The very first version of this test was checking whether the rimage/
directory exists, which proves nothing. So I switched to
rimage/CMakelists.txt but forgot change the `test` flag.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This script lives in a sof.git/ clone yet it was systematically cloning
a second sof.git/. Besides the obvious confusion and risk of editing the
wrong files, this meant it was not possible to build code that has not
been merged yet! This was a problem for both CI and developers. Fixed by
using symbolic links to ourselves instead.
Note it is _still_ possible to build from another sof.git clone if
desired, however this script will never git re-clone a second sof.git
itself, that second clone has to be created (e.g.: by west) before this
script runs.
When cloning a brand new zephyrproject, use a shallow zephyr clone and
download only the two zephyr modules we actually use. This speeds up
automation considerably and makes it much faster for non-Zephyr
developers to reproduce Zephyr issues. Developers can always git
unshallow and west update once if they want to.
Rename the default west top to "zephyrproject" to not just match the
zephyr documentation but to also avoid creating a double zephyr/zephyr/
directory.
See the new print_usage() for a few more implementation details.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
It still looks smart but the \n addition compared to the original
version in xtensa-build-all.sh broke it for more advanced cases:
die '%s %d' str 5
-bash ERROR: -bash: printf: 5\n: invalid number
As reported by shellcheck. shellcheck saves lives.
In scripts/xtensa-build-zephyr.sh line 22:
>&2 printf "$@\n"
^-- SC2145: Argument mixes string and array.
Use * or separate argument.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>