lkml.org 
[lkml]   [2004]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectFix allnoconfig on arm with small tweak to kconfig?
[argh.  sent to arm list by mistake first time.]

'make allnoconfig' generates a broken .config on arm because
none of the boolean CPU types get selected.
ARCH_RPC *does* get selected ok, and I can make CPU_SA110 the
default if ARCH_RPC, but that doesn't help, since allnoconfig
sets all booleans that are exposed to the user to false, so
CPU_SA110 remains false.

Hiding the CPU_SA110 rule from the user (and thus from allnoconfig)
either by removing the prompt, or by modifying the CPU_SA110 rule
by adding && !ARCH_RPC to the end of the prompt,
does in fact allow 'make arch=arm allnoconfig' to generate a good .config file.
That's not a fix, as it breaks interactive configuration, but it does suggest a fix:
add a 'allnoconfig' boolean one can sense in Kconfig files.
Then Kconfig authors could hide precious default boolean
options from the wrath of allnoconfig by adding a 'if !allnoconfig' on the
menu statement.

I tried it (see patch below), but couldn't get it to work in first
few tries. Can someone who understands kconfig have a look?
Thanks!
- Dan

--- linux-2.6.5/scripts/kconfig/conf.c.old Mon Sep 13 00:13:34 2004
+++ linux-2.6.5/scripts/kconfig/conf.c Mon Sep 13 00:23:51 2004
@@ -28,6 +28,8 @@
} input_mode = ask_all;
char *defconfig_file;

+int allnoconfig = 0; /* kludge. Set in main(), read in sym_init(). */
+
static int indent = 1;
static int valid_stdin = 1;
static int conf_cnt;
@@ -511,6 +513,7 @@
break;
case 'n':
input_mode = set_no;
+ allnoconfig = 1;
break;
case 'm':
input_mode = set_mod;
--- linux-2.6.5/scripts/kconfig/zconf.tab.c.old Mon Sep 13 00:20:33 2004
+++ linux-2.6.5/scripts/kconfig/zconf.tab.c Mon Sep 13 00:29:02 2004
@@ -1925,6 +1925,13 @@
modules_sym = sym_lookup("MODULES", 0);
rootmenu.prompt = menu_add_prop(P_MENU, "Linux Kernel Configuration", NULL, NULL);

+ /* Let config files know if -n is in force so they can hide important defaults */
+ {
+ struct symbol *sym = sym_lookup("allnoconfig", 0);
+ extern int allnoconfig;
+ sym_set_tristate_value(sym, allnoconfig ? yes : no);
+ }
+
//zconfdebug = 1;
zconfparse();
if (zconfnerrs)
--- linux-2.6.5/arch/arm/mm/Kconfig.old Sun Sep 12 23:21:12 2004
+++ linux-2.6.5/arch/arm/mm/Kconfig Mon Sep 13 00:25:33 2004
@@ -185,8 +185,11 @@

# SA110
config CPU_SA110
- bool "Support StrongARM(R) SA-110 processor" if !ARCH_EBSA110 && !FOOTBRIDGE && !ARCH_TBOX && !ARCH_SHARK && !ARCH_NEXUSPCI && ARCH_RPC
- default y if ARCH_EBSA110 || FOOTBRIDGE || ARCH_TBOX || ARCH_SHARK || ARCH_NEXUSPCI
+ bool "Support StrongARM(R) SA-110 processor" if !ARCH_EBSA110 && !FOOTBRIDGE && !ARCH_TBOX && !ARCH_SHARK && !ARCH_NEXUSPCI && !allnoconfig
+ # Note: the RiscPC from Acorn shipped with several microprocessors over the years.
+ # It is arguably wrong to pick one of them as the default, but we have to if we
+ # want 'make allnoconfig' to work.
+ default y if ARCH_EBSA110 || FOOTBRIDGE || ARCH_TBOX || ARCH_SHARK || ARCH_NEXUSPCI || ARCH_RPC
select CPU_32v3 if ARCH_RPC
select CPU_32v4 if !ARCH_RPC
select CPU_ABRT_EV4
--
My technical stuff: http://kegel.com
My politics: see http://www.misleader.org for examples of why I'm for regime change

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site