-
Notifications
You must be signed in to change notification settings - Fork 1.5k
modify BUILD_LOADABLE to MODULES which backwards-compatible Kernel #13452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
maintains the same semantics as Kernel’s module build and compatible with Kconfiglib implementation. The problem of kconfiglib not being able to use tri-states is this: linux is here torvalds/linux@6dd85ff The module option is extracted from one of the triate three states into a MODULE keyword. Kconfiglib supports the default implementation of module to be MODULE for compatibility with the linux kernel, and triate degenerates into bool two states Refer to this code: https://github.com/ulfalizer/Kconfiglib/blob/061e71f7d78cb057762d88de088055361863deff/kconfiglib.py#L4274-L4284 Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
17c5d6f to
4838ec0
Compare
|
the reason why CI failed is because it has a dependency with the following PR.apache/nuttx-apps#2577 |
cederom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems breaking change, lets discuss in depth first.
|
As @patacongo replied on apache/nuttx-apps#2577, lets discuss here :-)
I can see several problems:
Regarding 2 and 3:
|
Most configuration names conform to the the naming convention. That naming was enforced until I gave the software to Apache. But I still expect most things will conform to the unenforced, undocumented standard. The original name CONFIG_BUILD_LOADABLE, for example, is compliant. The modified name is not. Look in the defconfig files. Most things are grouped together by the second word in the configuration name. That not only tells you want is being configured, but in most cases, the exact Kconfig file where the configuration is selected. |
|
First, it isn't a breaking change since CONFIG_BUILD_LOADABLE/CONFIG_MODULES hasn't prompt string and then user can't select it from defconfig. Second, CONFIG_MODULES is a built-in option since both kconfig-frontend and kconfiglib contain the code to handle this option specially as @xuxin930 mention here: Both tools aren't maintained by NuttX community, so we have to follow their usage, otherwise This patch makes |
@patacongo it since CONFIG_BUILD_LOADABLE/CONFIG_MODULES hasn't a prompt string and then user can't select it from defconfig, that's why this patch just change Kconfig/Makefile, but not defconfig. |
|
|
@patacongo do you have any suggestion? |
cederom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussion and more details I think this solution is very good, fixes loong lasting problem, adheres to Linux (where Kconfig comes from), and does not break the code, thank you @xuxin930 @xiaoxiang781216 !! :-)
I give go but the final decision is up to @patacongo :-)
Summary
maintains the same semantics as Kernel’s module build and compatible with Kconfiglib implementation.
The problem of kconfiglib not being able to use tri-states is this:
linux is here torvalds/linux@6dd85ff
The module option is extracted from one of the triate three states into a MODULE keyword.
Kconfiglib supports the default implementation of module to be MODULE for compatibility with the linux kernel, and triate degenerates into bool two states
Refer to this code: https://github.com/ulfalizer/Kconfiglib/blob/061e71f7d78cb057762d88de088055361863deff/kconfiglib.py#L4274-L4284
Impact
kconfiglib can support
Testing
relate apps patch: apache/nuttx-apps#2577