From f9227077fe2908f189e4da88bfa8bc1ac17e02a4 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Thu, 4 Apr 2013 01:28:47 +0200 Subject: [PATCH] build: add defconfig files This enables users to more easily select the driver that they need, and us to ship default configurations that we prefer for that driver. Add iwlwifi as the first example. Signed-off-by: Johannes Berg --- backport/Makefile.real | 12 +++++++++++- backport/defconfigs/iwlwifi | 17 +++++++++++++++++ gentree.py | 7 ++----- 3 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 backport/defconfigs/iwlwifi diff --git a/backport/Makefile.real b/backport/Makefile.real index c419772a808e..07eb8fc45573 100644 --- a/backport/Makefile.real +++ b/backport/Makefile.real @@ -27,13 +27,23 @@ usedefconfig: @$(MAKE) -C kconfig conf @./kconfig/conf --defconfig=defconfig Kconfig +defconfig-%:: + @$(MAKE) -C kconfig conf + @./kconfig/conf --defconfig=defconfigs/$(@:defconfig-%=%) Kconfig + .config: @test -f defconfig && (yes '' | $(MAKE) usedefconfig) || ( \ echo "/--------------" ;\ echo "| Your backport package isn't configured, please configure it" ;\ echo "| using one of the following options:" ;\ + echo "| To configure manually:" ;\ + echo "| make oldconfig" ;\ echo "| make menuconfig" ;\ - echo "| make allyesconfig" ;\ + echo "|" ;\ + echo "| To get defaults for certain drivers:" ;\ + (cd defconfigs ; for f in $$(ls) ; do \ + echo "| make defconfig-$$f" ;\ + done ) ;\ echo "\--" ;\ false ) diff --git a/backport/defconfigs/iwlwifi b/backport/defconfigs/iwlwifi new file mode 100644 index 000000000000..6a5f4baed1f7 --- /dev/null +++ b/backport/defconfigs/iwlwifi @@ -0,0 +1,17 @@ +CPTCFG_CFG80211=m +CPTCFG_CFG80211_DEFAULT_PS=y +CPTCFG_CFG80211_DEBUGFS=y +CPTCFG_MAC80211=m +# CPTCFG_MAC80211_RC_PID is not set +# CPTCFG_MAC80211_RC_MINSTREL is not set +# CPTCFG_MAC80211_RC_DEFAULT_MINSTREL is not set +CPTCFG_MAC80211_DEBUGFS=y +CPTCFG_MAC80211_MESSAGE_TRACING=y +CPTCFG_WLAN=y +CPTCFG_IWLWIFI=m +CPTCFG_IWLDVM=m +CPTCFG_IWLMVM=m +CPTCFG_IWLWIFI_DEBUG=y +CPTCFG_IWLWIFI_DEBUGFS=y +CPTCFG_IWLWIFI_DEVICE_TRACING=y +CPTCFG_IWLWIFI_P2P=y diff --git a/gentree.py b/gentree.py index 696a960cb8ce..375479d0fd91 100755 --- a/gentree.py +++ b/gentree.py @@ -137,10 +137,7 @@ def copy_files(srcpath, copy_list, outdir): def copy_ignore(dir, entries): r = [] for i in entries: - if (not i[-1] in ('c', 'h') and - i[-4:] != '.awk' and - not i in ('Kconfig', 'Makefile') and - not os.path.isdir(os.path.join(dir, i))): + if i[-1] in ('o', '~'): r.append(i) return r copytree(os.path.join(srcpath, srcitem), @@ -267,7 +264,7 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None, # do the copy backport_files = [(x, x) for x in [ 'Kconfig', 'Makefile', 'Makefile.build', 'Makefile.kernel', - 'Makefile.real', 'compat/', 'include/', 'kconfig/', + 'Makefile.real', 'compat/', 'include/', 'kconfig/', 'defconfigs/', ]] if not args.git_revision: logwrite('Copy original source files ...') -- 2.30.2