linux: Deselect all unconfigured compression options
PATCH 1/1 linux: Deselect all unconfigured compression options
The LINUX_KCONFIG_FIXUP_CMDS are meant to deselect any compression option that are not selected in the buildroot configuration. But it only deselects the last one in the list instead of all of them because it overwrites the LINUX_COMPRESSION_OPT_ variable instead of appending to it. Only the last option set to that variable gets deselected.
This produces the warning:
.config:2216:warning: override: KERNEL_GZIP changes choice state
is emitted when buildroot runs olddefconfig when buildroot configures a kernel with a custom config that has a different kernel compression option set to what is configured in buildroot.
Accumulate all the deselected compression options instead of overwriting them to ensure all non-selected options get deselected..
--- linux/linux.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
linux/linux.mk +6 -6
@@ -74,11 +74,11 @@ LINUX_DEPENDENCIES += host-lzop else ifeq ($(BR2_LINUX_KERNEL_XZ),y) LINUX_DEPENDENCIES += host-xz endif -LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_GZIP) = CONFIG_KERNEL_GZIP -LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZ4) = CONFIG_KERNEL_LZ4 -LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZMA) = CONFIG_KERNEL_LZMA -LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZO) = CONFIG_KERNEL_LZO -LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_XZ) = CONFIG_KERNEL_XZ +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_GZIP) += CONFIG_KERNEL_GZIP +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZ4) += CONFIG_KERNEL_LZ4 +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZMA) += CONFIG_KERNEL_LZMA +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZO) += CONFIG_KERNEL_LZO +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_XZ) += CONFIG_KERNEL_XZ # If host-uboot-tools is selected by the user, assume it is needed to # create a custom image
@@ -252,7 +252,7 @@ endif define LINUX_KCONFIG_FIXUP_CMDS $(if $(LINUX_NEEDS_MODULES), $(call KCONFIG_ENABLE_OPT,CONFIG_MODULES,$(@D)/.config)) - $(call KCONFIG_ENABLE_OPT,$(LINUX_COMPRESSION_OPT_y),$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,$(strip $(LINUX_COMPRESSION_OPT_y)),$(@D)/.config) $(foreach opt, $(LINUX_COMPRESSION_OPT_), $(call KCONFIG_DISABLE_OPT,$(opt),$(@D)/.config) )
Signature · 1 line
2.11.0
PATCH 1/1 linux: Deselect all unconfigured compression options
Cam, All,
On 2017-10-19 21:59 +1100, Cam Hutchison spake thusly:
Quoted 10 lines
The
LINUX_KCONFIG_FIXUP_CMDSare meant to deselect any compression option that are not selected in the buildroot configuration. But it only deselects the last one in the list instead of all of them because it overwrites theLINUX_COMPRESSION_OPT_variable instead of appending to it. Only the last option set to that variable gets deselected.This produces the warning:
.config:2216:warning: override:
KERNEL_GZIPchanges choice state
Quoted 8 lines
is emitted when buildroot runs olddefconfig when buildroot configures a kernel with a custom config that has a different kernel compression option set to what is configured in buildroot.
Accumulate all the deselected compression options instead of overwriting them to ensure all non-selected options get deselected..
Signed-off-by Cam Hutchison <[email protected]>
Small comment below...
Quoted 26 lines
--- linux/linux.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)linux/linux.mk +5
-5@@ -74,11 +74,11 @@ LINUX_DEPENDENCIES += host-lzop else ifeq ($(BR2_LINUX_KERNEL_XZ),y) LINUX_DEPENDENCIES += host-xz endif -LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_GZIP) = CONFIG_KERNEL_GZIP -LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZ4) = CONFIG_KERNEL_LZ4 -LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZMA) = CONFIG_KERNEL_LZMA -LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZO) = CONFIG_KERNEL_LZO -LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_XZ) = CONFIG_KERNEL_XZ +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_GZIP) += CONFIG_KERNEL_GZIP +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZ4) += CONFIG_KERNEL_LZ4 +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZMA) += CONFIG_KERNEL_LZMA +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZO) += CONFIG_KERNEL_LZO +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_XZ) += CONFIG_KERNEL_XZ # If host-uboot-tools is selected by the user, assume it is needed to # create a custom image
linux/linux.mk endif · line 255
Quoted 5 lines
linux/linux.mk +1
-1@@ -252,7 +252,7 @@ endif define LINUX_KCONFIG_FIXUP_CMDS $(if $(LINUX_NEEDS_MODULES), $(call KCONFIG_ENABLE_OPT,CONFIG_MODULES,$(@D)/.config)) - $(call KCONFIG_ENABLE_OPT,$(LINUX_COMPRESSION_OPT_y),$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,$(strip $(LINUX_COMPRESSION_OPT_y)),$(@D)/.config)
I think the strip is not needed, because leading spaces in arguments to a call are anyway stripped.
But it is most systematice to do, so it's fine with me.
Regards,
Yann E. MORIN.
Quoted 10 lines
linux/linux.mk +0
-0$(foreach opt, $(LINUX_COMPRESSION_OPT_), $(call KCONFIG_DISABLE_OPT,$(opt),$(@D)/.config) )Signature · 6 lines
2.11.0 _______________________________________________ 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 linux: Deselect all unconfigured compression options
Quoted 49 lines · Yann E. MORIN
Cam, All,
On 2017-10-19 21:59 +1100, Cam Hutchison spake thusly:
Quoted 10 lines
The
LINUX_KCONFIG_FIXUP_CMDSare meant to deselect any compression option that are not selected in the buildroot configuration. But it only deselects the last one in the list instead of all of them because it overwrites theLINUX_COMPRESSION_OPT_variable instead of appending to it. Only the last option set to that variable gets deselected.This produces the warning:
.config:2216:warning: override:
KERNEL_GZIPchanges choice stateQuoted 8 lines
is emitted when buildroot runs olddefconfig when buildroot configures a kernel with a custom config that has a different kernel compression option set to what is configured in buildroot.
Accumulate all the deselected compression options instead of overwriting them to ensure all non-selected options get deselected..
Signed-off-by Cam Hutchison <[email protected]>Reviewed-by "Yann E. MORIN" <[email protected]>Small comment below...
Quoted 23 lines
--- linux/linux.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)linux/linux.mk +5
-5@@ -74,11 +74,11 @@ LINUX_DEPENDENCIES += host-lzop else ifeq ($(BR2_LINUX_KERNEL_XZ),y) LINUX_DEPENDENCIES += host-xz endif -LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_GZIP) = CONFIG_KERNEL_GZIP -LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZ4) = CONFIG_KERNEL_LZ4 -LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZMA) = CONFIG_KERNEL_LZMA -LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZO) = CONFIG_KERNEL_LZO -LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_XZ) = CONFIG_KERNEL_XZ +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_GZIP) += CONFIG_KERNEL_GZIP +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZ4) += CONFIG_KERNEL_LZ4 +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZMA) += CONFIG_KERNEL_LZMA +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZO) += CONFIG_KERNEL_LZO +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_XZ) += CONFIG_KERNEL_XZ
Quoted 11 lines
linux/linux.mk endif · line 255
Quoted 8 lines
linux/linux.mk +1
-1# If host-uboot-tools is selected by the user, assume it is needed to # create a custom image@@ -252,7 +252,7 @@ endif define LINUX_KCONFIG_FIXUP_CMDS $(if $(LINUX_NEEDS_MODULES), $(call KCONFIG_ENABLE_OPT,CONFIG_MODULES,$(@D)/.config)) - $(call KCONFIG_ENABLE_OPT,$(LINUX_COMPRESSION_OPT_y),$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,$(strip $(LINUX_COMPRESSION_OPT_y)),$(@D)/.config)I think the strip is not needed, because leading spaces in arguments to a call are anyway stripped.
Actually, that's not true. I did need the strip, otherwise the var had a space in the output.
The GNU make docs have this to say about $(call):
A final caution: be careful when adding whitespace to the arguments to call. As with other functions, any whitespace contained in the second and subsequent arguments is kept; this can cause strange effects. It?s generally safest to remove all extraneous whitespace when providing parameters to call.
Quoted 11 lines
But it is most systematice to do, so it's fine with me.
Regards,
Yann E. MORIN.Quoted 6 lines
linux/linux.mk +0
-0$(foreach opt, $(LINUX_COMPRESSION_OPT_), $(call KCONFIG_DISABLE_OPT,$(opt),$(@D)/.config) )Signature · 1 line
2.11.0
PATCH 1/1 linux: Deselect all unconfigured compression options
Cam, All,
On 2017-10-22 06:38 +1100, Cam Hutchison spake thusly:
Quoted 2 lines
Quoted 1 line · Yann E. MORIN
On 2017-10-19 21:59 +1100, Cam Hutchison spake thusly:
[--SNIP--]
Quoted 11 lines
Quoted 8 lines
linux/linux.mk endif · line 255
Quoted 6 lines
linux/linux.mk +1
-1@@ -252,7 +252,7 @@ endif define LINUX_KCONFIG_FIXUP_CMDS $(if $(LINUX_NEEDS_MODULES), $(call KCONFIG_ENABLE_OPT,CONFIG_MODULES,$(@D)/.config)) - $(call KCONFIG_ENABLE_OPT,$(LINUX_COMPRESSION_OPT_y),$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,$(strip $(LINUX_COMPRESSION_OPT_y)),$(@D)/.config)I think the strip is not needed, because leading spaces in arguments to a call are anyway stripped.
Actually, that's not true. I did need the strip, otherwise the var had a space in the output.
Quoted 7 lines
The GNU make docs have this to say about $(call):
A final caution: be careful when adding whitespace to the arguments to call. As with other functions, any whitespace contained in the second and subsequent arguments is kept; this can cause strange effects. It?s generally safest to remove all extraneous whitespace when providing parameters to call.
Right, I forgot about that one. Thanks!
Regards,
Yann E. MORIN.
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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 linux: Deselect all unconfigured compression options
In reply to Cam HutchisonQuoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Cam" == Cam Hutchison <[email protected]> writes:
The
LINUX_KCONFIG_FIXUP_CMDSare meant to deselect any compression option that are not selected in the buildroot configuration. But it only deselects the last one in the list instead of all of them because it overwrites theLINUX_COMPRESSION_OPT_variable instead of appending to it. Only the last option set to that variable gets deselected.This produces the warning:
.config:2216:warning: override:
KERNEL_GZIPchanges choice state
Quoted 8 lines
is emitted when buildroot runs olddefconfig when buildroot configures a kernel with a custom config that has a different kernel compression option set to what is configured in buildroot.
Accumulate all the deselected compression options instead of overwriting them to ensure all non-selected options get deselected..
Signed-off-by Cam Hutchison <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard