mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: linux-kbuild@vger.kernel.org,
	"Yann E. MORIN" <yann.morin.1998@free.fr>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Felipe Contreras <felipe.contreras@gmail.com>
Subject: [RFC/PATCH 1/2] kconfig: add KBUILD_USERCONFIG option
Date: Thu, 27 Aug 2015 08:08:44 -0500	[thread overview]
Message-ID: <1440680925-2879-2-git-send-email-felipe.contreras@gmail.com> (raw)
In-Reply-To: <1440680925-2879-1-git-send-email-felipe.contreras@gmail.com>

This allows us to specify a user defconfig which is added on top of the
default defconfig, which makes it easier for users to keep a simpler
defconfig, without duplicating all the options already present in the
arch defconfig.

Here a very simple defconfig I've been using for several years on top of
x86_64_defconfig. It works because I can rely on the fact that
x86_64_defconfig is properly maintained.

CONFIG_KERNEL_LZO=y
CONFIG_OPROFILE=m
CONFIG_MCORE2=y
CONFIG_COMPAT_VDSO=y

CONFIG_PATA_ACPI=y
CONFIG_ATA_GENERIC=y

CONFIG_LOGO=n

CONFIG_BTRFS_FS=m
CONFIG_FUSE_FS=m
CONFIG_NFS_FS=m
CONFIG_NFSD=m
CONFIG_CIFS=m

CONFIG_KVM=m
CONFIG_KVM_INTEL=m
CONFIG_KSM=y
CONFIG_PARAVIRT=y

CONFIG_USB_XHCI_HCD=y
CONFIG_USB_USBNET=m
CONFIG_USB_NET_CDC_EEM=m
CONFIG_USB_UAS=m

CONFIG_SND_HDA_INPUT_JACK=y
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_HDMI=y
CONFIG_SND_HDA_CODEC_CMEDIA=y
CONFIG_SND_HDA_CODEC_SI3054=y

CONFIG_DM_CRYPT=m
CONFIG_CRYPTO_SHA256=y
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BRIDGE=m
CONFIG_TUN=m

CONFIG_ISO9660_FS=m
CONFIG_UDF_FS=m

CONFIG_ENCLOSURE_SERVICES=m
CONFIG_SCSI_ENCLOSURE=m

CONFIG_DEBUG_KERNEL=n
CONFIG_X86_VERBOSE_BOOTUP=n
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_PM_RUNTIME=y

CONFIG_SCHED_AUTOGROUP=y

CONFIG_UEVENT_HELPER_PATH=""

CONFIG_FHANDLE=y

CONFIG_EFI_STUB=y
CONFIG_EFIVAR_FS=m

CONFIG_HYPERVISOR_GUEST=y
CONFIG_DRM_CIRRUS_QEMU=y

CONFIG_CFG80211=m
CONFIG_MAC80211=m
CONFIG_IWLWIFI=m
CONFIG_CFG80211_DEFAULT_PS=n

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 scripts/kconfig/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index d9b1fef..0d55ad1 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -97,9 +97,15 @@ defconfig: $(obj)/conf
 ifeq ($(KBUILD_DEFCONFIG),)
 	$< $(silent) --defconfig $(Kconfig)
 else
+ifneq ($(KBUILD_USERCONFIG),)
+	@$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)' and '$(KBUILD_USERCONFIG)'"
+	$(Q)cat arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(KBUILD_USERCONFIG) > defconfig
+	$(Q)$< $(silent) --defconfig=defconfig $(Kconfig)
+else
 	@$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
 	$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
 endif
+endif
 
 %_defconfig: $(obj)/conf
 	$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
-- 
2.5.0


  reply	other threads:[~2015-08-27 13:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27 13:08 [RFC/PATCH 0/2] A simpler way to maintain custom defconfigs Felipe Contreras
2015-08-27 13:08 ` Felipe Contreras [this message]
2015-08-27 13:08 ` [RFC/PATCH 2/2] kconfig: add KCONFIG_BASECONFIG option to savedefconfig Felipe Contreras
2015-08-28 12:55 ` [RFC/PATCH 0/2] A simpler way to maintain custom defconfigs John Stoffel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440680925-2879-2-git-send-email-felipe.contreras@gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®