xconfig is broken (example ppc 8xx)
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.
Quoted 11 lines
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:
Quoted 7 lines
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.
Quoted 1 line
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
Re: xconfig is broken (example ppc 8xx) [PATCH]
In reply to george anzinger"george anzinger wrote:"
Quoted 7 lines
To show the problem do:
make xconfig ARCH=ppc
in the "Platform support" menu "Processor Type" select "8xx" then close the subminue with "MainMenu"
Quoted 8 lines
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
***********************************************************************
arch/ppc/8260_io/Config.in +8 -4
@@ -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
arch/ppc/8xx_io/Config.in +10 -5
@@ -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
arch/ppc/config.in +2 -0
@@ -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
***********************************************************************
Signature · 4 lines
======================================================================= Andrzej M. Krzysztofowicz [email protected] phone (48)(58) 347 14 61 Faculty of Applied Phys. & Math., Technical University of Gdansk