public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Fix allnoconfig on arm with small tweak to kconfig?
@ 2004-09-13  7:53 Dan Kegel
  2004-09-13  8:15 ` Russell King
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Kegel @ 2004-09-13  7:53 UTC (permalink / raw)
  To: Linux Kernel Mailing List

[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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-09-17  8:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-13  7:53 Fix allnoconfig on arm with small tweak to kconfig? Dan Kegel
2004-09-13  8:15 ` Russell King
2004-09-13 15:22   ` Dan Kegel
2004-09-13 18:51     ` Russell King
2004-09-13 19:29       ` Herbert Poetzl
2004-09-13 21:06         ` Nicolas Pitre
2004-09-13 21:34         ` Russell King
2004-09-14  1:42       ` Dan Kegel
2004-09-14  8:29         ` Russell King
2004-09-17  8:39           ` Dan Kegel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox