From: Sam Ravnborg <sam@ravnborg.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: clameter@sgi.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, Roman Zippel <zippel@linux-m68k.org>
Subject: Re: [RFC 1/4] CONFIG_STABLE: Define it
Date: Fri, 1 Jun 2007 22:25:56 +0200 [thread overview]
Message-ID: <20070601202556.GB4232@uranus.ravnborg.org> (raw)
In-Reply-To: <20070531141147.423ad5e3.akpm@linux-foundation.org>
>
> With the following behaviour:
>
> DEVEL_KERNEL = 0 in Makefile:
>
> DEVEL_KERNEL=n in Kconfig
> CONFIG_DEVEL_KERNEL is not set in cpp
>
> DEVEL_KERNEL = 1 in Makefile:
>
> DEVEL_KERNEL=y in Kconfig
> CONFIG_DEVEL_KERNEL is set in cpp
>
> however the above patch doesn't do this correctly and I got bored of
> fiddling with it. Help?
My first try below.
It does the kconfig stuff as expected.
But the CONFIG_KERNEL_DEVEL is NOT updated unless you
touch .config (or in other ways change the config).
I did not see an easy way to fix that - Roman?
I only had to add SYMBOL_VALID as falg to get it working - but it
took me a while to figure out. Somehow all the comments describing the
data structures for kconfig has got lost.
Sam
diff --git a/Makefile b/Makefile
index 562a909..362668c 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ PATCHLEVEL = 6
SUBLEVEL = 22
EXTRAVERSION = -rc3
NAME = Jeff Thinks I Should Change This, But To What?
+KERNEL_DEVEL =
# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
@@ -320,7 +321,7 @@ AFLAGS := -D__ASSEMBLY__
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
-export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
+export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION KERNEL_DEVEL
export ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index 8770a5d..5373d58 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -91,6 +91,14 @@ source "init/Kconfig"
menu "Processor type and features"
+config MY_KERNEL_DEVEL
+ bool "Needs Kernel devel"
+ depends on KERNEL_DEVEL
+
+config MY_KERNEL_DEVEL2
+ bool "Do not need kernel devel"
+ depends on !KERNEL_DEVEL
+
source "kernel/time/Kconfig"
config SMP
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index c35dcc5..fb4d5b8 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -68,6 +68,15 @@ void sym_init(void)
if (p)
sym_add_default(sym, p);
+ sym = sym_lookup("KERNEL_DEVEL", 0);
+ sym->type = S_BOOLEAN;
+ sym->flags |= SYMBOL_VALID|SYMBOL_AUTO;
+ p = getenv("KERNEL_DEVEL");
+ if (p && atoi(p))
+ sym_add_default(sym, "y");
+ else
+ sym_add_default(sym, "n");
+
sym = sym_lookup("UNAME_RELEASE", 0);
sym->type = S_STRING;
sym->flags |= SYMBOL_AUTO;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-06-01 20:25 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-31 0:20 [RFC 0/4] CONFIG_STABLE to switch off development checks clameter
2007-05-31 0:20 ` [RFC 1/4] CONFIG_STABLE: Define it clameter
2007-05-31 0:35 ` young dave
2007-05-31 0:49 ` Christoph Lameter
2007-06-01 18:08 ` Dave Jones
2007-06-01 18:25 ` Christoph Lameter
2007-05-31 8:54 ` Stefan Richter
2007-05-31 9:03 ` David Miller, Stefan Richter
2007-05-31 9:03 ` Stefan Richter
2007-05-31 21:11 ` Andrew Morton
2007-05-31 21:14 ` Christoph Lameter
2007-05-31 21:30 ` Sam Ravnborg
2007-06-01 18:02 ` Dave Jones
2007-06-01 20:22 ` Sam Ravnborg
2007-06-01 20:30 ` Dave Jones
2007-06-01 20:55 ` Sam Ravnborg
2007-06-01 20:25 ` Sam Ravnborg [this message]
2007-07-20 10:41 ` Satyam Sharma
2007-07-20 11:09 ` Chris Snook
2007-07-20 11:27 ` Satyam Sharma
2007-07-20 11:34 ` Chris Snook
2007-07-20 11:40 ` Satyam Sharma
2007-07-20 11:50 ` Chris Snook
2007-07-20 16:48 ` Stefan Richter
2007-07-20 16:28 ` Stefan Richter
2007-07-20 16:36 ` Stefan Richter
2007-07-20 19:09 ` Chuck Ebbert
2007-05-31 0:20 ` [RFC 2/4] CONFIG_STABLE: Switch off kmalloc(0) tests in slab allocators clameter
2007-05-31 19:51 ` Zach Brown
2007-05-31 22:37 ` Andi Kleen
2007-05-31 0:20 ` [RFC 3/4] CONFIG_STABLE: Switch off SLUB banner clameter
2007-05-31 0:20 ` [RFC 4/4] CONFIG_STABLE: SLUB: Prefer object corruption over failure clameter
2007-06-01 14:55 ` [RFC 0/4] CONFIG_STABLE to switch off development checks Jeremy Fitzhardinge
2007-06-01 18:38 ` Christoph Lameter
2007-06-01 18:58 ` Jeremy Fitzhardinge
2007-06-01 20:59 ` Christoph Lameter
2007-06-01 21:24 ` Jeremy Fitzhardinge
2007-06-02 15:23 ` Dave Kleikamp
2007-06-02 16:28 ` Jeremy Fitzhardinge
2007-06-04 1:03 ` Dave Kleikamp
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=20070601202556.GB4232@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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