Skip to content

xtensa-build-all.sh: distinguish default/working platform and WIP. Fix toolchain coverage - #5202

Merged
lgirdwood merged 4 commits into
thesofproject:mainfrom
marc-hb:xtensa-all-default
Jan 21, 2022
Merged

lgirdwood merged 4 commits into
thesofproject:mainfrom
marc-hb:xtensa-all-default

Conversation

@marc-hb

@marc-hb marc-hb commented Jan 12, 2022 •

Copy link
Copy Markdown
Collaborator

4 commits. Main one below. Also: fix toolchain coverage in CI

The -a option has been broken by the addition of platform(s) that don't
have a toolchain available in the Docker image. Every platform can be
built by someone but no one can built -a(ll) platforms right now.

Fix the -a option by changing its definition: make it build what
everyone can build using the public Docker image.

@dbaluta

dbaluta commented Jan 12, 2022

Copy link
Copy Markdown
Collaborator

@TangleZ I was under the impression that GCC toolchain for imx8ulp is publicly available? Isn't that true anymore?

@marc-hb what do you mean by toolchain to be publicly available?

one can build imx8ulp toolchain from here: https://github.com/thesofproject/crosstool-ng

@lgirdwood

Copy link
Copy Markdown
Member

Lets update our container to GCC11 https://github.com/thesofproject/crosstool-ng/releases/tag/gcc11.2 which has all targets.

@marc-hb

marc-hb commented Jan 12, 2022 •

Copy link
Copy Markdown
Collaborator Author

@marc-hb what do you mean by toolchain to be publicly available?

I meant in the Docker image, see next sentence. Sorry for the confusion. Commit message fixed.

Now looking at https://github.com/thesofproject/sof/commits/main/scripts/docker_build/sof_builder I see that imx8ulp and run were actually added

However they are missing from this current image:

REPOSITORY              TAG       DIGEST                                                     IMAGE ID       CREATED         SIZE
thesofproject/sof       latest    sha256:5cffb0b235e0de1998b608d878f42c5e47d07150d84518d784  7941412b7be9   7 days ago      2.19GB

docker run thesofproject/sof@sha256:3bf321bd4fd7605599be9af6d8459e74a67453a156a72c8a4b76394aba4d5c1b from 4 months ago builds imx8ulp but not rn.

I think we just made a Docker mess, @greg-intel and/or @juimonen can you please help fix it?
Note this incomplete docker image would have been caught if imx8ulp had been part of .github! Just added to this PR - which now fails imx8ulp until the Docker image is fixed.

Lets update our container to GCC11 https://github.com/thesofproject/crosstool-ng/releases/tag/gcc11.2 which has all targets.

Sure but let's please first fix the simple imx8ulp drop/regression in the Docker image.

Note old [BUG] IMX8 QEMU boot failed after SOF docker image upgrade #4186

@lgirdwood

Copy link
Copy Markdown
Member

I have GCC11 locally installed and test with build all -a so need to keep all targets.

@marc-hb

marc-hb commented Jan 12, 2022 •

Copy link
Copy Markdown
Collaborator Author

I have GCC11 locally installed and test with build all -a so need to keep all targets.

Platforms will come and go as they have so the split is useful even if the two lists happen to be identical some of the time.

The split is also a great reminder that the work is not done after merely adding one platform to the script.

@marc-hb
marc-hb force-pushed the xtensa-all-default branch from 67d3e8a to 7a49c3e Compare January 12, 2022 22:36
@marc-hb marc-hb changed the title xtensa-build-all.sh: remove imx8ulp, rn and mt8195 from the -a option xtensa-build-all.sh: remove rn and mt8195 from the -a option Jan 12, 2022
@marc-hb marc-hb changed the title xtensa-build-all.sh: remove rn and mt8195 from the -a option xtensa-build-all.sh: remove mt8195 from the -a option Jan 12, 2022
@marc-hb

marc-hb commented Jan 12, 2022 •

Copy link
Copy Markdown
Collaborator Author

I think we just made a Docker mess, @greg-intel and/or @juimonen can you please help fix it?

Docker image has been updated to sha256:3d2f4f6c7eba57eb9e4e871365f801f3f0462e45b502665daf670890926c9e49 ded60930e71d (thx) and all platforms except mt8195 (which has never been in https://github.com/thesofproject/sof/commits/main/scripts/docker_build/sof_builder) are now building in Github Actions. So only mt8195 is being removed from -a. It can be re-added super quickly if/when needed.

All Github Actions are green; they build more configurations than ever and the cleanups make any future addition trivial. Please fast track this small PR to quickly fix these recent regressions and catch any future one.

APL_UP2_NOCODEC was unavailable and https://sof-ci.01.org/sofpr/PR5202/build11601/devicetest/?model=BYT_MB_NOCODEC&testcase=check-capture-3times is maybe related to #5086? Neither is related to this PR.

@greg-intel greg-intel left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand the whitespace choices in pull-request.yml on lines 89 vs. 124, but that's irrelevant to the PR as a whole.

@marc-hb

marc-hb commented Jan 13, 2022 •

Copy link
Copy Markdown
Collaborator Author

Not sure I understand the whitespace choices in pull-request.yml on lines 89 vs. 124

Each company on a different line.

Thanks for the review!

@marc-hb marc-hb changed the title xtensa-build-all.sh: remove mt8195 from the -a option .github: add imx8ulp and rn compilation. xtensa-build-all.sh: remove mt8195 from the -a option Jan 14, 2022
@lgirdwood

Copy link
Copy Markdown
Member

I have GCC11 locally installed and test with build all -a so need to keep all targets.

Platforms will come and go as they have so the split is useful even if the two lists happen to be identical some of the time.

The split is also a great reminder that the work is not done after merely adding one platform to the script.

Can we update the container to GCC11. This will also allow us to enable static analysis as part of the CI build.

@marc-hb

marc-hb commented Jan 14, 2022 •

Copy link
Copy Markdown
Collaborator Author

Can we update the container to GCC11. This will also allow us to enable static analysis as part of the CI build.

That will be great but it's at least one order of magnitude more work than this (which is already done and tested), assuming no issue. Upgrading a compiler always carries some level of risk.

Meanwhile -a is broken (which caused the earlier docker mess) and we have zero compile coverage for AMD and for the new imx8ulp.

Once we have a newer and better container with GCC11 and mt8195, adding mt8195 to -a is a one line change.

@cujomalainey

Copy link
Copy Markdown
Contributor

I agree with @marc-hb revert first to fix, then update after

@lgirdwood

Copy link
Copy Markdown
Member

Sorry all, I need mt1895 for Zephyr native API work to build on all platforms. We also need GCC11 static analysis as part of CI build. @marc-hb pls drop the last patch

More future-proof. No functional change

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes commit b40a2f7 ("docker: Add support for i.MX8ULP platform")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
No one else has it.

Gets rid of the only shellcheck warning.

Fixes commit 7453e3d ("scripts: add renoir support")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb
marc-hb force-pushed the xtensa-all-default branch from 7a49c3e to 4fa69f1 Compare January 21, 2022 02:18
@marc-hb marc-hb changed the title .github: add imx8ulp and rn compilation. xtensa-build-all.sh: remove mt8195 from the -a option xtensa-build-all.sh: distinguish default/working platform and WIP Jan 21, 2022
@marc-hb marc-hb changed the title xtensa-build-all.sh: distinguish default/working platform and WIP xtensa-build-all.sh: distinguish default/working platform and WIP. Fix toolchain coverage Jan 21, 2022
@marc-hb

marc-hb commented Jan 21, 2022

Copy link
Copy Markdown
Collaborator Author

@marc-hb pls drop the last patch

Done!

Sorry all, I need mt1895 for Zephyr native API work to build on all platforms.

This script does not build Zephyr...

@marc-hb
marc-hb requested a review from TangleZ January 21, 2022 02:31
@marc-hb

marc-hb commented Jan 21, 2022 •

Copy link
Copy Markdown
Collaborator Author

In https://sof-ci.01.org/sof-pr-viewer/#/build/PR5202/build8372328 3 platforms fail with strange errors quoted below. Other platforms pass 100%. That CI does not use the script modified by this PR.

Looks like someone merged some untested (test?) code, @kkarask can you help?

03:41:30.764 => Environment initialization
03:41:30.811 ITERATION TestBasicPowerFlow.test === 1642732890.811658
03:41:30.811 => TestBasicPowerFlow.test
03:41:30.936   => Enter D0 - test setup
03:41:30.936     => Configure SOF
03:41:30.936       => Loading base firmware
03:41:31.280   => Enter D3 - test cleanup
03:41:31.483   => Exception in test.
03:41:31.514     Exception AttributeError occurred at 'C:\\work\\tools\\pyexecnetcache\\cavs_scripts-py\\utilities\\dma_trace_buffer.py':286
                 'NoneType' object has no attribute 'is_set'
03:40:43.283 => Configure SOF
03:40:43.283   => Environment initialization
03:40:43.298   => Loading base firmware
03:40:43.783 => Exception in test.
03:40:43.798   Exception FileNotFoundError occurred at 'C:\\work\\tools\\pyexecnetcache\\cavs_scripts-py\\utilities\\fw_loader_pci.py':550
               [Errno 2] No such file or directory: 'C:\\Testing\\Builds\\pull-5202-merge_414440\\CNL\\sof-cnl.ri'

EDIT: after git commit --amend -C HEAD + force push https://sof-ci.01.org/sof-pr-viewer/#/build/PR5202/build8373289 is now all green. Go figure.

@marc-hb

marc-hb commented Jan 21, 2022 •

Copy link
Copy Markdown
Collaborator Author

https://sof-ci.01.org/sofpr/PR5202/build11721/devicetest/?model=CML_HEL_RT5682&testcase=check-suspend-resume-with-playback-5 looks like thesofproject/linux/issues/3370 and we also have the usual alsabat error on BYT. Everything else OK.

https://sof-ci.01.org/sofpr/PR5202/build11725/devicetest/ has some rtcwake issues + a stuck sof-logger = nothing related to this.

The -a option was recently broken by the addition of platform(s) that
don't have a toolchain available in the Docker image. Every platform can
be built by someone but no one can built -a(ll) platforms right now.

Add a new platform array to make the distinction between default
platforms built by the -a option versus work in progress.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb
marc-hb force-pushed the xtensa-all-default branch from 4fa69f1 to ecbd6ab Compare January 21, 2022 05:20
@lgirdwood
lgirdwood merged commit 0031664 into thesofproject:main Jan 21, 2022
@lgirdwood

Copy link
Copy Markdown
Member

@marc-hb thanks, btw we should update the container at earliest convenience. There is a new MTK platform and toolchain to add too.

@marc-hb
marc-hb deleted the xtensa-all-default branch January 21, 2022 17:49
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.

5 participants