Installing most of the tools/ directory does not technically require
building any platform, so add that possibility.
This is useful because the Jenkins-based CI builds the (userspace) tools
separately. So far it has been picking hardcoded source paths but of
course the HWMv2 transition just broke that:
https://github.com/thesofproject/sof/pull/8913
While it's too late this time (we want to keep CI able to test stable
branches for some time), this commit prepares a future where all CIs can
stop hardcoding Zephyr source paths and pick the output of the
xtensa-build-zephyr.py installer and indirection layer instead.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add support for relocatable objects to the llext module build system.
In such builds no ELF segments are created, so we need to process all
sections individually.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Every Linux developer should use deployable builds by default.
Until Peter Ujfalusi's very recent work in this script, we had a
complete `/lib/firmware/` structure disconnect between the IPC4 output
of this script and the IPC4 expectations of the Linux kernel. To
workaround this disconnect, every CI and Linux developer used to
implement duplicate and inconsistent firmware deployment hacks.
People crafting sof-bin releases also had to organize IPC4 releases
manually, which was extremely error-prone and with limited test
coverage (Thanks Kai and Mengdong!)
Now that Peter gracefully fixed the layout, documented it in sof-docs
and implemented it in this script, the time for all Linux developers to
drop their inconsistent deployment hacks is overdue. All these hacks
must be replaced with a simple, one-line recursive copy which makes sure
the layout committed in version control is constantly tested by
everyone.
So, make deployable builds the new default.
The new default will also help with sof-bin releases, making sure they
use a well tested /lib/firmware/ layout.
The --no-deployable-build was recently introduced to help minimize
disruption and migration effort for people and automation who do NOT use
Linux. The `/lib/firmware/` directory structure is irrelevant outside
Linux (but everyone is of course free to choose it)
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Contains the following squashed SOF commits:
nxp: imx8ulp: change SOC name to MIMX8UD7
zephyr: CMakeLists.txt use new `CONFIG_SOC_C` for 8ULP
cmake: update configs for NXP ADSP
and the following Zephyr patches affecting SOF:
951763939034 nxp: imx8ulp: change SOC name to MIMX8UD7
b8214b673970 dts: xtensa: nxp_imx8: add SAI1 node
a0e32f07ef76 dts: intel_adsp: ace: update host dma copy alignment
3fde2c50c6ef tracing: add intel ADSP memory window backend
6b9d01f995c7 intel_adsp/ace: power: No pending transaction before power gate
6ea749de5283 arch: rename arch_start_cpu() to arch_cpu_start()
b69d2486fee6 kernel: rename Z_KERNEL_STACK_BUFFER to K_KERNEL_STACK_BUFFER
1f55be8b42df nxp: imx8: change CONFIG_SOC_<name> to match the value
688fbb53aeb2 intel_adsp: ace: Fix sparse error
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
XTOS is going to be deprecated on i.MX8ULP so prevent
building it by removing it from the list of supported
platforms from `xtensa-build-all.sh`. This is needed for
switching to Zephyr native drivers.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Add new file generated since commit cf9a444bfc ("toml: modularise TOML
configuration")
Optional because it's not generated for all platforms.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Convert the smart-amp-test in its IPC4 version to a loadable LLEXT
module. Use an overlay configuration to select between monolithic and
modular builds.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Switch back to main Zephyr repository and commit f9f44b6dcdd.
This includes following squashed SOF commits that are
needed to adapt to HWMv2 changes in Zephyr:
zephyr: app: scripts: intel_adsp: change board names to HWMv2
zephyr: sof: update board name for HWMv2
zephyr: intel_adsp: Change ACE SoC name to HWMv2
app: boards: imx93: updates for zephyr hwmv2
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
There was no need to use the external "timeout" command + some
complicated exit code logic, libFuzzer has that feature built-in. Switch
to it and delete a few good line.
Add an option to use the built-in, concurrent -jobs feature which saves
a massive amount of time. It has some quirks so do not enable it by
default.
Decrease verbosity by default.
Add in the help message the magic replay command that saves a ton of time.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
To prepare for XTOS deprecation and switch to Zephyr native
drivers on imx8/imx8x, remove the ability to build SOF
with XTOS on them.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
XTOS is going to be deprecated on all NXP's platforms so
replace imx8 with AMD's rmb so that the CI test can be kept.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
This reverts 8f6018057b ("app: enable OUTPUT_DISASSEMBLY for Zephyr
builds")
The disassembly is useful in some contexts but can't be parallelized and
takes an enormous amount of time. On my system OUTPUT_DISASSEMBLY
almost doubles the compilation time!
Quoting Zephyr commit cc5763344709:
> This on-by-default option takes the majority of "link" time. If people
> need the disassembly, they can turn it on.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Everyone should use deployable builds by default. Don't switch the
default behavior yet but add a --no-deployable-build option in case
anyone is stuck.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The default firmware file path is standardized among vendors as follows:
IPC3
/lib/firmware/VENDOR/sof/
├── community
│ └── sof-PLAT.ri
├── dbgkey
│ └── sof-PLAT.ri
└── sof-PLAT.ri
IPC4
/lib/firmware/VENDOR/sof-ipc4/
└── PLAT
├── community
│ └── sof-PLAT.ri
├── dbgkey
│ └── sof-PLAT.ri
└── sof-PLAT.ri\n
Currently the binaries created by the build can only be used for direct
deployment on IPC3 platforms but if one builds different vendor firmwares
the files have to be manually picked and sorted out.
We have two flags: --fw-naming and --use-platform-subdir which can be
played with but still not going to produce deployable build.
Introduce a new flag: --deployable-build
With the flag specified all other modificators are going to be ignored and
the build will do the 'right thing' to create a directory structure which
can be deployed as it is to the target's firmware directory.
To achieve this several changes needed:
PlatformConfig:
- drop the name member and replace it with a vendor string
- add a flag to indicate IPC4 platforms
Later a new option can be added if needed for platforms which can be
IPC3 or IPC4
Ignore fw-naming and use-platform-subdir in case of deployable build. The
options will be reset to their default in case they are changed.
symlink_or_copy extended to handle relative symlinks when the target and
link is not under the same directory.
The --deployable-build is disabled by default, it has to be enabled to
create deployable build for now.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Print platform alias information to reduce the need for guessing when
trying to figure out what platform supports what platform.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The following aliases are missing:
tgl: adl-n, rpl
tgl-h: rpl-s
mtl: arl
Update the aliases list accordingly.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
This re-adds imx8ulp to --all platform list. This was removed
in commit 7737efadf4 ("xtensa-build-zephyr.py: remove imx8ulp from --all")
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Rename the variable name used by SOF script with the one expected by the
Zephyr build system for simplicity and consistency.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Rename:
- tgl-cavs.toml to tgl.toml
- tgl-h-cavs.toml to tgl-h.toml
Remove the IPC3/IPC4 switch added by commit 6f71808e3e
("xtensa-build-zephyr.py: add ipc4 build support for tgl")
This brings back consistency which is required for the .toml
split (#8490)
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This was broken from the start when converting the script from shell
script to Python.
A good reference was left in the non-Zephyr script which is still
active: `./scripts/xtensa-build-all.sh -h`
Fixes initial commit 1de3ef3675 ("Rewritten xtensa-build-zephyr.sh to
python")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
... source it instead.
We still have duplication with xtensa-build-zephyr.py for now but this
gets at least rid of bash duplication.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This adds support for:
./scripts/rebuild-testbench.sh -p lnl
Also clean-up, re-order and add comments to set_xtensa_params.sh
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
As of today's Zephyr commit 92fb8b223825, imx8ulp does not compile.
Do not remove any of its data from `xtensa-build-zephyr.py` but exclude
it from --all
Fixes:
```
scripts/xtensa-build-zephyr.py --all
-- Board: nxp_adsp_imx8ulp
No board named 'nxp_adsp_imx8ulp' found.
CMake Error at zephyr/cmake/modules/boards.cmake:167 (message):
Invalid BOARD; see above.
Call Stack (most recent call first):
cmake/modules/zephyr_default.cmake:129 (include)
share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:5 (find_package)
```
Fixes 61ccb4c8da ("scripts: zephyr: Add support to build sof for
imx8ulp")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Adding all source files in a single, giant zephyr/CMakeLists.txt is
inconvenient and does not scale.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Build for MTL needs other compiler xt-clang, so the COMPILER is
set by default to xt-xcc and changed for MTL in set_xtensa_params.sh
where also core and tools version is defined.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Fixes commit deed9a8808 ("scripts: fuzz: add support for build and
overlays")
The main issue was the way fuzz.sh was trying to parse the overlay
file. Drop that and just pass it as is to `west` and `cmake` instead,
they know what to do with it.
Also:
- Fix invalid syntax in stub_build_all_ipc4.conf
- Make fuzz.sh shellcheck-clean again. Always use shellcheck.
- Temporarily disable `CONFIG_COMP_SMART_AMP` in
stub_build_all_ipc3.conf because `smart_amp.c` does not compile (in
any configuration)
```
sof/src/audio/smart_amp/smart_amp.c:748:9: error:
no member named 'in_channels' in 'struct smart_amp_data'
sad->in_channels = audio_stream_get_channels(&source_buffer->stream);
```
Signed-off-by: Marc Herbert <marc.herbert@intel.com>