Skip to content

Conversation

@kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented May 17, 2021

Some of the top-level Kconfig options are not used at all when SOF is built with another RTOS like the SOF Zephyr module build.

To make this more explicit at Kconfig level, move these options out from the top-level Kconfig file and exclude when needed.

kv2019i added 3 commits May 17, 2021 18:27
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Some of the DEBUG options are only used in the XTOS implementation
and do not impact e.g. Zephyr builds. Make the split explicit by
moving these options to a separate file.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The BUILD_VM_ROM option only affects SOF XTOS builds, so move
the option to a separate file.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>

endchoice
if !ZEPHYR_SOF_MODULE
rsource "Kconfig.xtos-build"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I fetched and tested this and it works but I don't understand how, can you add a comment explaining why git grep ZEPHYR_SOF_MODULES => nothing?

BTW https://docs.zephyrproject.org/latest/guides/kconfig/tips.html#lack-of-conditional-includes

Copy link
Collaborator

Choose a reason for hiding this comment

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

I found a few, auto-generated ZEPHYR_SOF_ variables but not this one at https://docs.zephyrproject.org/latest/guides/modules.html

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@marc-hb Working on a reply. I just observed this is defined in my build .config and used it (and it works). But let me dig into where it's actually defined.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@marc-hb Zephyr's build system adds this for each module. Code in here: zephyr/scripts/kconfig/kconfiglib.py
During build, e.g. ./zephyrproject/build-icl/Kconfig/Kconfig.modules is created, containing definition for CONFIG_ZEPHYR_SOF_MODULE.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks, @kv2019i can you please add a reference to zephyr/modules/Kconfig in a comment? I think this is not a documented feature so it deserves at least that pointer.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks, @kv2019i can you please add a reference to zephyr/modules/Kconfig in a comment?

Submitted in #4327


endchoice

config BUILD_VM_ROM
Copy link
Member

Choose a reason for hiding this comment

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

I think this is needed for Zephyr as it's a ROM stub that jumps to SOF bootloader code in qemu. Unless Zephyr has this jump built in when building a qemu target ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@lgirdwood I was wondering the same, but this is not used in any of the Zephyr builds and the implementation is in xtensa specific XTOS code, so I moved this out. But let me check. @andyross and @lyakh -- is this used in in Zephyr (to boot in Qemu) via some other way I don't see.

Copy link
Collaborator

Choose a reason for hiding this comment

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

IIRC to run Zephyr-generated SOF in Qemu I was using VMROM, built separately by a native SOF build. But this was a few months ago so I might be wrong

@lgirdwood
Copy link
Member

yamllint has hung again with no status. I've noticed this on other PRs too. @marc-hb fyi.

@lgirdwood lgirdwood merged commit 9235eb8 into thesofproject:main May 25, 2021
@marc-hb
Copy link
Collaborator

marc-hb commented May 26, 2021

yamllint has hung again with no status. I've noticed this on other PRs too.

https://github.com/thesofproject/sof/runs/2602580680 is all green. Please copy the URL when reporting CI issues.

marc-hb added a commit to marc-hb/sof that referenced this pull request Jun 10, 2021
Because it's not a documented feature.

"Fixes" commit 9235eb8 ("kconfig: move BUILD_VM_ROM
Kconfig.xtos-build") / PR thesofproject#4201

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
lgirdwood pushed a commit that referenced this pull request Jun 10, 2021
Because it's not a documented feature.

"Fixes" commit 9235eb8 ("kconfig: move BUILD_VM_ROM
Kconfig.xtos-build") / PR #4201

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