package/pkg-kconfig.mk new <pkg>-show-fragment target
PATCH v2 1/2 package/pkg-kconfig.mk new <pkg>-show-fragment target
This patch introduce the new target to simplify the generation of configuration fragments as the output could be directly copied into a fragment file as-is.
It is *heavily* based on the <pkg>-diff-config target, but serves a different purpose.
Output from linux-diff-config:
-CONFIG_GCC_PLUGIN_ARM_SSP_PER_TASK y
-CONFIG_GCC_PLUGIN_CYC_COMPLEXITY n
-CONFIG_GCC_PLUGIN_LATENT_ENTROPY n
-CONFIG_GCC_PLUGIN_RANDSTRUCT n
-CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF n
-CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL n
-CONFIG_GCC_PLUGIN_STRUCTLEAK_USER n
-CONFIG_STACKPROTECTOR_PER_TASK yCONFIG_CRYPTO_DH n -> yCONFIG_CRYPTO_KPP m -> yCONFIG_GCC_PLUGINS y -> nCONFIG_KEY_DH_OPERATIONS n -> yCONFIG_PKCS8_PRIVATE_KEY_PARSER n -> yCONFIG_VIDEO_IMX274 n -> m
Output from linux-show-fragment:CONFIG_CRYPTO_DH=yCONFIG_CRYPTO_KPP=yCONFIG_KEY_DH_OPERATIONS=yCONFIG_PKCS8_PRIVATE_KEY_PARSER=yCONFIG_VIDEO_IMX274=m
--- package/pkg-kconfig.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
package/pkg-kconfig.mk +14 -0
@@ -309,12 +309,26 @@ $(1)-diff-config: $(1)-check-configuration-done $$(Q)cp -a $$($(2)_DIR)/.config.dc.bak $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) $$(Q)rm -f $$($(2)_DIR)/.config.dc.bak +# Target to output differences between the configuration obtained via the +# defconfig + fragments (if any) and the current configuration. +# Output format is suitable to be used as-is in fragment files. +# Note: it preserves the timestamp of the current configuration when moving it +# around. +$(1)-show-fragment: $(1)-check-configuration-done + $$(Q)cp -a $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) $$($(2)_DIR)/.config.dc.bak + $$(call kconfig-package-merge-config,$(2),$$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG),\ + $$($(2)_KCONFIG_FRAGMENT_FILES)) + $$(Q)utils/diffconfig -m $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) \ + $$($(2)_DIR)/.config.dc.bak + $$(Q)cp -a $$($(2)_DIR)/.config.dc.bak $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) + $$(Q)rm -f $$($(2)_DIR)/.config.dc.bak endif # package enabled .PHONY: \ $(1)-diff-config \ $(1)-check-configuration-done \ + $(1)-show-fragment \ $$($(2)_DIR)/.kconfig_editor_% \ $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS))
Signature · 6 lines
2.38.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 2/2 docs/manual: update pkg-kconfig doc about <pkg>-show-fragment
Describe this new target.
--- docs/manual/adding-packages-kconfig.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
docs/manual/adding-packages-kconfig.txt +5 -3
@@ -45,9 +45,11 @@ This snippet creates the following make targets: * +foo-diff-config+, which outputs the differences between the current configuration and the one defined in the Buildroot configuration for - this kconfig package. The output is useful to identify the - configuration changes that may have to be propagated to - configuration fragments for example. + this kconfig package. The output is useful to identify + configuration changes. + +* +foo-show-fragment+, Similiar to +foo-diff-config+, but with an output + format more suitable to be used in fragment files. and ensures that the source configuration file is copied to the build directory at the right moment.
Signature · 6 lines
2.38.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Ping
Den mån 30 jan. 2023 kl 11:43 skrev Marcus Folkesson < [email protected]>:
Quoted 72 lines
This patch introduce the new target to simplify the generation of configuration fragments as the output could be directly copied into a fragment file as-is.
It is *heavily* based on the <pkg>-diff-config target, but serves a different purpose.
Output from linux-diff-config:
(quoted diff) +0
-8-CONFIG_GCC_PLUGIN_ARM_SSP_PER_TASK y -CONFIG_GCC_PLUGIN_CYC_COMPLEXITY n -CONFIG_GCC_PLUGIN_LATENT_ENTROPY n -CONFIG_GCC_PLUGIN_RANDSTRUCT n -CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF n -CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL n -CONFIG_GCC_PLUGIN_STRUCTLEAK_USER n -CONFIG_STACKPROTECTOR_PER_TASK y
CONFIG_CRYPTO_DHn -> yCONFIG_CRYPTO_KPPm -> yCONFIG_GCC_PLUGINSy -> nCONFIG_KEY_DH_OPERATIONSn -> yCONFIG_PKCS8_PRIVATE_KEY_PARSERn -> yCONFIG_VIDEO_IMX274n -> mOutput from linux-show-fragment:
CONFIG_CRYPTO_DH=yCONFIG_CRYPTO_KPP=yCONFIG_KEY_DH_OPERATIONS=yCONFIG_PKCS8_PRIVATE_KEY_PARSER=yCONFIG_VIDEO_IMX274=mSigned-off-by Marcus Folkesson <[email protected]>--- package/pkg-kconfig.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+)package/pkg-kconfig.mk +4
-0@@ -309,12 +309,26 @@ $(1)-diff-config: $(1)-check-configuration-done $$(Q)cp -a $$($(2)_DIR)/.config.dc.bak $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) $$(Q)rm -f $$($(2)_DIR)/.config.dc.bak +# Target to output differences between the configuration obtained via the +# defconfig + fragments (if any) and the current configuration. +# Output format is suitable to be used as-is in fragment files. +# Note: it preserves the timestamp of the current configuration whenmoving it
package/pkg-kconfig.mk +3
-0+# around. +$(1)-show-fragment: $(1)-check-configuration-done + $$(Q)cp -a $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG)$$($(2)_DIR)/.config.dc.bak
+ $$(call
kconfig-package-merge-config,$(2),$$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG),\package/pkg-kconfig.mk +4
-0+ $$($(2)_KCONFIG_FRAGMENT_FILES)) + $$(Q)utils/diffconfig -m $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) \ + $$($(2)_DIR)/.config.dc.bak + $$(Q)cp -a $$($(2)_DIR)/.config.dc.bak$$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG)
package/pkg-kconfig.mk +2
-1+ $$(Q)rm -f $$($(2)_DIR)/.config.dc.bak endif # package enabled .PHONY: \ $(1)-diff-config \ $(1)-check-configuration-done \ + $(1)-show-fragment \ $$($(2)_DIR)/.kconfig_editor_% \ $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)) --
Quoted 3 lines
2.38.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Ping.
Med vänliga hälsningar / Best regards
Marcus Folkesson
Den tis 14 feb. 2023 kl 07:38 skrev Marcus Folkesson < [email protected]>:
Quoted 76 lines
Ping
Den mån 30 jan. 2023 kl 11:43 skrev Marcus Folkesson < [email protected]>:
Quoted 71 lines
This patch introduce the new target to simplify the generation of configuration fragments as the output could be directly copied into a fragment file as-is.
It is *heavily* based on the <pkg>-diff-config target, but serves a different purpose.
Output from linux-diff-config:
(quoted diff) +0
-8-CONFIG_GCC_PLUGIN_ARM_SSP_PER_TASK y -CONFIG_GCC_PLUGIN_CYC_COMPLEXITY n -CONFIG_GCC_PLUGIN_LATENT_ENTROPY n -CONFIG_GCC_PLUGIN_RANDSTRUCT n -CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF n -CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL n -CONFIG_GCC_PLUGIN_STRUCTLEAK_USER n -CONFIG_STACKPROTECTOR_PER_TASK y
CONFIG_CRYPTO_DHn -> yCONFIG_CRYPTO_KPPm -> yCONFIG_GCC_PLUGINSy -> nCONFIG_KEY_DH_OPERATIONSn -> yCONFIG_PKCS8_PRIVATE_KEY_PARSERn -> yCONFIG_VIDEO_IMX274n -> mOutput from linux-show-fragment:
CONFIG_CRYPTO_DH=yCONFIG_CRYPTO_KPP=yCONFIG_KEY_DH_OPERATIONS=yCONFIG_PKCS8_PRIVATE_KEY_PARSER=yCONFIG_VIDEO_IMX274=mSigned-off-by Marcus Folkesson <[email protected]>--- package/pkg-kconfig.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+)package/pkg-kconfig.mk +4
-0@@ -309,12 +309,26 @@ $(1)-diff-config: $(1)-check-configuration-done $$(Q)cp -a $$($(2)_DIR)/.config.dc.bak $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) $$(Q)rm -f $$($(2)_DIR)/.config.dc.bak +# Target to output differences between the configuration obtained via the +# defconfig + fragments (if any) and the current configuration. +# Output format is suitable to be used as-is in fragment files. +# Note: it preserves the timestamp of the current configuration whenmoving it
package/pkg-kconfig.mk +3
-0+# around. +$(1)-show-fragment: $(1)-check-configuration-done + $$(Q)cp -a $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG)$$($(2)_DIR)/.config.dc.bak
+ $$(call
kconfig-package-merge-config,$(2),$$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG),\package/pkg-kconfig.mk +4
-0+ $$($(2)_KCONFIG_FRAGMENT_FILES)) + $$(Q)utils/diffconfig -m $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) \ + $$($(2)_DIR)/.config.dc.bak + $$(Q)cp -a $$($(2)_DIR)/.config.dc.bak$$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG)
package/pkg-kconfig.mk +2
-0+ $$(Q)rm -f $$($(2)_DIR)/.config.dc.bak endif # package enabled .PHONY: \ $(1)-diff-config \ $(1)-check-configuration-done \ + $(1)-show-fragment \ $$($(2)_DIR)/.kconfig_editor_% \ $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS))
Quoted 4 lines
Quoted 4 lines
--
2.38.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot