public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	linux-kbuild <linux-kbuild@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Roman Zippel <zippel@linux-m68k.org>,
	Jeremy Fitzhardinge <jeremy@goop.org>
Subject: Re: [PATCH] x86: use defconfig as last resort
Date: Sun, 25 May 2008 08:22:10 +0200	[thread overview]
Message-ID: <20080525062210.GA31195@uranus.ravnborg.org> (raw)
In-Reply-To: <alpine.LFD.1.10.0805241825460.3081@woody.linux-foundation.org>

> 
> Wouldn't this be cleaner as just *one* entry, and then just have 
> different default statements, ie something like
> 
>     config DEFCONFIG_LIST
> 	string
> 	option defconfig_list
> 	default "arch/x86/configs/i386_defconfig" if X86_32
> 	default "arch/x86/configs/x86_64_defconfig" if X86_64
> 
> instead?

Following patch moves the stuff away from the arch
specific Kconfig file and works at least for
x86 and alpha.
It uses the already defined environment variables to locate
the defconfig and try known locations.

	Sam

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index fe361ae..6a4b98e 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -26,19 +26,6 @@ config X86
 	select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64)
 	select HAVE_ARCH_KGDB if !X86_VOYAGER
 
-config DEFCONFIG_LIST
-	string
-	depends on X86_32
-	option defconfig_list
-	default "arch/x86/configs/i386_defconfig"
-
-config DEFCONFIG_LIST
-	string
-	depends on X86_64
-	option defconfig_list
-	default "arch/x86/configs/x86_64_defconfig"
-
-
 config GENERIC_LOCKBREAK
 	def_bool n
 
diff --git a/init/Kconfig b/init/Kconfig
index 6135d07..2aa7180 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -6,6 +6,14 @@ config KERNELVERSION
 	string
 	option env="KERNELVERSION"
 
+config KBUILD_DEFCONFIG
+	string
+	option env="KBUILD_DEFCONFIG"
+
+config SRCARCH
+	string
+	option env="SRCARCH"
+
 config DEFCONFIG_LIST
 	string
 	depends on !UML
@@ -13,7 +21,8 @@ config DEFCONFIG_LIST
 	default "/lib/modules/$UNAME_RELEASE/.config"
 	default "/etc/kernel-config"
 	default "/boot/config-$UNAME_RELEASE"
-	default "arch/$ARCH/defconfig"
+	default "arch/$SRCARCH/configs/$KBUILD_DEFCONFIG"
+	default "arch/$SRCARCH/defconfig"
 
 menu "General setup"
 

  parent reply	other threads:[~2008-05-25  6:22 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-24 19:25 [RFC PATCH] kconfig: introduce KCONFIG_* symbols for .c files Sam Ravnborg
2008-05-24 19:53 ` Andrew Morton
2008-05-24 20:14   ` Jeremy Fitzhardinge
2008-05-24 20:46     ` Sam Ravnborg
2008-05-24 20:56       ` Jeremy Fitzhardinge
2008-05-24 21:03         ` Sam Ravnborg
2008-05-24 20:24   ` Sam Ravnborg
2008-05-24 20:48     ` Andrew Morton
2008-05-24 21:00       ` Sam Ravnborg
2008-05-24 20:05 ` Adrian Bunk
2008-05-24 20:44   ` Sam Ravnborg
2008-05-24 20:57     ` Adrian Bunk
2008-05-24 20:20 ` Linus Torvalds
2008-05-24 20:37   ` [PATCH] x86: use defconfig as last resort Sam Ravnborg
2008-05-25  1:30     ` Linus Torvalds
2008-05-25  6:15       ` Sam Ravnborg
2008-05-25  6:22       ` Sam Ravnborg [this message]
2008-05-24 20:48 ` [RFC PATCH] kconfig: introduce KCONFIG_* symbols for .c files Jeremy Fitzhardinge
2008-05-24 20:58   ` Jeremy Fitzhardinge
2008-05-24 21:03     ` Adrian Bunk
2008-05-24 21:13       ` Jeremy Fitzhardinge
2008-05-24 21:26 ` Pavel Machek

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=20080525062210.GA31195@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=zippel@linux-m68k.org \
    /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