public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] Kconfig menu layout (multiple ways to show the same Kconfig configs?)
Date: Wed, 22 Apr 2009 21:43:57 +0200	[thread overview]
Message-ID: <20090422194357.GA4222@uranus.ravnborg.org> (raw)
In-Reply-To: <FF25C95C-5513-4C20-94BC-3A36E3DF46EA@kernel.crashing.org>

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

  reply	other threads:[~2009-04-22 19:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 21:11 [U-Boot] Kconfig menu layout Kumar Gala
2009-04-20 22:01 ` Jon Smirl
2009-04-20 23:57   ` Kumar Gala
2009-04-21  0:06     ` Jon Smirl
2009-04-21  0:12       ` Jon Smirl
2009-04-21 11:59         ` Jerry Van Baren
2009-04-21 14:27         ` Wolfgang Denk
2009-04-21 14:46           ` Alessandro Rubini
2009-04-21 15:21             ` Alessandro Rubini
2009-04-21 15:41           ` Jon Smirl
2009-04-21 15:57             ` Scott Wood
2009-04-21 20:02             ` Wolfgang Denk
2009-04-21 20:17               ` Kumar Gala
2009-04-21 20:52                 ` Wolfgang Denk
2009-04-21 21:05                   ` Kumar Gala
2009-04-21 22:33                     ` Jon Smirl
2009-04-21 23:14                       ` Wolfgang Denk
2009-04-21 23:22                         ` Jon Smirl
2009-04-21 23:56                           ` Ben Warren
2009-04-22  7:11                           ` Robert Schwebel
2009-04-21 22:59                     ` Wolfgang Denk
2009-04-21 23:03                       ` Kumar Gala
2009-04-22 12:44                   ` [U-Boot] Kconfig menu layout (multiple ways to show the same Kconfig configs?) Kumar Gala
2009-04-22 19:43                     ` Sam Ravnborg [this message]
2009-05-01 11:47                     ` Sam Ravnborg
2009-06-02 16:08                       ` Kumar Gala
2009-04-21 14:25       ` [U-Boot] Kconfig menu layout Wolfgang Denk
2009-04-21 15:33         ` Jon Smirl
2009-04-21 20:01           ` Wolfgang Denk

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=20090422194357.GA4222@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=u-boot@lists.denx.de \
    /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