kbuild: Show Kconfig fragments in "help"
Subsystems (11)
v2 cover kbuild: Show Kconfig fragments in "help"
Hi,
This is my series to show *.config targets in the "help" target so these various topics can be more easily discoverd.
v2:
- split .fragment from .config to hide "internal" fragments
- fix various typos
- avoid duplicate entries
v1: https://lore.kernel.org/all/[email protected]
Thanks!
-Kees
Kees Cook (2):
kbuild: Show Kconfig fragments in "help"
kbuild: Split internal config targets from .config into .fragment
Makefile | 1 -
arch/arm/configs/dram_0x00000000.config | 1 +
arch/arm/configs/dram_0xc0000000.config | 1 +
arch/arm/configs/dram_0xd0000000.config | 1 +
arch/arm/configs/lpae.config | 1 +
arch/arm64/configs/virt.config | 1 +
arch/powerpc/Makefile | 26 +++++++++----------
.../{32-bit.config => 32-bit.fragment} | 1 +
arch/powerpc/configs/64-bit.config | 1 -
arch/powerpc/configs/64-bit.fragment | 2 ++
...{85xx-32bit.config => 85xx-32bit.fragment} | 1 +
...{85xx-64bit.config => 85xx-64bit.fragment} | 1 +
.../{85xx-hw.config => 85xx-hw.fragment} | 1 +
.../{85xx-smp.config => 85xx-smp.fragment} | 1 +
.../{86xx-hw.config => 86xx-hw.fragment} | 1 +
.../{86xx-smp.config => 86xx-smp.fragment} | 1 +
arch/powerpc/configs/altivec.config | 1 -
arch/powerpc/configs/altivec.fragment | 2 ++
arch/powerpc/configs/be.config | 1 -
arch/powerpc/configs/be.fragment | 2 ++
.../{book3s_32.config => book3s_32.fragment} | 1 +
...enet_base.config => corenet_base.fragment} | 1 +
arch/powerpc/configs/debug.config | 1 +
arch/powerpc/configs/disable-werror.config | 1 +
.../configs/{dpaa.config => dpaa.fragment} | 1 +
...mb-nonhw.config => fsl-emb-nonhw.fragment} | 1 +
.../configs/{guest.config => guest.fragment} | 1 +
arch/powerpc/configs/le.config | 1 -
arch/powerpc/configs/le.fragment | 2 ++
...85xx_base.config => mpc85xx_base.fragment} | 1 +
...86xx_base.config => mpc86xx_base.fragment} | 1 +
.../{ppc64le.config => ppc64le.fragment} | 1 +
arch/powerpc/configs/security.config | 4 ++-
arch/riscv/configs/32-bit.config | 1 +
arch/riscv/configs/64-bit.config | 1 +
arch/s390/configs/btf.config | 1 +
arch/s390/configs/kasan.config | 1 +
arch/x86/Makefile | 4 ---
arch/x86/configs/tiny.config | 2 ++
{kernel => arch/x86}/configs/x86_debug.config | 1 +
arch/x86/configs/xen.config | 2 ++
kernel/configs/debug.config | 2 ++
kernel/configs/kvm_guest.config | 1 +
kernel/configs/nopm.config | 2 ++
kernel/configs/rust.config | 1 +
kernel/configs/tiny-base.config | 1 -
kernel/configs/tiny-base.fragment | 2 ++
kernel/configs/tiny.config | 2 ++
kernel/configs/xen.config | 2 ++
scripts/Makefile.defconf | 12 ++++++---
scripts/kconfig/Makefile | 16 +++++++++---
51 files changed, 87 insertions(+), 32 deletions(-)
rename arch/powerpc/configs/{32-bit.config => 32-bit.fragment} (53%)
delete mode 100644 arch/powerpc/configs/64-bit.config
create mode 100644 arch/powerpc/configs/64-bit.fragment
rename arch/powerpc/configs/{85xx-32bit.config => 85xx-32bit.fragment} (76%)
rename arch/powerpc/configs/{85xx-64bit.config => 85xx-64bit.fragment} (78%)
rename arch/powerpc/configs/{85xx-hw.config => 85xx-hw.fragment} (98%)
rename arch/powerpc/configs/{85xx-smp.config => 85xx-smp.fragment} (59%)
rename arch/powerpc/configs/{86xx-hw.config => 86xx-hw.fragment} (98%)
rename arch/powerpc/configs/{86xx-smp.config => 86xx-smp.fragment} (58%)
delete mode 100644 arch/powerpc/configs/altivec.config
create mode 100644 arch/powerpc/configs/altivec.fragment
delete mode 100644 arch/powerpc/configs/be.config
create mode 100644 arch/powerpc/configs/be.fragment
rename arch/powerpc/configs/{book3s_32.config => book3s_32.fragment} (52%)
rename arch/powerpc/configs/{corenet_base.config => corenet_base.fragment} (64%)
rename arch/powerpc/configs/{dpaa.config => dpaa.fragment} (80%)
rename arch/powerpc/configs/{fsl-emb-nonhw.config => fsl-emb-nonhw.fragment} (98%)
rename arch/powerpc/configs/{guest.config => guest.fragment} (85%)
delete mode 100644 arch/powerpc/configs/le.config
create mode 100644 arch/powerpc/configs/le.fragment
rename arch/powerpc/configs/{mpc85xx_base.config => mpc85xx_base.fragment} (94%)
rename arch/powerpc/configs/{mpc86xx_base.config => mpc86xx_base.fragment} (86%)
rename arch/powerpc/configs/{ppc64le.config => ppc64le.fragment} (65%)
rename {kernel => arch/x86}/configs/x86_debug.config (90%)
delete mode 100644 kernel/configs/tiny-base.config
create mode 100644 kernel/configs/tiny-base.fragmentSignature · 7 lines
2.34.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH v2 1/2 kbuild: Show Kconfig fragments in "help"
Doing a "make help" would show only hard-coded Kconfig targets and depended on the archhelp target to include ".config" targets. There was nothing showing global kernel/configs/ targets. Solve this by walking the wildcard list and include them in the output, using the first comment line as the help text. Additionally avoid showing duplicate targets when they exist in both general and arch-specific locations.
Update all Kconfig fragments to include help text and adjust archhelp targets to avoid redundancy.
Adds the following section to "help" target output:
Configuration fragment targets (for enabling various Kconfig items):
debug.config - Debugging for CI systems and finding regressions kvm_guest.config - Bootable as a KVM guest nopm.config - Disable Power Management rust.config - Enable Rust tiny-base.config - Minimal options for tiny systems tiny.config - Size-optimized kernel image x86_debug.config - Debugging options for tip tree testing xen.config - Bootable as a Xen guest tiny.config - x86-specific options for a small kernel image xen.config - x86-specific options for a Xen virtualization guest
--- Makefile | 1 - arch/arm/configs/dram_0x00000000.config | 1 + arch/arm/configs/dram_0xc0000000.config | 1 + arch/arm/configs/dram_0xd0000000.config | 1 + arch/arm/configs/lpae.config | 1 + arch/arm64/configs/virt.config | 1 + arch/powerpc/configs/32-bit.config | 1 + arch/powerpc/configs/64-bit.config | 1 + arch/powerpc/configs/85xx-32bit.config | 1 + arch/powerpc/configs/85xx-64bit.config | 1 + arch/powerpc/configs/85xx-hw.config | 1 + arch/powerpc/configs/85xx-smp.config | 1 + arch/powerpc/configs/86xx-hw.config | 1 + arch/powerpc/configs/86xx-smp.config | 1 + arch/powerpc/configs/altivec.config | 1 + arch/powerpc/configs/be.config | 1 + arch/powerpc/configs/book3s_32.config | 1 + arch/powerpc/configs/corenet_base.config | 1 + arch/powerpc/configs/debug.config | 1 + arch/powerpc/configs/disable-werror.config | 1 + arch/powerpc/configs/dpaa.config | 1 + arch/powerpc/configs/fsl-emb-nonhw.config | 1 + arch/powerpc/configs/guest.config | 1 + arch/powerpc/configs/le.config | 1 + arch/powerpc/configs/mpc85xx_base.config | 1 + arch/powerpc/configs/mpc86xx_base.config | 1 + arch/powerpc/configs/ppc64le.config | 1 + arch/powerpc/configs/security.config | 4 +++- arch/riscv/configs/32-bit.config | 1 + arch/riscv/configs/64-bit.config | 1 + arch/s390/configs/btf.config | 1 + arch/s390/configs/kasan.config | 1 + arch/x86/Makefile | 4 ---- arch/x86/configs/tiny.config | 2 ++ arch/x86/configs/xen.config | 2 ++ kernel/configs/debug.config | 2 ++ kernel/configs/kvm_guest.config | 1 + kernel/configs/nopm.config | 2 ++ kernel/configs/rust.config | 1 + kernel/configs/tiny-base.config | 1 + kernel/configs/tiny.config | 2 ++ kernel/configs/x86_debug.config | 1 + kernel/configs/xen.config | 2 ++ scripts/kconfig/Makefile | 14 +++++++++++--- 44 files changed, 60 insertions(+), 9 deletions(-)
Makefile +0 -1
@@ -1674,7 +1674,6 @@ help: @echo ' mrproper - Remove all generated files + config + various backup files' @echo ' distclean - mrproper + remove editor backup and patch files' @echo '' - @echo 'Configuration targets:' @$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help @echo '' @echo 'Other generic targets:'
arch/arm/configs/dram_0x00000000.config +1 -0
@@ -1 +1,2 @@ +# DRAM base at 0x00000000 CONFIG_DRAM_BASE=0x00000000
arch/arm/configs/dram_0xc0000000.config +1 -0
@@ -1 +1,2 @@ +# DRAM base at 0xc0000000 CONFIG_DRAM_BASE=0xc0000000
arch/arm/configs/dram_0xd0000000.config +1 -0
@@ -1 +1,2 @@ +# DRAM base at 0xd0000000 CONFIG_DRAM_BASE=0xd0000000
arch/arm/configs/lpae.config +1 -0
@@ -1,2 +1,3 @@ +# Enable Large Physical Address Extension mode CONFIG_ARM_LPAE=y CONFIG_VMSPLIT_2G=y
arch/arm64/configs/virt.config +1 -0
@@ -1,3 +1,4 @@ +# Virtualization guest # # Base options for platforms #
arch/powerpc/configs/32-bit.config +1 -0
@@ -1 +1,2 @@ +# Build a 32-bit image # CONFIG_PPC64 is not set
arch/powerpc/configs/64-bit.config +1 -0
@@ -1 +1,2 @@ +# Build a 64-bit image CONFIG_PPC64=y
arch/powerpc/configs/85xx-32bit.config +1 -0
@@ -1,3 +1,4 @@ +# Build a 32-bit 85xx image CONFIG_HIGHMEM=y CONFIG_KEXEC=y CONFIG_PPC_85xx=y
arch/powerpc/configs/85xx-64bit.config +1 -0
@@ -1,3 +1,4 @@ +# Build a 64-bit 85xx image CONFIG_MATH_EMULATION=y CONFIG_MATH_EMULATION_HW_UNIMPLEMENTED=y CONFIG_PPC64=y
arch/powerpc/configs/85xx-hw.config +1 -0
@@ -1,3 +1,4 @@ +# Base hardware support for 85xx CONFIG_AQUANTIA_PHY=y CONFIG_AT803X_PHY=y CONFIG_ATA=y
arch/powerpc/configs/85xx-smp.config +1 -0
@@ -1,2 +1,3 @@ +# Enable SMP on 85xx CONFIG_NR_CPUS=24 CONFIG_SMP=y
arch/powerpc/configs/86xx-hw.config +1 -0
@@ -1,3 +1,4 @@ +# Base hardware support for 86xx CONFIG_ATA=y CONFIG_BLK_DEV_SD=y CONFIG_BLK_DEV_SR=y
arch/powerpc/configs/86xx-smp.config +1 -0
@@ -1,2 +1,3 @@ +# Enable SMP on 86xx CONFIG_NR_CPUS=2 CONFIG_SMP=y
arch/powerpc/configs/altivec.config +1 -0
@@ -1 +1,2 @@ +# Enable Altivec support CONFIG_ALTIVEC=y
arch/powerpc/configs/be.config +1 -0
@@ -1 +1,2 @@ +# Enable Big Endian mode CONFIG_CPU_BIG_ENDIAN=y
arch/powerpc/configs/book3s_32.config +1 -0
@@ -1,2 +1,3 @@ +# Base support for 32 bits Book3s CONFIG_PPC64=n CONFIG_PPC_BOOK3S_32=y
arch/powerpc/configs/corenet_base.config +1 -0
@@ -1,2 +1,3 @@ +# Base support for corenet CONFIG_CORENET_GENERIC=y CONFIG_PPC_QEMU_E500=y
arch/powerpc/configs/debug.config +1 -0
@@ -1 +1,2 @@ +# Enable PowerPC specific debug options CONFIG_SCOM_DEBUGFS=y
arch/powerpc/configs/disable-werror.config +1 -0
@@ -1 +1,2 @@ +# Disable -Werror CONFIG_PPC_DISABLE_WERROR=y
arch/powerpc/configs/dpaa.config +1 -0
@@ -1,3 +1,4 @@ +# Base support for DPPA CONFIG_FSL_DPAA=y CONFIG_FSL_PAMU=y CONFIG_FSL_FMAN=y
arch/powerpc/configs/fsl-emb-nonhw.config +1 -0
@@ -1,3 +1,4 @@ +# Non-hardware options common to 85xx and corenet CONFIG_ADFS_FS=m CONFIG_AFFS_FS=m CONFIG_AUDIT=y
arch/powerpc/configs/guest.config +1 -0
@@ -1,3 +1,4 @@ +# PowerPC specific virtualization guest options CONFIG_VIRTIO_BLK=y CONFIG_SCSI_VIRTIO=y CONFIG_VIRTIO_NET=y
arch/powerpc/configs/le.config +1 -0
@@ -1 +1,2 @@ +# Enable Little Endian mode CONFIG_CPU_LITTLE_ENDIAN=y
arch/powerpc/configs/mpc85xx_base.config +1 -0
@@ -1,3 +1,4 @@ +# Base mpc85xx support CONFIG_MATH_EMULATION=y CONFIG_MPC8536_DS=y CONFIG_MPC85xx_DS=y
arch/powerpc/configs/mpc86xx_base.config +1 -0
@@ -1,3 +1,4 @@ +# Base mpc86xx support CONFIG_PPC_86xx=y CONFIG_GEF_PPC9A=y CONFIG_GEF_SBC310=y
arch/powerpc/configs/ppc64le.config +1 -0
@@ -1,2 +1,3 @@ +# Enable ppc64le mode CONFIG_PPC64=y CONFIG_CPU_LITTLE_ENDIAN=y
arch/powerpc/configs/security.config +3 -1
@@ -1,3 +1,5 @@ +# Common security options for PowerPC builds + # This is the equivalent of booting with lockdown=integrity CONFIG_SECURITY=y CONFIG_SECURITYFS=y
@@ -12,4 +14,4 @@ CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y # UBSAN bounds checking is very cheap and good for hardening CONFIG_UBSAN=y -# CONFIG_UBSAN_MISC is not set +# CONFIG_UBSAN_MISC is not set
arch/riscv/configs/32-bit.config +1 -0
@@ -1,3 +1,4 @@ +# Build a 32-bit image CONFIG_ARCH_RV32I=y CONFIG_32BIT=y # CONFIG_PORTABLE is not set
arch/riscv/configs/64-bit.config +1 -0
@@ -1,2 +1,3 @@ +# Build a 64-bit image CONFIG_ARCH_RV64I=y CONFIG_64BIT=y
arch/s390/configs/btf.config +1 -0
@@ -1 +1,2 @@ +# Enable BTF debug info CONFIG_DEBUG_INFO_BTF=y
arch/s390/configs/kasan.config +1 -0
@@ -1,3 +1,4 @@ +# Enable KASan for debugging CONFIG_KASAN=y CONFIG_KASAN_INLINE=y CONFIG_KASAN_VMALLOC=y
arch/x86/Makefile +0 -4
@@ -335,9 +335,5 @@ define archhelp echo ' bzdisk/fdimage*/hdimage/isoimage also accept:' echo ' FDARGS="..." arguments for the booted kernel' echo ' FDINITRD=file initrd for the booted kernel' - echo '' - echo ' kvm_guest.config - Enable Kconfig items for running this kernel as a KVM guest' - echo ' xen.config - Enable Kconfig items for running this kernel as a Xen guest' - echo ' x86_debug.config - Enable tip tree debugging options for testing' endef
arch/x86/configs/tiny.config +2 -0
@@ -1,3 +1,5 @@ +# x86-specific options for a small kernel image +# CONFIG_NOHIGHMEM=y # CONFIG_HIGHMEM4G is not set # CONFIG_HIGHMEM64G is not set
arch/x86/configs/xen.config +2 -0
@@ -1,3 +1,5 @@ +# x86-specific options for a Xen virtualization guest +# # global x86 required specific stuff # On 32-bit HIGHMEM4G is not allowed CONFIG_HIGHMEM64G=y
kernel/configs/debug.config +2 -0
@@ -1,3 +1,5 @@ +# Debugging for CI systems and finding regressions +# # The config is based on running daily CI for enterprise Linux distros to # seek regressions on linux-next builds on different bare-metal and virtual # platforms. It can be used for example,
kernel/configs/kvm_guest.config +1 -0
@@ -1,3 +1,4 @@ +# Bootable as a KVM guest CONFIG_NET=y CONFIG_NET_CORE=y CONFIG_NETDEVICES=y
kernel/configs/nopm.config +2 -0
@@ -1,3 +1,5 @@ +# Disable Power Management + CONFIG_PM=n CONFIG_SUSPEND=n CONFIG_HIBERNATION=n
kernel/configs/rust.config +1 -0
@@ -1 +1,2 @@ +# Enable Rust CONFIG_RUST=y
kernel/configs/tiny-base.config +1 -0
@@ -1 +1,2 @@ +# Minimal options for tiny systems CONFIG_EMBEDDED=y
kernel/configs/tiny.config +2 -0
@@ -1,3 +1,5 @@ +# Size-optimized kernel image +# # CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_KERNEL_GZIP is not set
kernel/configs/x86_debug.config +1 -0
@@ -1,3 +1,4 @@ +# Debugging options for tip tree testing CONFIG_X86_DEBUG_FPU=y CONFIG_LOCK_STAT=y CONFIG_DEBUG_VM=y
kernel/configs/xen.config +2 -0
@@ -1,3 +1,5 @@ +# Bootable as a Xen guest +# # global stuff - these enable us to allow some # of the not so generic stuff below for xen CONFIG_PARAVIRT=y
scripts/kconfig/Makefile +11 -3
@@ -93,11 +93,11 @@ endif %_defconfig: $(obj)/conf $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) -configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@) +configfiles=$(wildcard $(srctree)/kernel/configs/$(1) $(srctree)/arch/$(SRCARCH)/configs/$(1)) %.config: $(obj)/conf - $(if $(call configfiles),, $(error No configuration exists for this target on this architecture)) - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles) + $(if $(call configfiles,$@),, $(error No configuration exists for this target on this architecture)) + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(call configfiles,$@) $(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig PHONY += tinyconfig
@@ -115,6 +115,7 @@ clean-files += tests/.cache # Help text used by make help help: + @echo 'Configuration targets:' @echo ' config - Update current config utilising a line-oriented program' @echo ' nconfig - Update current config utilising a ncurses menu based program' @echo ' menuconfig - Update current config utilising a menu based program'
@@ -141,6 +142,13 @@ help: @echo ' default value without prompting' @echo ' tinyconfig - Configure the tiniest possible kernel' @echo ' testconfig - Run Kconfig unit tests (requires python3 and pytest)' + @echo '' + @echo 'Configuration topic targets:' + @$(foreach c, $(sort $(notdir $(call configfiles,*.config))), \ + printf " %-25s - %s\\n" \ + $(c) \ + "$(subst # ,,$(shell grep -m1 '^# ' \ + $(firstword $(call configfiles,$c))))";) # =========================================================================== # object files used by all kconfig flavours
Signature · 7 lines
2.34.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH v2 2/2 kbuild: Split internal config targets from .config into .fragment
In reply to Kees CookMany Kconfig fragments are being used internally to construct hard-coded targets and shouldn't be reachable directly through the build system. Splitting these out also means that the "help" target can display only the "complete" .config targets intended for general use. This is especially useful for powerpc where most of the arch fragments aren't intended to be consumed individually.
---
arch/powerpc/Makefile | 26 +++++++++----------
.../{32-bit.config => 32-bit.fragment} | 0
.../{64-bit.config => 64-bit.fragment} | 0
...{85xx-32bit.config => 85xx-32bit.fragment} | 0
...{85xx-64bit.config => 85xx-64bit.fragment} | 0
.../{85xx-hw.config => 85xx-hw.fragment} | 0
.../{85xx-smp.config => 85xx-smp.fragment} | 0
.../{86xx-hw.config => 86xx-hw.fragment} | 0
.../{86xx-smp.config => 86xx-smp.fragment} | 0
.../{altivec.config => altivec.fragment} | 0
.../configs/{be.config => be.fragment} | 0
.../{book3s_32.config => book3s_32.fragment} | 0
...enet_base.config => corenet_base.fragment} | 0
.../configs/{dpaa.config => dpaa.fragment} | 0
...mb-nonhw.config => fsl-emb-nonhw.fragment} | 0
.../configs/{guest.config => guest.fragment} | 0
.../configs/{le.config => le.fragment} | 0
...85xx_base.config => mpc85xx_base.fragment} | 0
...86xx_base.config => mpc86xx_base.fragment} | 0
.../{ppc64le.config => ppc64le.fragment} | 0
{kernel => arch/x86}/configs/x86_debug.config | 0
.../{tiny-base.config => tiny-base.fragment} | 0
scripts/Makefile.defconf | 12 ++++++---
scripts/kconfig/Makefile | 2 +-
24 files changed, 22 insertions(+), 18 deletions(-)
rename arch/powerpc/configs/{32-bit.config => 32-bit.fragment} (100%)
rename arch/powerpc/configs/{64-bit.config => 64-bit.fragment} (100%)
rename arch/powerpc/configs/{85xx-32bit.config => 85xx-32bit.fragment} (100%)
rename arch/powerpc/configs/{85xx-64bit.config => 85xx-64bit.fragment} (100%)
rename arch/powerpc/configs/{85xx-hw.config => 85xx-hw.fragment} (100%)
rename arch/powerpc/configs/{85xx-smp.config => 85xx-smp.fragment} (100%)
rename arch/powerpc/configs/{86xx-hw.config => 86xx-hw.fragment} (100%)
rename arch/powerpc/configs/{86xx-smp.config => 86xx-smp.fragment} (100%)
rename arch/powerpc/configs/{altivec.config => altivec.fragment} (100%)
rename arch/powerpc/configs/{be.config => be.fragment} (100%)
rename arch/powerpc/configs/{book3s_32.config => book3s_32.fragment} (100%)
rename arch/powerpc/configs/{corenet_base.config => corenet_base.fragment} (100%)
rename arch/powerpc/configs/{dpaa.config => dpaa.fragment} (100%)
rename arch/powerpc/configs/{fsl-emb-nonhw.config => fsl-emb-nonhw.fragment} (100%)
rename arch/powerpc/configs/{guest.config => guest.fragment} (100%)
rename arch/powerpc/configs/{le.config => le.fragment} (100%)
rename arch/powerpc/configs/{mpc85xx_base.config => mpc85xx_base.fragment} (100%)
rename arch/powerpc/configs/{mpc86xx_base.config => mpc86xx_base.fragment} (100%)
rename arch/powerpc/configs/{ppc64le.config => ppc64le.fragment} (100%)
rename {kernel => arch/x86}/configs/x86_debug.config (100%)
rename kernel/configs/{tiny-base.config => tiny-base.fragment} (100%)arch/powerpc/Makefile +13 -13
@@ -267,66 +267,66 @@ powernv_be_defconfig: generated_configs += mpc85xx_defconfig mpc85xx_defconfig: - $(call merge_into_defconfig,mpc85xx_base.config,\ + $(call merge_into_defconfig,mpc85xx_base.fragment,\ 85xx-32bit 85xx-hw fsl-emb-nonhw) generated_configs += mpc85xx_smp_defconfig mpc85xx_smp_defconfig: - $(call merge_into_defconfig,mpc85xx_base.config,\ + $(call merge_into_defconfig,mpc85xx_base.fragment,\ 85xx-32bit 85xx-smp 85xx-hw fsl-emb-nonhw) generated_configs += corenet32_smp_defconfig corenet32_smp_defconfig: - $(call merge_into_defconfig,corenet_base.config,\ + $(call merge_into_defconfig,corenet_base.fragment,\ 85xx-32bit 85xx-smp 85xx-hw fsl-emb-nonhw dpaa) generated_configs += corenet64_smp_defconfig corenet64_smp_defconfig: - $(call merge_into_defconfig,corenet_base.config,\ + $(call merge_into_defconfig,corenet_base.fragment,\ 85xx-64bit 85xx-smp altivec 85xx-hw fsl-emb-nonhw dpaa) generated_configs += mpc86xx_defconfig mpc86xx_defconfig: - $(call merge_into_defconfig,mpc86xx_base.config,\ + $(call merge_into_defconfig,mpc86xx_base.fragment,\ 86xx-hw fsl-emb-nonhw) generated_configs += mpc86xx_smp_defconfig mpc86xx_smp_defconfig: - $(call merge_into_defconfig,mpc86xx_base.config,\ + $(call merge_into_defconfig,mpc86xx_base.fragment,\ 86xx-smp 86xx-hw fsl-emb-nonhw) generated_configs += ppc32_allmodconfig ppc32_allmodconfig: - $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/book3s_32.config \ + $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/book3s_32.fragment \ -f $(srctree)/Makefile allmodconfig generated_configs += ppc_defconfig ppc_defconfig: - $(call merge_into_defconfig,book3s_32.config,) + $(call merge_into_defconfig,book3s_32.fragment,) generated_configs += ppc64le_allmodconfig ppc64le_allmodconfig: - $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/le.config \ + $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/le.fragment \ -f $(srctree)/Makefile allmodconfig generated_configs += ppc64le_allnoconfig ppc64le_allnoconfig: - $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/ppc64le.config \ + $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/ppc64le.fragment \ -f $(srctree)/Makefile allnoconfig generated_configs += ppc64_book3e_allmodconfig ppc64_book3e_allmodconfig: - $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/85xx-64bit.config \ + $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/85xx-64bit.fragment \ -f $(srctree)/Makefile allmodconfig generated_configs += ppc32_randconfig ppc32_randconfig: - $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/32-bit.config \ + $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/32-bit.fragment \ -f $(srctree)/Makefile randconfig generated_configs += ppc64_randconfig ppc64_randconfig: - $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/64-bit.config \ + $(Q)$(MAKE) KCONFIG_ALLCONFIG=$(srctree)/arch/powerpc/configs/64-bit.fragment \ -f $(srctree)/Makefile randconfig PHONY += $(generated_configs)
arch/powerpc/configs/32-bit.fragment renamed from arch/powerpc/configs/32-bit.config +0 -0
arch/powerpc/configs/64-bit.fragment renamed from arch/powerpc/configs/64-bit.config +0 -0
arch/powerpc/configs/85xx-32bit.fragment renamed from arch/powerpc/configs/85xx-32bit.config +0 -0
arch/powerpc/configs/85xx-64bit.fragment renamed from arch/powerpc/configs/85xx-64bit.config +0 -0
arch/powerpc/configs/85xx-hw.fragment renamed from arch/powerpc/configs/85xx-hw.config +0 -0
arch/powerpc/configs/85xx-smp.fragment renamed from arch/powerpc/configs/85xx-smp.config +0 -0
arch/powerpc/configs/86xx-hw.fragment renamed from arch/powerpc/configs/86xx-hw.config +0 -0
arch/powerpc/configs/86xx-smp.fragment renamed from arch/powerpc/configs/86xx-smp.config +0 -0
arch/powerpc/configs/altivec.fragment renamed from arch/powerpc/configs/altivec.config +0 -0
arch/powerpc/configs/be.fragment renamed from arch/powerpc/configs/be.config +0 -0
arch/powerpc/configs/book3s_32.fragment renamed from arch/powerpc/configs/book3s_32.config +0 -0
arch/powerpc/configs/corenet_base.fragment renamed from arch/powerpc/configs/corenet_base.config +0 -0
arch/powerpc/configs/dpaa.fragment renamed from arch/powerpc/configs/dpaa.config +0 -0
arch/powerpc/configs/fsl-emb-nonhw.fragment renamed from arch/powerpc/configs/fsl-emb-nonhw.config +0 -0
arch/powerpc/configs/guest.fragment renamed from arch/powerpc/configs/guest.config +0 -0
arch/powerpc/configs/le.fragment renamed from arch/powerpc/configs/le.config +0 -0
arch/powerpc/configs/mpc85xx_base.fragment renamed from arch/powerpc/configs/mpc85xx_base.config +0 -0
arch/powerpc/configs/mpc86xx_base.fragment renamed from arch/powerpc/configs/mpc86xx_base.config +0 -0
arch/powerpc/configs/ppc64le.fragment renamed from arch/powerpc/configs/ppc64le.config +0 -0
arch/x86/configs/x86_debug.config renamed from kernel/configs/x86_debug.config +0 -0
kernel/configs/tiny-base.fragment renamed from kernel/configs/tiny-base.config +0 -0
scripts/Makefile.defconf +8 -4
@@ -6,11 +6,13 @@ # Usage: # $(call merge_into_defconfig,base_config,config_fragment1 config_fragment2 ...) # -# Input config fragments without '.config' suffix +# Input config fragments without '.config' or '.fragment' suffix define merge_into_defconfig $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \ -m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/$(1) \ - $(foreach config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config) + $(foreach config,$(2), \ + $(wildcard $(srctree)/arch/$(ARCH)/configs/$(config).config \ + $(srctree)/arch/$(ARCH)/configs/$(config).fragment)) +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig endef
@@ -20,10 +22,12 @@ endef # Usage: # $(call merge_into_defconfig_override,base_config,config_fragment1 config_fragment2 ...) # -# Input config fragments without '.config' suffix +# Input config fragments without '.config' or '.fragment' suffix define merge_into_defconfig_override $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \ -Q -m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/$(1) \ - $(foreach config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config) + $(foreach config,$(2), \ + $(wildcard $(srctree)/arch/$(ARCH)/configs/$(config).config \ + $(srctree)/arch/$(ARCH)/configs/$(config).fragment)) +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig endef
scripts/kconfig/Makefile +1 -1
@@ -102,7 +102,7 @@ configfiles=$(wildcard $(srctree)/kernel/configs/$(1) $(srctree)/arch/$(SRCARCH) PHONY += tinyconfig tinyconfig: - $(Q)KCONFIG_ALLCONFIG=kernel/configs/tiny-base.config $(MAKE) -f $(srctree)/Makefile allnoconfig + $(Q)KCONFIG_ALLCONFIG=kernel/configs/tiny-base.fragment $(MAKE) -f $(srctree)/Makefile allnoconfig $(Q)$(MAKE) -f $(srctree)/Makefile tiny.config # CHECK: -o cache_dir=<path> working?
Signature · 7 lines
2.34.1 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 8 lines · Kees Cook
Hi,
This is my series to show *.config targets in the "help" target so these various topics can be more easily discoverd.
v2:
- split .fragment from .config to hide "internal" fragments
Please do not do this churn.
Like Randy, I did not get "why" part quiet well, but if you are eager about this,
you can show help message only when the following ("# Help:" prefix for example) is found in the first line.
# Help: blah blah
# other comment
Quoted 94 lines
- fix various typos
- avoid duplicate entries
v1: https://lore.kernel.org/all/[email protected]Thanks!
-Kees
Kees Cook (2):
kbuild: ShowKconfigfragments in "help"
kbuild: Split internal config targets from .config into .fragmentMakefile | 1 - arch/arm/configs/dram_0x00000000.config | 1 + arch/arm/configs/dram_0xc0000000.config | 1 + arch/arm/configs/dram_0xd0000000.config | 1 + arch/arm/configs/lpae.config | 1 + arch/arm64/configs/virt.config | 1 + arch/powerpc/Makefile | 26 +++++++++---------- .../{32-bit.config => 32-bit.fragment} | 1 + arch/powerpc/configs/64-bit.config | 1 - arch/powerpc/configs/64-bit.fragment | 2 ++ ...{85xx-32bit.config => 85xx-32bit.fragment} | 1 + ...{85xx-64bit.config => 85xx-64bit.fragment} | 1 + .../{85xx-hw.config => 85xx-hw.fragment} | 1 + .../{85xx-smp.config => 85xx-smp.fragment} | 1 + .../{86xx-hw.config => 86xx-hw.fragment} | 1 + .../{86xx-smp.config => 86xx-smp.fragment} | 1 + arch/powerpc/configs/altivec.config | 1 - arch/powerpc/configs/altivec.fragment | 2 ++ arch/powerpc/configs/be.config | 1 - arch/powerpc/configs/be.fragment | 2 ++ .../{book3s_32.config => book3s_32.fragment} | 1 + ...enet_base.config => corenet_base.fragment} | 1 + arch/powerpc/configs/debug.config | 1 + arch/powerpc/configs/disable-werror.config | 1 + .../configs/{dpaa.config => dpaa.fragment} | 1 + ...mb-nonhw.config => fsl-emb-nonhw.fragment} | 1 + .../configs/{guest.config => guest.fragment} | 1 + arch/powerpc/configs/le.config | 1 - arch/powerpc/configs/le.fragment | 2 ++ ...85xx_base.config => mpc85xx_base.fragment} | 1 + ...86xx_base.config => mpc86xx_base.fragment} | 1 + .../{ppc64le.config => ppc64le.fragment} | 1 + arch/powerpc/configs/security.config | 4 ++- arch/riscv/configs/32-bit.config | 1 + arch/riscv/configs/64-bit.config | 1 + arch/s390/configs/btf.config | 1 + arch/s390/configs/kasan.config | 1 + arch/x86/Makefile | 4 --- arch/x86/configs/tiny.config | 2 ++ {kernel => arch/x86}/configs/x86_debug.config | 1 + arch/x86/configs/xen.config | 2 ++ kernel/configs/debug.config | 2 ++ kernel/configs/kvm_guest.config | 1 + kernel/configs/nopm.config | 2 ++ kernel/configs/rust.config | 1 + kernel/configs/tiny-base.config | 1 - kernel/configs/tiny-base.fragment | 2 ++ kernel/configs/tiny.config | 2 ++ kernel/configs/xen.config | 2 ++ scripts/Makefile.defconf | 12 ++++++--- scripts/kconfig/Makefile | 16 +++++++++--- 51 files changed, 87 insertions(+), 32 deletions(-) rename arch/powerpc/configs/{32-bit.config => 32-bit.fragment} (53%) delete mode 100644 arch/powerpc/configs/64-bit.config create mode 100644 arch/powerpc/configs/64-bit.fragment rename arch/powerpc/configs/{85xx-32bit.config => 85xx-32bit.fragment} (76%) rename arch/powerpc/configs/{85xx-64bit.config => 85xx-64bit.fragment} (78%) rename arch/powerpc/configs/{85xx-hw.config => 85xx-hw.fragment} (98%) rename arch/powerpc/configs/{85xx-smp.config => 85xx-smp.fragment} (59%) rename arch/powerpc/configs/{86xx-hw.config => 86xx-hw.fragment} (98%) rename arch/powerpc/configs/{86xx-smp.config => 86xx-smp.fragment} (58%) delete mode 100644 arch/powerpc/configs/altivec.config create mode 100644 arch/powerpc/configs/altivec.fragment delete mode 100644 arch/powerpc/configs/be.config create mode 100644 arch/powerpc/configs/be.fragment rename arch/powerpc/configs/{book3s_32.config => book3s_32.fragment} (52%) rename arch/powerpc/configs/{corenet_base.config => corenet_base.fragment} (64%) rename arch/powerpc/configs/{dpaa.config => dpaa.fragment} (80%) rename arch/powerpc/configs/{fsl-emb-nonhw.config => fsl-emb-nonhw.fragment} (98%) rename arch/powerpc/configs/{guest.config => guest.fragment} (85%) delete mode 100644 arch/powerpc/configs/le.config create mode 100644 arch/powerpc/configs/le.fragment rename arch/powerpc/configs/{mpc85xx_base.config => mpc85xx_base.fragment} (94%) rename arch/powerpc/configs/{mpc86xx_base.config => mpc86xx_base.fragment} (86%) rename arch/powerpc/configs/{ppc64le.config => ppc64le.fragment} (65%) rename {kernel => arch/x86}/configs/x86_debug.config (90%) delete mode 100644 kernel/configs/tiny-base.config create mode 100644 kernel/configs/tiny-base.fragment--
2.34.1
Signature · 7 lines
Best Regards Masahiro Yamada _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Michael Ellerman
reviewerQuoted 11 lines · Masahiro Yamada
Quoted 8 lines · Kees Cook
Hi,
This is my series to show *.config targets in the "help" target so these various topics can be more easily discoverd.
v2:
- split .fragment from .config to hide "internal" fragmentsPlease do not do this churn.
That was my idea :}
Quoted 7 lines
Like Randy, I did not get "why" part quiet well, but if you are eager about this,
you can show help message only when the following ("# Help:" prefix for example) is found in the first line.# Help: blah blah
# other comment
I did think of that, but wasn't sure how to do it in make.
cheers
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 20 lines · Michael Ellerman
Quoted 11 lines · Masahiro Yamada
Quoted 8 lines · Kees Cook
Hi,
This is my series to show *.config targets in the "help" target so these various topics can be more easily discoverd.
v2:
- split .fragment from .config to hide "internal" fragmentsPlease do not do this churn.
That was my idea :}
Quoted 5 lines
Like Randy, I did not get "why" part quiet well, but if you are eager about this,
you can show help message only when the following ("# Help:" prefix for example) is found in the first line.
Quoted 4 lines
Quoted 2 lines
# Help: blah blah
# other commentI did think of that, but wasn't sure how to do it in make.
Something like this should do it:
@grep -Hnm1 -e '^# Help:' $(foreach f, $(sort $(notdir $(call configfiles,*.config))), $(firstword $(call configfiles,$(f)))) | \
while read loc dummy helptext; do \
tmp="$${loc%:#}"; file="$${tmp%:*}"; line="$${tmp##*:}"; \
[ "$${line}" = "1" ] && \
printf " %-25s - %s\\n" "$${file##*/}" "$${helptext}"; \
donebut this neither beautiful nor elegant it likes to be improved.
Kind regards,
Nicolas
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 36 lines · Nicolas Schier
Quoted 20 lines · Michael Ellerman
Quoted 11 lines · Masahiro Yamada
Quoted 8 lines · Kees Cook
Hi,
This is my series to show *.config targets in the "help" target so these various topics can be more easily discoverd.
v2:
- split .fragment from .config to hide "internal" fragmentsPlease do not do this churn.
That was my idea :}
Quoted 5 lines
Like Randy, I did not get "why" part quiet well, but if you are eager about this,
you can show help message only when the following ("# Help:" prefix for example) is found in the first line.Quoted 4 lines
Quoted 2 lines
# Help: blah blah
# other commentI did think of that, but wasn't sure how to do it in make.
Something like this should do it:
@grep -Hnm1 -e '^# Help:' $(foreach f, $(sort $(notdir $(call configfiles,*.config))), $(firstword $(call configfiles,$(f)))) | \ while read loc dummy helptext; do \ tmp="$${loc%:#}"; file="$${tmp%:*}"; line="$${tmp##*:}"; \ [ "$${line}" = "1" ] && \ printf " %-25s - %s\\n" "$${file##*/}" "$${helptext}"; \ done
Quoted 4 lines
but this neither beautiful nor elegant it likes to be improved.
Kind regards,
Nicolas
The attached patch will work too.
I dropped the "in the first line" restriction
because SPDX might be placed in the first line
of config fragments.
Signature · 2 lines
Best Regards Masahiro Yamada
Makefile +0 -1
@@ -1552,7 +1552,6 @@ help: @echo ' mrproper - Remove all generated files + config + various backup files' @echo ' distclean - mrproper + remove editor backup and patch files' @echo '' - @echo 'Configuration targets:' @$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help @echo '' @echo 'Other generic targets:'
arch/x86/Makefile +0 -4
@@ -335,9 +335,5 @@ define archhelp echo ' bzdisk/fdimage*/hdimage/isoimage also accept:' echo ' FDARGS="..." arguments for the booted kernel' echo ' FDINITRD=file initrd for the booted kernel' - echo '' - echo ' kvm_guest.config - Enable Kconfig items for running this kernel as a KVM guest' - echo ' xen.config - Enable Kconfig items for running this kernel as a Xen guest' - echo ' x86_debug.config - Enable tip tree debugging options for testing' endef
kernel/configs/kvm_guest.config +1 -0
@@ -1,3 +1,4 @@ +# Help: Bootable as a KVM guest CONFIG_NET=y CONFIG_NET_CORE=y CONFIG_NETDEVICES=y
kernel/configs/x86_debug.config +1 -0
@@ -1,3 +1,4 @@ +# Help: Debugging options for tip tree testing CONFIG_X86_DEBUG_FPU=y CONFIG_LOCK_STAT=y CONFIG_DEBUG_VM=y
kernel/configs/xen.config +2 -0
@@ -1,3 +1,5 @@ +# Help: Bootable as a Xen guest +# # global stuff - these enable us to allow some # of the not so generic stuff below for xen CONFIG_PARAVIRT=y
scripts/kconfig/Makefile +12 -3
@@ -93,11 +93,13 @@ endif %_defconfig: $(obj)/conf $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) -configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@) +configfiles = $(wildcard $(srctree)/kernel/configs/$(1) $(srctree)/arch/$(SRCARCH)/configs/$(1)) +all-config-fragments = $(call configfiles,*) +config-fragments = $(call configfiles,$@) %.config: $(obj)/conf - $(if $(call configfiles),, $(error No configuration exists for this target on this architecture)) - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles) + $(if $(config-fragments),, $(error $@ fragment does not exists on this architecture)) + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(config-fragments) $(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig PHONY += tinyconfig
@@ -115,6 +117,7 @@ clean-files += tests/.cache # Help text used by make help help: + @echo 'Configuration targets:' @echo ' config - Update current config utilising a line-oriented program' @echo ' nconfig - Update current config utilising a ncurses menu based program' @echo ' menuconfig - Update current config utilising a menu based program'
@@ -141,6 +144,12 @@ help: @echo ' default value without prompting' @echo ' tinyconfig - Configure the tiniest possible kernel' @echo ' testconfig - Run Kconfig unit tests (requires python3 and pytest)' + @echo '' + @echo 'Configuration topic targets:' + @$(foreach f, $(all-config-fragments), \ + if help=$$(grep -m1 '^# Help: ' $(f)); then \ + printf ' %-25s - %s\n' '$(notdir $(f))' "$${help#*: }"; \ + fi;) # =========================================================================== # object files used by all kconfig flavours
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 141 lines · On Tue, Aug 29, 2023 at 11:57:19PM +0900 Masahiro Yamada wrote:
Quoted 36 lines · Nicolas Schier
Quoted 20 lines · Michael Ellerman
Quoted 11 lines · Masahiro Yamada
Quoted 8 lines · Kees Cook
Hi,
This is my series to show *.config targets in the "help" target so these various topics can be more easily discoverd.
v2:
- split .fragment from .config to hide "internal" fragmentsPlease do not do this churn.
That was my idea :}
Quoted 5 lines
Like Randy, I did not get "why" part quiet well, but if you are eager about this,
you can show help message only when the following ("# Help:" prefix for example) is found in the first line.Quoted 4 lines
Quoted 2 lines
# Help: blah blah
# other commentI did think of that, but wasn't sure how to do it in make.
Something like this should do it:
@grep -Hnm1 -e '^# Help:' $(foreach f, $(sort $(notdir $(call configfiles,*.config))), $(firstword $(call configfiles,$(f)))) | \ while read loc dummy helptext; do \ tmp="$${loc%:#}"; file="$${tmp%:*}"; line="$${tmp##*:}"; \ [ "$${line}" = "1" ] && \ printf " %-25s - %s\\n" "$${file##*/}" "$${helptext}"; \ doneQuoted 4 lines
but this neither beautiful nor elegant it likes to be improved.
Kind regards,
NicolasThe attached patch will work too.
I dropped the "in the first line" restriction
because SPDX might be placed in the first line
of config fragments.Signature · 2 lines
Best Regards Masahiro YamadaMakefile +0
-1@@ -1552,7 +1552,6 @@ help: @echo ' mrproper - Remove all generated files + config + various backup files' @echo ' distclean - mrproper + remove editor backup and patch files' @echo '' - @echo 'Configuration targets:' @$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help @echo '' @echo 'Other generic targets:'arch/x86/Makefile +0
-4@@ -335,9 +335,5 @@ define archhelp echo ' bzdisk/fdimage*/hdimage/isoimage also accept:' echo ' FDARGS="..." arguments for the booted kernel' echo ' FDINITRD=file initrd for the booted kernel' - echo '' - echo ' kvm_guest.config - Enable Kconfig items for running this kernel as a KVM guest' - echo ' xen.config - Enable Kconfig items for running this kernel as a Xen guest' - echo ' x86_debug.config - Enable tip tree debugging options for testing' endefkernel/configs/kvm_guest.config +1
-0@@ -1,3 +1,4 @@ +# Help: Bootable as a KVM guest CONFIG_NET=y CONFIG_NET_CORE=y CONFIG_NETDEVICES=ykernel/configs/x86_debug.config +1
-0@@ -1,3 +1,4 @@ +# Help: Debugging options for tip tree testing CONFIG_X86_DEBUG_FPU=y CONFIG_LOCK_STAT=y CONFIG_DEBUG_VM=ykernel/configs/xen.config +2
-0@@ -1,3 +1,5 @@ +# Help: Bootable as a Xen guest +# # global stuff - these enable us to allow some # of the not so generic stuff below for xen CONFIG_PARAVIRT=yscripts/kconfig/Makefile +6
-3@@ -93,11 +93,13 @@ endif %_defconfig: $(obj)/conf $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) -configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@) +configfiles = $(wildcard $(srctree)/kernel/configs/$(1) $(srctree)/arch/$(SRCARCH)/configs/$(1)) +all-config-fragments = $(call configfiles,*) +config-fragments = $(call configfiles,$@) %.config: $(obj)/conf - $(if $(call configfiles),, $(error No configuration exists for this target on this architecture)) - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles) + $(if $(config-fragments),, $(error $@ fragment does not exists on this architecture)) + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(config-fragments) $(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig PHONY += tinyconfig@@ -115,6 +117,7 @@ clean-files += tests/.cache # Help text used by make help help: + @echo 'Configuration targets:' @echo ' config - Update current config utilising a line-oriented program' @echo ' nconfig - Update current config utilising a ncurses menu based program' @echo ' menuconfig - Update current config utilising a menu based program'
scripts/kconfig/Makefile help: · line 152
Quoted 9 lines
scripts/kconfig/Makefile +6
-0@@ -141,6 +144,12 @@ help: @echo ' default value without prompting' @echo ' tinyconfig - Configure the tiniest possible kernel' @echo ' testconfig - Run Kconfig unit tests (requires python3 and pytest)' + @echo '' + @echo 'Configuration topic targets:' + @$(foreach f, $(all-config-fragments), \ + if help=$$(grep -m1 '^# Help: ' $(f)); then \ + printf ' %-25s - %s\n' '$(notdir $(f))' "$${help#*: }"; \ + fi;)
thanks, this looks much better, and SPDX is a good point.
Kind regards,
Nicolas
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Kees Cook
Reviewed-byQuoted 5 lines · Masahiro Yamada
The attached patch will work too.
I dropped the "in the first line" restriction
because SPDX might be placed in the first line
of config fragments.
Good call. Yes, this looks excellent; thank you! Do you want to send a formal patch? Please consider it:
Signature · 1 line
Kees Cook
Quoted 8 lines · Kees Cook
Quoted 5 lines · Masahiro Yamada
The attached patch will work too.
I dropped the "in the first line" restriction
because SPDX might be placed in the first line
of config fragments.
Quoted 7 lines
Good call. Yes, this looks excellent; thank you! Do you want to send a formal patch? Please consider it:
Reviewed-by Kees Cook <[email protected]>--
Kees Cook
You can send it with
You can add help messages to more *.config files if you like, and add SPDX tags while you are here.
--
Best Regards
Masahiro Yamada