* any value in allowing user selection of barebox prompt?
@ 2012-02-06 15:57 Robert P. J. Day
2012-02-07 9:33 ` Sascha Hauer
0 siblings, 1 reply; 4+ messages in thread
From: Robert P. J. Day @ 2012-02-06 15:57 UTC (permalink / raw)
To: U-Boot Version 2 (barebox)
making things a bit simpler than my last few posts, is it worth
making the BOARDINFO prompt string user selectable? if i was going to
do some customization, it would be nice to have the prompt perhaps
abbreviate what i'd done.
for instance, if i:
$ make omap3530_beagle_defconfig
i can see how my barebox prompt string is going to be set in
arch/arm/mach-omap/Kconfig:
config BOARDINFO
default "Texas Instrument's SDP343x" if MACH_OMAP343xSDP
default "Texas Instrument's Beagle" if MACH_BEAGLE
default "Texas Instrument's OMAP3EVM" if MACH_OMAP3EVM
default "Texas Instrument's Panda" if MACH_PANDA
default "Phytec phyCORE pcm049" if MACH_PCM049
default "Phytec phyCARD-A-L1" if MACH_PCAAL1
but if i specifically configure and build for an xM, i'd like the
prompt to perhaps read:
barebox@Texas Instrument's Beagle xM:/
it's easy enough to do (although it would need to be done on a
per-machine basis):
config BOARDINFO
string "Board info"
default "Texas Instrument's SDP343x" if MACH_OMAP343xSDP
default "Texas Instrument's Beagle" if MACH_BEAGLE
default "Texas Instrument's OMAP3EVM" if MACH_OMAP3EVM
default "Texas Instrument's Panda" if MACH_PANDA
default "Phytec phyCORE pcm049" if MACH_PCM049
default "Phytec phyCARD-A-L1" if MACH_PCAAL1
i tried it and it seems to work fine although the aesthetics in
"make menuconfig" is a bit strange WRT order:
(Texas Instrument's Beagle) Board info
Select OMAP board (Texas Instrument's Beagle Board) --->
but that could be fixed just by moving the BOARDINFO entry below the
board choice in that file.
was this already discussed and rejected once upon a time? it's not
a big deal but it has the value of being moderately informative.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: any value in allowing user selection of barebox prompt?
2012-02-06 15:57 any value in allowing user selection of barebox prompt? Robert P. J. Day
@ 2012-02-07 9:33 ` Sascha Hauer
2012-02-07 11:13 ` Robert P. J. Day
0 siblings, 1 reply; 4+ messages in thread
From: Sascha Hauer @ 2012-02-07 9:33 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: U-Boot Version 2 (barebox)
On Mon, Feb 06, 2012 at 10:57:22AM -0500, Robert P. J. Day wrote:
>
> making things a bit simpler than my last few posts, is it worth
> making the BOARDINFO prompt string user selectable? if i was going to
> do some customization, it would be nice to have the prompt perhaps
> abbreviate what i'd done.
>
> for instance, if i:
>
> $ make omap3530_beagle_defconfig
>
> i can see how my barebox prompt string is going to be set in
> arch/arm/mach-omap/Kconfig:
>
> config BOARDINFO
> default "Texas Instrument's SDP343x" if MACH_OMAP343xSDP
> default "Texas Instrument's Beagle" if MACH_BEAGLE
> default "Texas Instrument's OMAP3EVM" if MACH_OMAP3EVM
> default "Texas Instrument's Panda" if MACH_PANDA
> default "Phytec phyCORE pcm049" if MACH_PCM049
> default "Phytec phyCARD-A-L1" if MACH_PCAAL1
>
> but if i specifically configure and build for an xM, i'd like the
> prompt to perhaps read:
>
> barebox@Texas Instrument's Beagle xM:/
>
> it's easy enough to do (although it would need to be done on a
> per-machine basis):
>
> config BOARDINFO
> string "Board info"
> default "Texas Instrument's SDP343x" if MACH_OMAP343xSDP
> default "Texas Instrument's Beagle" if MACH_BEAGLE
> default "Texas Instrument's OMAP3EVM" if MACH_OMAP3EVM
> default "Texas Instrument's Panda" if MACH_PANDA
> default "Phytec phyCORE pcm049" if MACH_PCM049
> default "Phytec phyCARD-A-L1" if MACH_PCAAL1
>
> i tried it and it seems to work fine although the aesthetics in
> "make menuconfig" is a bit strange WRT order:
>
> (Texas Instrument's Beagle) Board info
> Select OMAP board (Texas Instrument's Beagle Board) --->
>
> but that could be fixed just by moving the BOARDINFO entry below the
> board choice in that file.
>
> was this already discussed and rejected once upon a time? it's not
> a big deal but it has the value of being moderately informative.
It hasn't been discussed before. It's mostly the way it is because I
did it that way without much thinking. The change you suggest has one
drawback. Consider you do a make menuconfig and change the board.
Currently BOARDINFO correctly changes to the new board, but if we prompt
the user for BOARDINFO the board string will still have the name of the
old board.
I think the board name does not have to come from Kconfig anyway. How
about keeping things in Kconfig how they are but instead of using
CONFIG_BOARDINFO directly we could use a string. This string defaults to
CONFIG_BOARDINFO but can be overwritten by board code by calling a
set_boardinfo(const char *) function. For new boards we could use this
exclusively and maybe convert the existing boards over to it.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: any value in allowing user selection of barebox prompt?
2012-02-07 9:33 ` Sascha Hauer
@ 2012-02-07 11:13 ` Robert P. J. Day
2012-02-07 11:56 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 4+ messages in thread
From: Robert P. J. Day @ 2012-02-07 11:13 UTC (permalink / raw)
To: Sascha Hauer; +Cc: U-Boot Version 2 (barebox)
On Tue, 7 Feb 2012, Sascha Hauer wrote:
> On Mon, Feb 06, 2012 at 10:57:22AM -0500, Robert P. J. Day wrote:
... snip ...
> > i tried it and it seems to work fine although the aesthetics in
> > "make menuconfig" is a bit strange WRT order:
> >
> > (Texas Instrument's Beagle) Board info
> > Select OMAP board (Texas Instrument's Beagle Board) --->
> >
> > but that could be fixed just by moving the BOARDINFO entry below the
> > board choice in that file.
> >
> > was this already discussed and rejected once upon a time? it's not
> > a big deal but it has the value of being moderately informative.
>
> It hasn't been discussed before. It's mostly the way it is because I
> did it that way without much thinking. The change you suggest has
> one drawback. Consider you do a make menuconfig and change the
> board. Currently BOARDINFO correctly changes to the new board, but
> if we prompt the user for BOARDINFO the board string will still have
> the name of the old board.
i'd noticed that but didn't know if there was any way to resolve
it easily.
> I think the board name does not have to come from Kconfig anyway.
> How about keeping things in Kconfig how they are but instead of
> using CONFIG_BOARDINFO directly we could use a string. This string
> defaults to CONFIG_BOARDINFO but can be overwritten by board code by
> calling a set_boardinfo(const char *) function. For new boards we
> could use this exclusively and maybe convert the existing boards
> over to it.
i didn't want to make a big deal of this, i figured if it was
something sufficiently simple, it would be useful.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: any value in allowing user selection of barebox prompt?
2012-02-07 11:13 ` Robert P. J. Day
@ 2012-02-07 11:56 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-02-07 11:56 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: U-Boot Version 2 (barebox)
On 06:13 Tue 07 Feb , Robert P. J. Day wrote:
> On Tue, 7 Feb 2012, Sascha Hauer wrote:
>
> > On Mon, Feb 06, 2012 at 10:57:22AM -0500, Robert P. J. Day wrote:
>
> ... snip ...
>
> > > i tried it and it seems to work fine although the aesthetics in
> > > "make menuconfig" is a bit strange WRT order:
> > >
> > > (Texas Instrument's Beagle) Board info
> > > Select OMAP board (Texas Instrument's Beagle Board) --->
> > >
> > > but that could be fixed just by moving the BOARDINFO entry below the
> > > board choice in that file.
> > >
> > > was this already discussed and rejected once upon a time? it's not
> > > a big deal but it has the value of being moderately informative.
> >
> > It hasn't been discussed before. It's mostly the way it is because I
> > did it that way without much thinking. The change you suggest has
> > one drawback. Consider you do a make menuconfig and change the
> > board. Currently BOARDINFO correctly changes to the new board, but
> > if we prompt the user for BOARDINFO the board string will still have
> > the name of the old board.
>
> i'd noticed that but didn't know if there was any way to resolve
> it easily.
add set support to Kconfig
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-07 12:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-06 15:57 any value in allowing user selection of barebox prompt? Robert P. J. Day
2012-02-07 9:33 ` Sascha Hauer
2012-02-07 11:13 ` Robert P. J. Day
2012-02-07 11:56 ` Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox