Kconfig:当特定的 CONFIG_* 开关导致问题时,如何阻止它?

发布于 2025-01-13 16:45:52 字数 488 浏览 4 评论 0原文

Kconfig 中的 depends on 是否有相反的意思?当设置特定的 CONFIG_* 开关时,至少会打印一条警告,在 make 之后写入完整配置 (.config) 后,该开关不兼容*_defconfig

我当前的问题:
我正在为 ARMv7-M Systick 计时器开发新驱动程序。存在旧版本,但该版本缺少某些功能,并且未移植到新的 U-Boot 设备模型 (DM)。当新供应商同时使用这两种驱动程序时,就会导致链接器错误。

因此,当选择旧驱动程序时,我希望使用 Kconfig 阻止使用我的驱动程序。

或者有其他建议如何解决这个问题?

(这是使用 Kbuild/Kconfig 作为构建系统的项目的通用问题。)

Is there an opposite for depends on in Kconfig? Which at least prints a warning when a specific CONFIG_* switch is set, which isn't compatible after the full configuration is written (.config) after a make *_defconfig?

My current problem:
I'm working on a new driver for the ARMv7-M Systick timer. There exists an old version, but this version lacks in some functionality and isn't ported to the new U-Boot device model (DM). When a new vendor use both driver, then this leads in an linker error.

So I want prevent with Kconfig to use my driver, when the old driver is selected.

Or any other suggestion how to solve this?

(This is a generic question for projects which use Kbuild/Kconfig as build system.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

给不了的爱 2025-01-20 16:45:52

文档指出您可以使用取决于< /code>,所以你可以这样做:

depends on !OTHER_DRIVER

The documentation states you can use depends on <expr>, so you can do:

depends on !OTHER_DRIVER
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文