linux: add option to avoid kernel kconfig updates
RFC PATCH 1/1 linux: add option to avoid kernel kconfig updates
From: Gustavo Zacarias <[email protected]>
Some packages require specific kernel options enabled to be of any use, however when building a kernel with a specific configuration intended for binary-only modules this can be counterproductive.
Add an option to disable this behaviour and leave the .config alone.
--- linux/Config.in | 12 ++++++++++++ linux/linux.mk | 2 ++ 2 files changed, 14 insertions(+)
linux/Config.in +12 -0
@@ -365,6 +365,18 @@ config BR2_LINUX_KERNEL_INSTALL_TARGET /boot if DTBs have been generated by the kernel build process. +config BR2_LINUX_KERNEL_PACKAGES_ADJUST_CONFIG + bool "Adjust kernel configuration for package requirements" + default y + help + Select this option if you want to allow packages to enable + specific kernel options that are required for them to work + properly. + + Normally you'd want this unless you're using precompiled + binary-only modules that are tied to a specific kernel + configuration via modversions. + # Linux extensions source "linux/Config.ext.in"
linux/linux.mk +2 -0
@@ -176,6 +176,7 @@ LINUX_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_LINUX_KERNEL_CONFIG_FRAGMENT_ LINUX_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig LINUX_KCONFIG_OPTS = $(LINUX_MAKE_FLAGS) +ifeq ($(BR2_LINUX_KERNEL_PACKAGES_ADJUST_CONFIG),y) define LINUX_KCONFIG_FIXUP_CMDS $(if $(LINUX_NEEDS_MODULES), $(call KCONFIG_ENABLE_OPT,CONFIG_MODULES,$(@D)/.config))
@@ -225,6 +226,7 @@ define LINUX_KCONFIG_FIXUP_CMDS $(if $(BR2_LINUX_KERNEL_APPENDED_DTB), $(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config)) endef +endif ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y) ifeq ($(BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT),)
Signature · 1 line
2.4.10
RFC PATCH 1/1 linux: add option to avoid kernel kconfig updates
Quoted 5 lines · gustavo.zacarias at free-electrons.com
From: Gustavo Zacarias <[email protected]>
Some packages require specific kernel options enabled to be of any use, however when building a kernel with a specific configuration intended for binary-only modules this can be counterproductive.
Can you give a concrete example of this? The options that we set automatically
should only be options that are really required for building or running. So if you don't set it, it's not going to work anyway. If there is some option that is not really required, then we shouldn't be setting it.
Regards,
Arnout
Quoted 4 lines
Add an option to disable this behaviour and leave the .config alone.
Signed-off-by Gustavo Zacarias <[email protected]>
[snip]
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
RFC PATCH 1/1 linux: add option to avoid kernel kconfig updates
In reply to gustavo.zacarias at free-electrons.comGustavo, all,
On 2015-10-19 15:02 -0300, gustavo.zacarias at free-electrons.com spake thusly:
Quoted 7 lines
From: Gustavo Zacarias <[email protected]>
Some packages require specific kernel options enabled to be of any use, however when building a kernel with a specific configuration intended for binary-only modules this can be counterproductive.
Add an option to disable this behaviour and leave the .config alone.
Following the discussion we had on IRC, and taking into account the comments by Arnout, I've marked this as rejected.
(on IRC: it's because of proprietary modules that no longer want to load/work because of ABI-changing options they were not built with. Solution if to fix those suckers. ;-] )
Thanks!
Regards,
Yann E. MORIN.
Quoted 56 lines
Signed-off-by Gustavo Zacarias <[email protected]>--- linux/Config.in | 12 ++++++++++++ linux/linux.mk | 2 ++ 2 files changed, 14 insertions(+)linux/Config.in +12
-0@@ -365,6 +365,18 @@ config BR2_LINUX_KERNEL_INSTALL_TARGET /boot if DTBs have been generated by the kernel build process. +config BR2_LINUX_KERNEL_PACKAGES_ADJUST_CONFIG + bool "Adjust kernel configuration for package requirements" + default y + help + Select this option if you want to allow packages to enable + specific kernel options that are required for them to work + properly. + + Normally you'd want this unless you're using precompiled + binary-only modules that are tied to a specific kernel + configuration via modversions. + # Linux extensions source "linux/Config.ext.in"linux/linux.mk +2
-0@@ -176,6 +176,7 @@ LINUX_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_LINUX_KERNEL_CONFIG_FRAGMENT_ LINUX_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig LINUX_KCONFIG_OPTS = $(LINUX_MAKE_FLAGS) +ifeq ($(BR2_LINUX_KERNEL_PACKAGES_ADJUST_CONFIG),y) define LINUX_KCONFIG_FIXUP_CMDS $(if $(LINUX_NEEDS_MODULES), $(call KCONFIG_ENABLE_OPT,CONFIG_MODULES,$(@D)/.config))@@ -225,6 +226,7 @@ define LINUX_KCONFIG_FIXUP_CMDS $(if $(BR2_LINUX_KERNEL_APPENDED_DTB), $(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config)) endef +endif ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y) ifeq ($(BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT),)Signature · 6 lines
2.4.10 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'