Skip to content

cmake, scripts: Auto-discover SOF checkout and ALSA tools via west - #3

Merged
lgirdwood merged 1 commit into
mainfrom
feat/west-sof-discovery
Nov 21, 2026
Merged

lgirdwood merged 1 commit into
mainfrom
feat/west-sof-discovery

Conversation

@lgirdwood

Copy link
Copy Markdown
Member

Phase 1 integration with the main sof west manifest:

  • Auto-detect SOF_ROOT_SOURCE_DIRECTORY in CMakeLists.txt via SOF_SRC_DIR, SOF_ROOT, west list -f "{abspath}" sof, or ../sof before falling back to the standalone include/kernel/abi.h.
  • Add west topdir lookup for tools/bin/alsatplg in cmake/alsatplg.cmake and for BASE_DIR in scripts/build-alsa-tools.sh.
  • Resolve sof via west list -f "{abspath}" sof in scripts/build-topology.sh sync_compat_links().

Enable `sof-topologies` to resolve the matching `sof` checkout and
workspace ALSA toolchain automatically when used inside a `west`
workspace (`west init -l sof`), while preserving standalone builds:

- `CMakeLists.txt`: Resolve `SOF_ROOT_SOURCE_DIRECTORY` via
  `SOF_SRC_DIR`, `SOF_ROOT`, `west list -f "{abspath}" sof`, or `../sof`
  so in-workspace builds compile against `sof/src/include/kernel/abi.h`
  and standalone builds fall back to local `include/kernel/abi.h`.
- `cmake/alsatplg.cmake` & `scripts/build-alsa-tools.sh`: Check
  `west topdir` for `<west_top>/tools/bin/alsatplg` and `BASE_DIR`.
- `scripts/build-topology.sh`: Resolve `sof` via `west list` in
  `sync_compat_links()`.
- `west.yml`: Document standalone `west init -l sof-topologies` update
  conventions and the `alsa-lib`/`alsa-utils` import from `sof/west.yml`.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
@lgirdwood
lgirdwood force-pushed the feat/west-sof-discovery branch from 96c4007 to 00f39ed Compare November 21, 2026 19:09
@lgirdwood
lgirdwood marked this pull request as ready for review November 21, 2026 20:05
@lgirdwood
lgirdwood merged commit 7f52f20 into main Nov 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants