[U-Boot] Kconfig menu layout (multiple ways to show the same Kconfig configs?)
Sam Ravnborg
sam at ravnborg.org
Wed Apr 22 21:43:57 CEST 2009
On Wed, Apr 22, 2009 at 07:44:48AM -0500, Kumar Gala wrote:
>
> On Apr 21, 2009, at 3:52 PM, Wolfgang Denk wrote:
>
> >Dear Kumar Gala,
> >
> >In message <93A8F58D-8C13-4F72-AFF3-
> >CF4FDF9A3CFA at kernel.crashing.org> you wrote:
> >>
> >>>In my experience, I tend to search for board names first.
> >>
> >>So back to the root of my question, do we just have one really long
> >>list of board names?
> >
> >I'm not an expert for the capabilities of Kconfig, but one looong list
> >with hundrets of entries clearly makes no sense. We obviously need sum
> >grouping / structuring.
> >
> >IMHO there should be several options:
> >
> >- for those who look for a board name, we should support this,
> > probably wih an initial selection by the first letter (case
> > insensitive) of the board name.
> >
> > like this: => board name => M => MPC837XERDB
> >
> >- alternatively, it should be possible to restrict the choice by
> > selecting first processor architecture (ARM, PowerPC, MIPS, ...),
> > then CPU (family) name, then board names.
> >
> > like this: => Architecture => PPC => MPC83xx => MPC837XERDB
>
> Sam,
>
> We are looking at moving u-boot to use Kconfig and was wondering if
> you could possible tell us if its possible to represent the same
> Kconfig 'config' options via two different menu schemes. We have a
> list of boards that will be 'config' options. We'd like to have it in
> one 'menu' that is just a long list of boards. The other would be a
> smaller subset that you "filter" based on selecting an Arch & Subarch.
Kconfig does not allow you to duplicate a config entry in two menus
in a way that is usefull here.
You want to use the same name, prompt and help text in both menus.
I think the solution is to have a filter part and a "list all boards"
part.
Then the filter part can be used to make the board list smaller.
Below is a quick mock-up of the idea.
I used CPU + INTERFACE - reading the above I should have used
Arch + SubArch but you get the idea.
If you decide to do something like this then hide most of this
in a separate file and include it.
Sam
choice SHOW_CPU
prompt "What CPU?"
default SHOW_CPU_ALL
config SHOW_CPU_ALL
bool "Show all cpus"
select CPU_ARM
select CPU_POWERPC
select CPU_AVR32
config SHOW_CPU_ARM
bool "Show only ARM"
select CPU_ARM
config SHOW_CPU_POPWERPC
bool "Show only PowerPC"
select CPU_POWERPC
config SHOW_CPU_AVR32
bool "Show only AVR32"
select CPU_AVR32
endchoice
config CPU_ARM
bool
config CPU_POWERPC
bool
config CPU_AVR32
bool
choice SHOW_INTERFACE_ALL
tristate "Which interfaces?"
default SHOW_INTERFACE_ALL
config SHOW_INTERFACE_ALL
bool "All interfaces"
select INTERFACE_NONE
select INTERFACE_USB
select INTERFACE_CAN
config SHOW_INTERFACE_NONE
bool "No interfaces!?!?!"
select INTERFACE_NONE
config SHOW_INTERFACE_USB
bool "USB"
select INTERFACE_USB
config SHOW_INTERFACE_CAN
bool "CAN"
select INTERFACE_CAN
endchoice
config INTERFACE_NONE
bool
config INTERFACE_USB
bool
config INTERFACE_CAN
bool
config ARM_BOARD_A1
bool "A1 - not-fancy ARM based board"
depends on CPU_ARM
depends on INTERFACE_NONE
help
This is the super fancy ARM based boards
config ARM_BOARD_A2
bool "A1 - USB ARM based board"
depends on CPU_ARM
depends on INTERFACE_USB
help
This is the super fancy ARM based boards
config ARM_BOARD_A3
bool "A1 - CAN+USB ARM based board"
depends on CPU_ARM
depends on INTERFACE_CAN || INTERFACE_USB
help
This is the super fancy ARM based boards
config PPC_BOARD_A1
bool "P1 - not-fancy PPC based board"
depends on CPU_POWERPC
depends on INTERFACE_NONE
help
This is the fancy PopwerPC based board
config PPC_BOARD_USB10
bool "USB - PopwerPC based USB hub"
depends on CPU_POWERPC
depends on INTERFACE_USB
help
The 20 port USB hub with monitoring facilities
config AVR32_CAN
bool "CAN Monitor based on AVR32"
depends on CPU_AVR32
depends on INTERFACE_CAN
help
CAN monitor for 10 CAN simultaneously channels
>
> is something like this possible?
>
> - k
More information about the U-Boot
mailing list