Skip to content

Fix building stable-v2.0 topologies with latest ALSA#5641

Merged
lgirdwood merged 4 commits into
thesofproject:stable-v2.0from
marc-hb:topo-stable2.0
Apr 5, 2022
Merged

Fix building stable-v2.0 topologies with latest ALSA#5641
lgirdwood merged 4 commits into
thesofproject:stable-v2.0from
marc-hb:topo-stable2.0

Conversation

@marc-hb
Copy link
Copy Markdown
Collaborator

@marc-hb marc-hb commented Apr 2, 2022

Same as #5632 but for stable-v2.0

Cherry-picks with almost no conflict, just a minor conflict for 3e1c160 caused by the lack of f41010d

brentlu and others added 4 commits April 2, 2022 01:28
The demux routing matrix and config are removed for two reasons: 1.
the config 'demux_priv_1' is hardcoded for pipeline 1 only. 2. other
m4 file with demux compoenet like pipe-volume-demux-playback has the
matrix and config defined in the topology file.

The topology which implement this pipeline should define the routing
matrx and config named as 'demux_priv_<pipeline id>' before including
this m4 file.

Signed-off-by: Brent Lu <brent.lu@intel.com>
(cherry picked from commit 771c2bb)
The string parser in alsa-lib is sensitive to these now. So fix it.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
(cherry picked from commit db04155)
The recent changes to the string parser in alsa-lib cause the topology
builds to break for some topologies. Avoid adding a newline for the bytes
data for the MUXDEMUX config by introducing a new macro for creating lists
without new lines between items.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
(cherry picked from commit 3e1c160)
Remove the extra space to make the topology build with upstream
alsa-lib.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
(cherry picked from commit fcfd5d6)
@marc-hb marc-hb marked this pull request as ready for review April 2, 2022 02:45
@lgirdwood
Copy link
Copy Markdown
Member

@marc-hb @kv2019i @greg-intel looks like we need to update the container with latest Zephyr toolchain ?

CMake Error at /workdir/zephyrproject/zephyr/cmake/compiler/gcc/target.cmake:10 (message):
-- Configuring incomplete, errors occurred!
  C compiler
  /opt/toolchains/zephyr-sdk-0.14.0/xtensa/intel_apl_adsp/xtensa-intel_apl_adsp_zephyr-elf/bin/xtensa-intel_apl_adsp_zephyr-elf-gcc
  not found - Please check your toolchain installation
Call Stack (most recent call first):
  /workdir/zephyrproject/zephyr/cmake/target_toolchain.cmake:57 (include)
  /workdir/zephyrproject/zephyr/cmake/app/boilerplate.cmake:599 (include)
  /workdir/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
  /workdir/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
  CMakeLists.txt:5 (find_package)

@marc-hb
Copy link
Copy Markdown
Collaborator Author

marc-hb commented Apr 4, 2022

@marc-hb @kv2019i @greg-intel looks like we need to update the container with latest Zephyr toolchain ?

We don't use our own container for building Zephyr with the Zephyr SDK in .github Actions, we simply use the Zephyr container.

https://github.com/thesofproject/sof/runs/5796986968 failed because the Zephyr container is too new for this stable branch. As you can see from any recent and successfully built PR (e.g. https://github.com/thesofproject/sof/runs/5814116267), the current toolchain location is:
/opt/toolchains/zephyr-sdk-0.14.0/xtensa-intel_apl_adsp_zephyr-elf/bin/xtensa-intel_apl_adsp_zephyr-elf-gcc

However Zephyr commit fd089b361d8ae (October 2021) used in 5796986968 here seems to expect:
/opt/toolchains/zephyr-sdk-0.14.0/xtensa/intel_apl_adsp/xtensa-intel_apl_adsp_zephyr-elf/bin/xtensa-intel_apl_adsp_zephyr-elf-gcc

The simplest fix should be to fetch an older, more appropriate Zephyr container in .github/workflows/zephyr.yml Do we care?

@lgirdwood lgirdwood merged commit 5f18af1 into thesofproject:stable-v2.0 Apr 5, 2022
@marc-hb marc-hb deleted the topo-stable2.0 branch April 6, 2022 22:08
marc-hb added a commit to marc-hb/sof that referenced this pull request Apr 6, 2022
The container v0.22.0 changed the toolchain locations, for instance
for APL it changed from

 /opt/toolchains/zephyr-sdk-0.NN.0/xtensa/intel_apl_adsp/...

to

 /opt/toolchains/zephyr-sdk-0.MM.0/xtensa-intel_apl_adsp_zephyr-elf/

The new location is not found by the old Zephyr version fd089b361d8aebbc
that is currently hardcoded for this branch by previous SOF commit
b678a4d. This causes the failure shown below, see real build
failure example in thesofproject#5641.

The docker image v0.21.0 is the last one that has the old location.
https://hub.docker.com/r/zephyrprojectrtos/zephyr-build/tags

I suspect the name change happened in this commit:
zephyrproject-rtos/sdk-ng@c701e23bcce86f27f3a7

-- Using toolchain: zephyr 0.14.0 (/opt/toolchains/zephyr-sdk-0.14.0)
-- Found dtc:
/opt/toolchains/zephyr-sdk-0.14.0/sysroots/x86_64-pokysdk-linux/usr/bin/dtc
(found suitable version "1.6.0", minimum required is "1.4.6")
  ...
  ...
CMake Error at
/workdir/zephyrproject/zephyr/cmake/compiler/gcc/target.cmake:10
-- Configuring incomplete, errors occurred!
  C compiler
/opt/toolchains/zephyr-sdk-0.14.0/xtensa/intel_apl_adsp/ \
 xtensa-intel_apl_adsp_zephyr-elf/bin/xtensa-intel_apl_adsp_zephyr-elf-gcc
      not found - Please check your toolchain installation
      Call Stack (most recent call first):
/workdir/zephyrproject/zephyr/cmake/target_toolchain.cmake:57
/workdir/zephyrproject/zephyr/cmake/app/boilerplate.cmake:599
/.../zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24
/.../zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb
Copy link
Copy Markdown
Collaborator Author

marc-hb commented Apr 6, 2022

The simplest fix should be to fetch an older, more appropriate Zephyr container in .github/workflows/zephyr.yml Do we care?

Apparently I care. Zephyr build for this branch fixed in #5654

lgirdwood pushed a commit that referenced this pull request Apr 8, 2022
The container v0.22.0 changed the toolchain locations, for instance
for APL it changed from

 /opt/toolchains/zephyr-sdk-0.NN.0/xtensa/intel_apl_adsp/...

to

 /opt/toolchains/zephyr-sdk-0.MM.0/xtensa-intel_apl_adsp_zephyr-elf/

The new location is not found by the old Zephyr version fd089b361d8aebbc
that is currently hardcoded for this branch by previous SOF commit
b678a4d. This causes the failure shown below, see real build
failure example in #5641.

The docker image v0.21.0 is the last one that has the old location.
https://hub.docker.com/r/zephyrprojectrtos/zephyr-build/tags

I suspect the name change happened in this commit:
zephyrproject-rtos/sdk-ng@c701e23bcce86f27f3a7

-- Using toolchain: zephyr 0.14.0 (/opt/toolchains/zephyr-sdk-0.14.0)
-- Found dtc:
/opt/toolchains/zephyr-sdk-0.14.0/sysroots/x86_64-pokysdk-linux/usr/bin/dtc
(found suitable version "1.6.0", minimum required is "1.4.6")
  ...
  ...
CMake Error at
/workdir/zephyrproject/zephyr/cmake/compiler/gcc/target.cmake:10
-- Configuring incomplete, errors occurred!
  C compiler
/opt/toolchains/zephyr-sdk-0.14.0/xtensa/intel_apl_adsp/ \
 xtensa-intel_apl_adsp_zephyr-elf/bin/xtensa-intel_apl_adsp_zephyr-elf-gcc
      not found - Please check your toolchain installation
      Call Stack (most recent call first):
/workdir/zephyrproject/zephyr/cmake/target_toolchain.cmake:57
/workdir/zephyrproject/zephyr/cmake/app/boilerplate.cmake:599
/.../zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24
/.../zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
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.

4 participants