public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* xconfig is broken (example ppc 8xx)
@ 2001-05-02 16:12 george anzinger
  2001-05-02 20:51 ` Andrzej Krzysztofowicz
  2001-05-03 11:11 ` xconfig is broken (example ppc 8xx) [PATCH] Andrzej Krzysztofowicz
  0 siblings, 2 replies; 3+ messages in thread
From: george anzinger @ 2001-05-02 16:12 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org

To show the problem do:

make xconfig ARCH=ppc

in the "Platform support" menu "Processor Type" select "8xx" then close
the subminue with "MainMenu"

now select "Save and Exit"

This produces the following error messages:

ERROR - Attempting to write value for unconfigured variable
(CONFIG_SCC_ENET).
ERROR - Attempting to write value for unconfigured variable
(CONFIG_FEC_ENET).

The named CONFIG options are not set, nor are a few others related to
CONFIG_SCC_ENET.
(This means the on board NIC is not configured and since this is usually
a disc less system, boot fails when trying to mount "/" over nfs.)

make menueconfig ARCH=ppc  works correctly.

The problem appears to be related to these lines in
../ARCH/ppc/config.in


if [ "$CONFIG_CPU_PPC_8xx" = "y" ]; then
source arch/ppc/8xx_io/Config.in
fi

if [ "$CONFIG_CPU_PPC_8260" = "y" ]; then
source arch/ppc/8260_io/Config.in
fi

Only one of the two files is included, however, both configure the two
options mentioned in the error messages.

I think the problem is that the "wish" script builder does not allow a
CONFIG option to be configured in two different places, even if only one
of scripts should be included.

Additional info: Kernel revs tested 2.4.2, 2.4.3
If you swap the two "if" phrases above, the 8xx config works but the
8260 fails in the same way.  I.e. the last one wins.

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

* Re: xconfig is broken (example ppc 8xx)
  2001-05-02 16:12 xconfig is broken (example ppc 8xx) george anzinger
@ 2001-05-02 20:51 ` Andrzej Krzysztofowicz
  2001-05-03 11:11 ` xconfig is broken (example ppc 8xx) [PATCH] Andrzej Krzysztofowicz
  1 sibling, 0 replies; 3+ messages in thread
From: Andrzej Krzysztofowicz @ 2001-05-02 20:51 UTC (permalink / raw)
  To: george anzinger; +Cc: linux-kernel@vger.kernel.org

> To show the problem do:
> 
> make xconfig ARCH=ppc
> 
> in the "Platform support" menu "Processor Type" select "8xx" then close
> the subminue with "MainMenu"
> 
> now select "Save and Exit"
> 
> This produces the following error messages:
> 
> ERROR - Attempting to write value for unconfigured variable
> (CONFIG_SCC_ENET).
> ERROR - Attempting to write value for unconfigured variable
> (CONFIG_FEC_ENET).

> I think the problem is that the "wish" script builder does not allow a
> CONFIG option to be configured in two different places, even if only one

Exactly.

> of scripts should be included.

xconfig is not an on-line parser as other interpreters.
It is a script build as effect of parsing of the whole config tree
and includes all possible options.

The problem is that xconfig is based on an assumption that an
unconfigured/disabled option variable preserves its value (as "hidden")
for future reuse. It is in generel contradiction with reusing same
option in more than ane place in the config tree.

And nobody wants to rewrite xconfig (removing the mentioned above
assumption) at the end (hopefully in 2.5) of its life ...

Andrzej

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

* Re: xconfig is broken (example ppc 8xx) [PATCH]
  2001-05-02 16:12 xconfig is broken (example ppc 8xx) george anzinger
  2001-05-02 20:51 ` Andrzej Krzysztofowicz
@ 2001-05-03 11:11 ` Andrzej Krzysztofowicz
  1 sibling, 0 replies; 3+ messages in thread
From: Andrzej Krzysztofowicz @ 2001-05-03 11:11 UTC (permalink / raw)
  To: george anzinger; +Cc: linux-kernel@vger.kernel.org, paulus

"george anzinger wrote:"
> To show the problem do:
> 
> make xconfig ARCH=ppc
> 
> in the "Platform support" menu "Processor Type" select "8xx" then close
> the subminue with "MainMenu"
> 
> now select "Save and Exit"
> 
> This produces the following error messages:
> 
> ERROR - Attempting to write value for unconfigured variable
> (CONFIG_SCC_ENET).
> ERROR - Attempting to write value for unconfigured variable
> (CONFIG_FEC_ENET).

The following patch shold fix it. It is against 2.4.3-ac14, but should
cleanly apply to the Linus's tree also.

Andrzej

***********************************************************************
diff -ur linux-2.4.3-ac14/arch/ppc/8260_io/Config.in linux/arch/ppc/8260_io/Config.in
--- linux-2.4.3-ac14/arch/ppc/8260_io/Config.in	Mon Nov 13 23:13:15 2000
+++ linux/arch/ppc/8260_io/Config.in	Thu May  3 12:51:28 2001
@@ -4,18 +4,22 @@
 if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
   mainmenu_option next_comment
   comment 'MPC8260 Communication Options'
-  bool 'CPM SCC Ethernet' CONFIG_SCC_ENET
+  bool 'CPM SCC Ethernet' CONFIG_SCC_ENET_8260
+  define_bool CONFIG_SCC_ENET $CONFIG_SCC_ENET_8260
   if [ "$CONFIG_SCC_ENET" = "y" ]; then
-  bool 'Ethernet on SCC1' CONFIG_SCC1_ENET
+    bool 'Ethernet on SCC1' CONFIG_SCC1_ENET_8260
+    define_bool CONFIG_SCC1_ENET $CONFIG_SCC1_ENET_8260
     if [ "$CONFIG_SCC1_ENET" != "y" ]; then
-      bool 'Ethernet on SCC2' CONFIG_SCC2_ENET
+	 bool 'Ethernet on SCC2' CONFIG_SCC2_ENET_8260
+	 define_bool CONFIG_SCC2_ENET $CONFIG_SCC2_ENET_8260
     fi
   fi
 #
 #  CONFIG_FEC_ENET is only used to get netdevices to call our init
 #    function.  Any combination of FCC1,2,3 are supported.
 #
-  bool 'FCC Ethernet' CONFIG_FEC_ENET
+  bool 'FCC Ethernet' CONFIG_FEC_ENET_8260
+  define_bool CONFIG_FEC_ENET $CONFIG_FEC_ENET_8260
   if [ "$CONFIG_FEC_ENET" = "y" ]; then
     bool 'Ethernet on FCC1' CONFIG_FCC1_ENET
     bool 'Ethernet on FCC2' CONFIG_FCC2_ENET
diff -ur linux-2.4.3-ac14/arch/ppc/8xx_io/Config.in linux/arch/ppc/8xx_io/Config.in
--- linux-2.4.3-ac14/arch/ppc/8xx_io/Config.in	Wed Apr  4 00:18:05 2001
+++ linux/arch/ppc/8xx_io/Config.in	Thu May  3 13:00:29 2001
@@ -5,14 +5,19 @@
 comment 'MPC8xx CPM Options'
 
 if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
-  bool 'CPM SCC Ethernet' CONFIG_SCC_ENET
+   bool 'CPM SCC Ethernet' CONFIG_SCC_ENET_8xx
+   define_bool CONFIG_SCC_ENET $CONFIG_SCC_ENET_8xx
   if [ "$CONFIG_SCC_ENET" = "y" ]; then
     choice 'SCC used for Ethernet'	\
-  	"SCC1	CONFIG_SCC1_ENET	\
-	 SCC2	CONFIG_SCC2_ENET	\
-	 SCC3	CONFIG_SCC3_ENET"	SCC1
+	"SCC1	CONFIG_SCC1_ENET_8xx	\
+	 SCC2	CONFIG_SCC2_ENET_8xx	\
+	 SCC3	CONFIG_SCC3_ENET_8xx"	SCC1
+      define_bool CONFIG_SCC1_ENET $CONFIG_SCC1_ENET_8xx
+      define_bool CONFIG_SCC2_ENET $CONFIG_SCC2_ENET_8xx
+      define_bool CONFIG_SCC3_ENET $CONFIG_SCC3_ENET_8xx
   fi
-  bool '860T FEC Ethernet' CONFIG_FEC_ENET
+  bool '860T FEC Ethernet' CONFIG_FEC_ENET_8xx
+  define_bool CONFIG_FEC_ENET $CONFIG_FEC_ENET_8xx
   if [ "$CONFIG_FEC_ENET" = "y" ]; then
     bool 'Use MDIO for PHY configuration' CONFIG_USE_MDIO
   fi
diff -ur linux-2.4.3-ac14/arch/ppc/config.in linux/arch/ppc/config.in
--- linux-2.4.3-ac14/arch/ppc/config.in	Sun Apr 22 14:48:28 2001
+++ linux/arch/ppc/config.in	Thu May  3 13:03:03 2001
@@ -34,6 +34,8 @@
 
 if [ "$CONFIG_6xx" = "y" ]; then
   bool 'MPC8260 CPM Support' CONFIG_8260
+else
+   define_bool CONFIG_8260 n
 fi
 
 if [ "$CONFIG_POWER3" = "y" -o "$CONFIG_POWER4" = "y" ]; then
***********************************************************************

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk

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

end of thread, other threads:[~2001-05-03 11:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-02 16:12 xconfig is broken (example ppc 8xx) george anzinger
2001-05-02 20:51 ` Andrzej Krzysztofowicz
2001-05-03 11:11 ` xconfig is broken (example ppc 8xx) [PATCH] Andrzej Krzysztofowicz

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