如何从Kbuild Kconfig文件中的另一个选项中选择字符串选项的值?

问题描述 投票:2回答:1

对于布尔配置,我使用select。是否有类似的字符串?

最后,我希望有类似的东西:

config MY_VAR_STR
string

config MY_VAR_BOOL
bool
default n

config OPTION_2
bool
# Set MY_VAR_BOOL value to y
select MY_VAR_BOOL
# something like set MY_VAR "test string"
linux-kernel kbuild
1个回答
1
投票

根据内核docs v4.15,不可能将select用于非布尔值

https://github.com/torvalds/linux/blob/v4.15/Documentation/kbuild/kconfig-language.txt#L104说:

- reverse dependencies: "select" <symbol> ["if" <expr>] 
  [...]
  Reverse dependencies can only be used with boolean or tristate symbols.

这可能意味着根本不可能。

© www.soinside.com 2019 - 2024. All rights reserved.