public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Kegel <dank@kegel.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Fix allnoconfig on arm with small tweak to kconfig?
Date: Mon, 13 Sep 2004 00:53:33 -0700	[thread overview]
Message-ID: <414551FD.4020701@kegel.com> (raw)

[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


             reply	other threads:[~2004-09-13  7:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-13  7:53 Dan Kegel [this message]
2004-09-13  8:15 ` Fix allnoconfig on arm with small tweak to kconfig? 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

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=414551FD.4020701@kegel.com \
    --to=dank@kegel.com \
    --cc=linux-kernel@vger.kernel.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