[U-Boot] [PATCH 1/2] common: mark commands as default to match "config_cmd_default.h"

Alexey Brodkin Alexey.Brodkin at synopsys.com
Fri Jan 9 21:09:22 CET 2015


Hi Masahiro-san,

On Tue, 2015-01-06 at 00:34 +0900, Masahiro YAMADA wrote:
> Hi Alexey,
>
> 2015-01-03 22:20 GMT+09:00 Alexey Brodkin <Alexey.Brodkin at synopsys.com>:
> > Now when we may select commands via menuconfig let's adjust default
> > settings with "config_cmd_default.h".
> >
> > As the next step we may get rid of "config_cmd_default.h" inclusion in
> > "include/configs/*.h" and "config_cmd_default.h" itself.
> 
> Thanks for working on this, but I think this patch changes the behavior.
> 
> Some boards include <config_cmd_default.h> and then undefine
> unnecessary commands.

> For example, include/configs/snapper9260.h
> 
> #include <config_cmd_default.h>
> #undef CONFIG_CMD_BDI
> #undef CONFIG_CMD_FPGA
> #undef CONFIG_CMD_IMI
> #undef CONFIG_CMD_IMLS
> #undef CONFIG_CMD_LOADS
> #undef CONFIG_CMD_SOURCE
> 
> If you set the default value to "y" in Kconfig,
> it cannot be undef'ed by C-headers.

That's true.
But anyway at some point we'll need to switch selection of commands in
Kconfig, right?

Probably I'm missing details of our Kconfig migration plan if one
exists. Then I'd like to get a reference to the plan so I'm not
attempting to do things that are already scheduled and could be even in
a process of implementation.

Otherwise if there's no current plan for Kconfig migration we may start
discussion on how to deal with "commands" in particular.

The point is commands are low-hanging fruits in terms of Kconfig
migration - there're no extra options and tweaks, once all commands are
added in Kconfig (essentially with dependencies etc) we may clean all
board headers. The only real problem here is amount of work - lots of
headers/defconfigs to patch. But still this is doable.
> >  config CMD_BDI
> >         bool "bdinfo"
> > +       default y
> >         help
> >           Print board info
> 
> 
> This change enables CMD_BDI for all the boards.
> 
> Please notice the following boards do not want to compile this command.
> 
> ./include/configs/dbau1x00.h:#undef CONFIG_CMD_BDI

> > @@ -193,6 +204,7 @@ config CMD_USB
> >
> >  config CMD_FPGA
> >         bool "fpga"
> > +       default y
> >         help
> >           FPGA support.
> 
> Moreover, I doubt some of default commands in <config_cmd_default.h>
> (I have used only some of commands in <config_cmd_default.h>)
> 
> For example, it seems weird to enable CONFIG_CMD_FPGA by default.
> 
> I do not think most of boards have FPGA.

That's a separate topic. I do agree that CMD_FPGA makes not much sense
for most of boards, as well as some others.

And I think during migration process of commands to Kconfig it's a good
time to reconsider default commands.

I will highly appreciate input on both topics from others so we'll do
some progress here and will make sure all parties are happy.

-Alexey


More information about the U-Boot mailing list