select default commands in Kconfig
cover select default commands in Kconfig
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.
But while "config_cmd_default.h" is still there we need to work-around compile-time warnings.
Alexey Brodkin (2):
common: mark commands as default to match "config_cmd_default.h" config_cmd_default.h: wrap each definition in "ifndef"
common/Kconfig | 19 +++++++++++++++++++ include/config_cmd_default.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+)
Signature · 1 line
2.1.0
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
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.
--- common/Kconfig | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
common/Kconfig +19 -0
@@ -24,11 +24,13 @@ menu "Info commands" config CMD_BDI bool "bdinfo" + default y help Print board info config CMD_CONSOLE bool "coninfo" + default y help Print console devices and information.
@@ -43,6 +45,7 @@ menu "Boot commands" config CMD_BOOTD bool "bootd" + default y help Run the command stored in the environment "bootcmd", i.e. "bootd" does the same thing as "run bootcmd".
@@ -61,11 +64,13 @@ config CMD_GO config CMD_RUN bool "run" + default y help Run the command in the given environment variable. config CMD_IMI bool "iminfo" + default y help Print header information for application image.
@@ -76,6 +81,7 @@ config CMD_IMLS config CMD_XIMG bool "imxtract" + default y help Extract a part of a multi-image.
@@ -97,11 +103,13 @@ config CMD_IMPORTENV config CMD_EDITENV bool "editenv" + default y help Edit environment variable. config CMD_SAVEENV bool "saveenv" + default y help Run the command in the given environment variable.
@@ -111,6 +119,7 @@ menu "Memory commands" config CMD_MEMORY bool "md, mm, nm, mw, cp, cmp, base, loop" + default y help Memeory commands. md - memory display
@@ -155,11 +164,13 @@ menu "Device access commands" config CMD_LOADB bool "loadb" + default y help Load a binary file over serial line. config CMD_LOADS bool "loads" + default y help Load an S-Record file over serial line
@@ -193,6 +204,7 @@ config CMD_USB config CMD_FPGA bool "fpga" + default y help FPGA support.
@@ -203,16 +215,19 @@ menu "Shell scripting commands" config CMD_ECHO bool "echo" + default y help Echo args to console config CMD_ITEST bool "itest" + default y help Return true/false on integer compare. config CMD_SOURCE bool "source" + default y help Run script from memory
@@ -222,6 +237,7 @@ menu "Network commands" config CMD_NET bool "bootp, tftpboot" + default y help Network commands. bootp - boot image via network using BOOTP/TFTP protocol
@@ -249,6 +265,7 @@ config CMD_DHCP config CMD_NFS bool "nfs" + default y help Boot image via network using NFS protocol.
@@ -294,6 +311,7 @@ config CMD_TIME # TODO: rename to CMD_SLEEP config CMD_MISC bool "sleep" + default y help Delay execution for some time
@@ -304,6 +322,7 @@ config CMD_TIMER config CMD_SETGETDCR bool "getdcr, setdcr, getidcr, setidcr" + default y depends on 4xx help getdcr - Get an AMCC PPC 4xx DCR's value
Signature · 1 line
2.1.0
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
Hi Alexey,
2015-01-03 22:20 GMT+09:00 Alexey Brodkin <[email protected]>:
Quoted 5 lines
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.
Quoted 12 lines
Signed-off-by Alexey Brodkin <[email protected]>Cc Masahiro Yamada <[email protected]>Cc Tom Rini <[email protected]>--- common/Kconfig | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)common/Kconfig +0
-0
common/Kconfig menu "Info commands" · line 29
Quoted 6 lines
common/Kconfig +1
-0@@ -24,11 +24,13 @@ menu "Info commands" 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 ./include/configs/pb1x00.h:#undef CONFIG_CMD_BDI ./include/configs/at91sam9m10g45ek.h:#undef CONFIG_CMD_BDI ./include/configs/davinci_schmoogie.h:#undef CONFIG_CMD_BDI ./include/configs/meesc.h:#undef CONFIG_CMD_BDI ./include/configs/at91sam9263ek.h:#undef CONFIG_CMD_BDI ./include/configs/usb_a9263.h:#undef CONFIG_CMD_BDI ./include/configs/at91sam9rlek.h:#undef CONFIG_CMD_BDI ./include/configs/taurus.h:#undef CONFIG_CMD_BDI ./include/configs/davinci_sonata.h:#undef CONFIG_CMD_BDI ./include/configs/afeb9260.h:#undef CONFIG_CMD_BDI ./include/configs/at91sam9261ek.h:#undef CONFIG_CMD_BDI ./include/configs/snapper9260.h:#undef CONFIG_CMD_BDI ./include/configs/at91sam9260ek.h:#undef CONFIG_CMD_BDI ./include/configs/tny_a9260.h:#undef CONFIG_CMD_BDI ./include/configs/ethernut5.h:#undef CONFIG_CMD_BDI ./include/configs/davinci_dvevm.h:#undef CONFIG_CMD_BDI ./include/configs/davinci_dm355leopard.h:#undef CONFIG_CMD_BDI ./include/configs/davinci_sffsdr.h:#undef CONFIG_CMD_BDI ./include/configs/davinci_dm6467evm.h:#undef CONFIG_CMD_BDI ./include/configs/vct.h:#undef CONFIG_CMD_BDI ./include/configs/vl_ma2sc.h:#undef CONFIG_CMD_BDI ./include/configs/corvus.h:#undef CONFIG_CMD_BDI ./include/configs/sbc35_a9g20.h:#undef CONFIG_CMD_BDI ./include/configs/pm9261.h:#undef CONFIG_CMD_BDI ./include/configs/davinci_dm355evm.h:#undef CONFIG_CMD_BDI ./include/configs/pm9263.h:#undef CONFIG_CMD_BDI ./include/configs/davinci_dm365evm.h:#undef CONFIG_CMD_BDI ./include/configs/cpu9260.h:#undef CONFIG_CMD_BDI ./include/configs/jadecpu.h:#undef CONFIG_CMD_BDI
common/Kconfig config CMD_USB · line 209
Quoted 7 lines
common/Kconfig +1
-0@@ -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.
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
Hi Masahiro-san,
Quoted 24 lines · Masahiro YAMADA
Hi Alexey,
2015-01-03 22:20 GMT+09:00 Alexey Brodkin <[email protected]>:
Quoted 5 lines
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>
#undefCONFIG_CMD_BDI
#undefCONFIG_CMD_FPGA
#undefCONFIG_CMD_IMI
#undefCONFIG_CMD_IMLS
#undefCONFIG_CMD_LOADS
#undefCONFIG_CMD_SOURCE
Quoted 2 lines
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.
Quoted 24 lines
Quoted 5 lines
config
CMD_BDI
bool "bdinfo"
+ default y
help
Print board infoThis change enables
CMD_BDIfor all the boards.Please notice the following boards do not want to compile this command.
./include/configs/dbau1x00.h:#undef
CONFIG_CMD_BDIcommon/Kconfig config CMD_USB · line 209
Quoted 7 lines
common/Kconfig +1
-0@@ -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>)
Quoted 3 lines
For example, it seems weird to enable
CONFIG_CMD_FPGAby 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
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
Hi Alexey,
Quoted 27 lines · On Fri, 9 Jan 2015 20:09:22 +0000 Alexey Brodkin <[email protected]>…
Hi Masahiro-san,
Quoted 24 lines · Masahiro YAMADA
Hi Alexey,
2015-01-03 22:20 GMT+09:00 Alexey Brodkin <[email protected]>:
Quoted 5 lines
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>
#undefCONFIG_CMD_BDI
#undefCONFIG_CMD_FPGA
#undefCONFIG_CMD_IMI
#undefCONFIG_CMD_IMLS
#undefCONFIG_CMD_LOADS
#undefCONFIG_CMD_SOURCE
Quoted 6 lines
Quoted 2 lines
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 inKconfig, right?
Yes.
Quoted 6 lines
Probably I'm missing details of our
Kconfigmigration 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 forKconfigmigration we may start discussion on how to deal with "commands" in particular.
I proposed the following way, but no big conversion movement has happened yet.
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/199965/focus=200089
If you have an idea, please propose it.
Kconfig conversion is a too big task to be done by a single indivisual. Any suggestion, any form of contribution is very appreciated.
I personally keep away from any global changes until non-generic boards are dumped.
As Tom said in the following mail,
http://lists.denx.de/pipermail/u-boot/2015-January/201032.html
we are going to remove lots of boards.
I do not want to make extra efforts on non-generic boards.
Quoted 5 lines
The point is commands are low-hanging fruits in terms of
Kconfigmigration - there're no extra options and tweaks, once all commands are added inKconfig(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.
I realized one problem when I was doing this task
for my boards in commit 25e274e20208.
The defconfigs of my boards are almost the same:
(configs/ph1_ld4_defconfig, configs/ph1_pro4_defconfig, configs/ph1_sld8_defconfig)
What is inconvenient as for defconfig is that it does not support "include" directive like C headers.
People generally like to add CONFIG_CMD_* to a common header file such as include/configs/tegra-common.h
On the other hand, on defconfig, we must touch each defconfig of the board family.
I have not been able to decide right direction to solve this issue.
I think we need to discuss about how to live with lots of defconfigs.
Quoted 26 lines
Quoted 26 lines
Quoted 5 lines
config
CMD_BDI
bool "bdinfo"
+ default y
help
Print board infoThis change enables
CMD_BDIfor all the boards.Please notice the following boards do not want to compile this command.
./include/configs/dbau1x00.h:#undef
CONFIG_CMD_BDIcommon/Kconfig config CMD_USB · line 209
Quoted 7 lines
common/Kconfig +1
-0@@ -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_FPGAby default.
Quoted 7 lines
Quoted 1 line
I do not think most of boards have FPGA.
That's a separate topic. I do agree that
CMD_FPGAmakes not much sense for most of boards, as well as some others.And I think during migration process of commands to
Kconfigit's a good time to reconsider default commands.
Agree.
We should reconsider the default.
In my opition, most of the ones in config_cmd_default.h are not default commands.
Quoted 4 lines
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
Best Regards
Masahiro Yamada
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
HI Masahiro,
Quoted 89 lines · Masahiro Yamada
Hi Alexey,
Quoted 27 lines · On Fri, 9 Jan 2015 20:09:22 +0000 Alexey Brodkin <[email protected]>…
Hi Masahiro-san,
Quoted 24 lines · Masahiro YAMADA
Hi Alexey,
2015-01-03 22:20 GMT+09:00 Alexey Brodkin <[email protected]>:
Quoted 5 lines
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>
#undefCONFIG_CMD_BDI
#undefCONFIG_CMD_FPGA
#undefCONFIG_CMD_IMI
#undefCONFIG_CMD_IMLS
#undefCONFIG_CMD_LOADS
#undefCONFIG_CMD_SOURCEQuoted 6 lines
Quoted 2 lines
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 inKconfig, right?Yes.
Quoted 6 lines
Probably I'm missing details of our
Kconfigmigration 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 forKconfigmigration we may start discussion on how to deal with "commands" in particular.I proposed the following way, but no big conversion movement has happened yet.
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/199965/focus=200089If you have an idea, please propose it.
Kconfigconversion is a too big task to be done by a single indivisual. Any suggestion, any form of contribution is very appreciated.I personally keep away from any global changes until non-generic boards are dumped.
As Tom said in the following mail,
http://lists.denx.de/pipermail/u-boot/2015-January/201032.html
we are going to remove lots of boards.I do not want to make extra efforts on non-generic boards.
Quoted 5 lines
The point is commands are low-hanging fruits in terms of
Kconfigmigration - there're no extra options and tweaks, once all commands are added inKconfig(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.I realized one problem when I was doing this task
for my boards in commit25e274e20208.The defconfigs of my boards are almost the same:
(configs/ph1_ld4_defconfig, configs/ph1_pro4_defconfig, configs/ph1_sld8_defconfig)What is inconvenient as for defconfig is that it does not support "include" directive like C headers.
Quoted 8 lines
People generally like to add CONFIG_CMD_* to a common header file such as
include/configs/tegra-common.hOn the other hand, on defconfig, we must touch each defconfig of the board family.
I have not been able to decide right direction to solve this issue.
I think we need to discuss about how to live with lots of defconfigs.
How about this:
1. Support an 'include' option in defconfig to include another file. This could take the form of CONFIG_DEFCONFIG_INCLUDES (comma-separated list of filenames). Don't allow nested includes - this CONFIG provides a complete list of includes.
2. When you use menuconfig to edit the config, it ignores the include and just writes out everything. Then it runs a simple script which parses the include files, and adjusts the file so that things in the includes are not repeated in the defconfig.
I think this scheme would be good enough, but can probably be improved. At least it would be better than what we have.
Or we could instead define particular includes for different purposes:
- Arch
- SOC
- SOC Vendor
- Board vendor
- Board family
We could then require that standard filenames are used, and search for the correct file based on the SOC/board/vendor setting, etc.
As an example, for trimslice, we could search for arm.h, tegra.h, nvidia.h, compulab.h, some_family_name.h.
This is less flexible though.
Quoted 34 lines
Quoted 34 lines
Quoted 27 lines
Quoted 8 lines
config
CMD_BDI
bool "bdinfo"
+ default y
help
Print board infoThis change enables
CMD_BDIfor all the boards.Please notice the following boards do not want to compile this command.
./include/configs/dbau1x00.h:#undef
CONFIG_CMD_BDIcommon/Kconfig config CMD_USB · line 209
Quoted 7 lines
common/Kconfig +1
-0@@ -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>)Quoted 3 lines
For example, it seems weird to enable
CONFIG_CMD_FPGAby default.I do not think most of boards have FPGA.
That's a separate topic. I do agree that
CMD_FPGAmakes not much sense for most of boards, as well as some others.
Quoted 13 lines
Quoted 2 lines
And I think during migration process of commands to
Kconfigit's a good time to reconsider default commands.Agree.
We should reconsider the default.
In my opition, most of the ones inconfig_cmd_default.hare not default commands.Quoted 4 lines
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
Regards,
Simon
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
Hi Simon, Masahiro-san,
Quoted 9 lines · Simon Glass
Quoted 9 lines
Quoted 7 lines
Probably I'm missing details of our
Kconfigmigration 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 forKconfigmigration we may start discussion on how to deal with "commands" in particular.
Quoted 4 lines
Quoted 4 lines
I proposed the following way, but no big conversion movement has happened yet.
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/199965/focus=200089If you have an idea, please propose it.
Unfortunately I cannot open this link - I see "Connection to 80.91.229.5 failed". Do you mind to provide a link for the same message in
http://lists.denx.de ?
Quoted 2 lines
Quoted 2 lines
Kconfigconversion is a too big task to be done by a single indivisual. Any suggestion, any form of contribution is very appreciated.
Indeed and that stops me from starting this work as well. So my point is:
1) anybody may do updates to Kconfig like add more U-Boot commands,
some settings (CONFIG_SYS_xxx)
2) board maintainers are responsible for updates in defconfigs and
corresponding headers in "include/configs/"
3) that would be helpful if at (1) board maintainers are notified via
direct emails on the change that has been done
Quoted 8 lines
Quoted 8 lines
I personally keep away from any global changes until non-generic boards are dumped.
As Tom said in the following mail,
http://lists.denx.de/pipermail/u-boot/2015-January/201032.html
we are going to remove lots of boards.I do not want to make extra efforts on non-generic boards.
That makes sense but why don't we start implementation of changes in good boards we know already converted to "generic"? There're even entire arches that switched to "generic boards".
Quoted 47 lines
Quoted 16 lines
Quoted 5 lines
The point is commands are low-hanging fruits in terms of
Kconfigmigration - there're no extra options and tweaks, once all commands are added inKconfig(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.I realized one problem when I was doing this task
for my boards in commit25e274e20208.The defconfigs of my boards are almost the same:
(configs/ph1_ld4_defconfig, configs/ph1_pro4_defconfig, configs/ph1_sld8_defconfig)What is inconvenient as for defconfig is that it does not support "include" directive like C headers.
Quoted 8 lines
People generally like to add CONFIG_CMD_* to a common header file such as
include/configs/tegra-common.hOn the other hand, on defconfig, we must touch each defconfig of the board family.
I have not been able to decide right direction to solve this issue.
I think we need to discuss about how to live with lots of defconfigs.
How about this:
1. Support an 'include' option in defconfig to include another file. This could take the form of
CONFIG_DEFCONFIG_INCLUDES(comma-separated list of filenames). Don't allow nested includes - this CONFIG provides a complete list of includes.
2. When you use menuconfig to edit the config, it ignores the include and just writes out everything. Then it runs a simple script which parses the include files, and adjusts the file so that things in the includes are not repeated in the defconfig.I think this scheme would be good enough, but can probably be improved. At least it would be better than what we have.
Or we could instead define particular includes for different purposes:
- Arch
- SOC
- SOC Vendor
- Board vendor
- Board family
Quoted 7 lines
We could then require that standard filenames are used, and search for the correct file based on the SOC/board/vendor setting, etc.
As an example, for trimslice, we could search for
arm.h,tegra.h,nvidia.h,compulab.h,some_family_name.h.This is less flexible though.
Frankly I don't like this approach with post-processing steps. It will inevitably end-up with messed up configs.
Why don't we just use default values in Kconfig for ARCH/SOC/Board? It's pretty obvious that 1 board may have N flavors but then have a baseline options selected in "board/vendor/board_name/Kconfig" and only put options that differ between boards in your defconfigs.
This way "savedefconfig" will automatically strip down all extra lines for a particular board.
This is how things work in Linux kernel and Buildroot Kconfig-based build systems. Probably I'm missing something here because U-Boot differs from mentioned projects in some aspects - if so please correct me.
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
That's a separate topic. I do agree that
CMD_FPGAmakes not much sense for most of boards, as well as some others.And I think during migration process of commands to
Kconfigit's a good time to reconsider default commands.Agree.
We should reconsider the default.
In my opition, most of the ones inconfig_cmd_default.hare not default commands.
Right but if we expect to switch to Kconfig solely for commands selection we may not care much about contents of "config_cmd_default.h" assuming it will go away sometime soon.
Probably we may just focus on:
1. Add all existing commands in Kconfig
2. Select very few of them to be globally default
(1) is pretty simple and anybody may do it if time permits
(2) requires wide discussion
But what's really nice with Kconfig is its "savedefconfig". So we may not set any commands as globally default and let every architecture, board or defconfig to select really required options.
Then once any option is marked as global (or even arch or board) default in a matter of simple script that does "make XXX_defconfig && make savedefconfig && mv defconfig configs/XXX_defconfig" all relevant defconfigs will be correctly updated (default options will be stripped out).
-Alexey
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
Hi,
Quoted 110 lines · Alexey Brodkin
Hi Simon, Masahiro-san,
Quoted 9 lines · Simon Glass
Quoted 9 lines
Quoted 7 lines
Probably I'm missing details of our
Kconfigmigration 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 forKconfigmigration we may start discussion on how to deal with "commands" in particular.Quoted 4 lines
Quoted 4 lines
I proposed the following way, but no big conversion movement has happened yet.
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/199965/focus=200089If you have an idea, please propose it.
Unfortunately I cannot open this link - I see "Connection to 80.91.229.5 failed". Do you mind to provide a link for the same message in
http://lists.denx.de ?Quoted 2 lines
Quoted 2 lines
Kconfigconversion is a too big task to be done by a single indivisual. Any suggestion, any form of contribution is very appreciated.Indeed and that stops me from starting this work as well. So my point is:
1) anybody may do updates toKconfiglike add more U-Boot commands,
some settings (CONFIG_SYS_xxx)
2) board maintainers are responsible for updates in defconfigs and
corresponding headers in "include/configs/"
3) that would be helpful if at (1) board maintainers are notified via
direct emails on the change that has been doneQuoted 8 lines
Quoted 8 lines
I personally keep away from any global changes until non-generic boards are dumped.
As Tom said in the following mail,
http://lists.denx.de/pipermail/u-boot/2015-January/201032.html
we are going to remove lots of boards.I do not want to make extra efforts on non-generic boards.
That makes sense but why don't we start implementation of changes in good boards we know already converted to "generic"? There're even entire arches that switched to "generic boards".
Quoted 47 lines
Quoted 16 lines
Quoted 5 lines
The point is commands are low-hanging fruits in terms of
Kconfigmigration - there're no extra options and tweaks, once all commands are added inKconfig(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.I realized one problem when I was doing this task
for my boards in commit25e274e20208.The defconfigs of my boards are almost the same:
(configs/ph1_ld4_defconfig, configs/ph1_pro4_defconfig, configs/ph1_sld8_defconfig)What is inconvenient as for defconfig is that it does not support "include" directive like C headers.
Quoted 8 lines
People generally like to add CONFIG_CMD_* to a common header file such as
include/configs/tegra-common.hOn the other hand, on defconfig, we must touch each defconfig of the board family.
I have not been able to decide right direction to solve this issue.
I think we need to discuss about how to live with lots of defconfigs.
How about this:
1. Support an 'include' option in defconfig to include another file. This could take the form of
CONFIG_DEFCONFIG_INCLUDES(comma-separated list of filenames). Don't allow nested includes - this CONFIG provides a complete list of includes.
2. When you use menuconfig to edit the config, it ignores the include and just writes out everything. Then it runs a simple script which parses the include files, and adjusts the file so that things in the includes are not repeated in the defconfig.I think this scheme would be good enough, but can probably be improved. At least it would be better than what we have.
Or we could instead define particular includes for different purposes:
- Arch
- SOC
- SOC Vendor
- Board vendor
- Board familyQuoted 7 lines
We could then require that standard filenames are used, and search for the correct file based on the SOC/board/vendor setting, etc.
As an example, for trimslice, we could search for
arm.h,tegra.h,nvidia.h,compulab.h,some_family_name.h.This is less flexible though.
Frankly I don't like this approach with post-processing steps. It will inevitably end-up with messed up configs.
Why don't we just use default values in
Kconfigfor ARCH/SOC/Board? It's pretty obvious that 1 board may have N flavors but then have a baseline options selected in "board/vendor/board_name/Kconfig" and only put options that differ between boards in your defconfigs.
Quoted 7 lines
This way "savedefconfig" will automatically strip down all extra lines for a particular board.
This is how things work in Linux kernel and Buildroot Kconfig-based build systems. Probably I'm missing something here because U-Boot differs from mentioned projects in some aspects - if so please correct me.
I started with this approach and Masahiro was not very keen on it. I'm OK with it, particularly as it is already supported, but I wonder whether we can do better.
I notice that some kernel distributions have a script which pulls out common kernel configs in a separate file (e.g. for ARM, or for Tegra) for checking into source control, then combine them again for the kernel. This suggests that others have this problem too. It does seem like a convenient feature to be able to have some sort of hierarchy of config.
Re messed-up configs, what will mess up? We can make it part of writing the config, perhaps.
Quoted 27 lines
Quoted 11 lines
Quoted 11 lines
Quoted 7 lines
That's a separate topic. I do agree that
CMD_FPGAmakes not much sense for most of boards, as well as some others.And I think during migration process of commands to
Kconfigit's a good time to reconsider default commands.Agree.
We should reconsider the default.
In my opition, most of the ones inconfig_cmd_default.hare not default commands.Right but if we expect to switch to
Kconfigsolely for commands selection we may not care much about contents of "config_cmd_default.h" assuming it will go away sometime soon.Probably we may just focus on:
1. Add all existing commands inKconfig
2. Select very few of them to be globally default(1) is pretty simple and anybody may do it if time permits
(2) requires wide discussionBut what's really nice with
Kconfigis its "savedefconfig". So we may not set any commands as globally default and let every architecture, board or defconfig to select really required options.
Quoted 5 lines
Then once any option is marked as global (or even arch or board) default in a matter of simple script that does "make
XXX_defconfig&& make savedefconfig && mv defconfig configs/XXX_defconfig" all relevant defconfigs will be correctly updated (default options will be stripped out).
Yes, it would be great to get all command configs into Kconfig.
I wonder if we need a script which automates the conversion? The header file includes in the include/configs/... files makes this non-trivial. But if we had a script which could take a CONFIG as a parameter, remove it from all config headers, and add it to relevant defconfigs, it would be very useful.
Regards,
Simon
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
Hi
2015-01-15 23:46 GMT+09:00 Simon Glass <[email protected]>:
Quoted 116 lines
Hi,
Quoted 113 lines · Alexey Brodkin
Hi Simon, Masahiro-san,
Quoted 9 lines · Simon Glass
Quoted 9 lines
Quoted 7 lines
Probably I'm missing details of our
Kconfigmigration 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 forKconfigmigration we may start discussion on how to deal with "commands" in particular.Quoted 4 lines
Quoted 4 lines
I proposed the following way, but no big conversion movement has happened yet.
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/199965/focus=200089If you have an idea, please propose it.
Unfortunately I cannot open this link - I see "Connection to 80.91.229.5 failed". Do you mind to provide a link for the same message in
http://lists.denx.de ?Quoted 2 lines
Quoted 2 lines
Kconfigconversion is a too big task to be done by a single indivisual. Any suggestion, any form of contribution is very appreciated.Indeed and that stops me from starting this work as well. So my point is:
1) anybody may do updates toKconfiglike add more U-Boot commands,
some settings (CONFIG_SYS_xxx)
2) board maintainers are responsible for updates in defconfigs and
corresponding headers in "include/configs/"
3) that would be helpful if at (1) board maintainers are notified via
direct emails on the change that has been doneQuoted 8 lines
Quoted 8 lines
I personally keep away from any global changes until non-generic boards are dumped.
As Tom said in the following mail,
http://lists.denx.de/pipermail/u-boot/2015-January/201032.html
we are going to remove lots of boards.I do not want to make extra efforts on non-generic boards.
That makes sense but why don't we start implementation of changes in good boards we know already converted to "generic"? There're even entire arches that switched to "generic boards".
Quoted 47 lines
Quoted 16 lines
Quoted 5 lines
The point is commands are low-hanging fruits in terms of
Kconfigmigration - there're no extra options and tweaks, once all commands are added inKconfig(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.I realized one problem when I was doing this task
for my boards in commit25e274e20208.The defconfigs of my boards are almost the same:
(configs/ph1_ld4_defconfig, configs/ph1_pro4_defconfig, configs/ph1_sld8_defconfig)What is inconvenient as for defconfig is that it does not support "include" directive like C headers.
Quoted 8 lines
People generally like to add CONFIG_CMD_* to a common header file such as
include/configs/tegra-common.hOn the other hand, on defconfig, we must touch each defconfig of the board family.
I have not been able to decide right direction to solve this issue.
I think we need to discuss about how to live with lots of defconfigs.
How about this:
1. Support an 'include' option in defconfig to include another file. This could take the form of
CONFIG_DEFCONFIG_INCLUDES(comma-separated list of filenames). Don't allow nested includes - this CONFIG provides a complete list of includes.
2. When you use menuconfig to edit the config, it ignores the include and just writes out everything. Then it runs a simple script which parses the include files, and adjusts the file so that things in the includes are not repeated in the defconfig.I think this scheme would be good enough, but can probably be improved. At least it would be better than what we have.
Or we could instead define particular includes for different purposes:
- Arch
- SOC
- SOC Vendor
- Board vendor
- Board familyQuoted 7 lines
We could then require that standard filenames are used, and search for the correct file based on the SOC/board/vendor setting, etc.
As an example, for trimslice, we could search for
arm.h,tegra.h,nvidia.h,compulab.h,some_family_name.h.This is less flexible though.
Frankly I don't like this approach with post-processing steps. It will inevitably end-up with messed up configs.
Why don't we just use default values in
Kconfigfor ARCH/SOC/Board? It's pretty obvious that 1 board may have N flavors but then have a baseline options selected in "board/vendor/board_name/Kconfig" and only put options that differ between boards in your defconfigs.This way "savedefconfig" will automatically strip down all extra lines for a particular board.
Quoted 8 lines
Quoted 4 lines
This is how things work in Linux kernel and Buildroot Kconfig-based build systems. Probably I'm missing something here because U-Boot differs from mentioned projects in some aspects - if so please correct me.
I started with this approach and Masahiro was not very keen on it. I'm OK with it, particularly as it is already supported, but I wonder whether we can do better.
Honestly, I do not like baseline options in board-Kconfig very much. The advantage is that it works without any change.
What I suggested before was to use scripts/kconfig/merge_config.sh.
For example, put the SoC baseline options into tegra30_defconfig. Put the difference from that into tegra30_(board).config For example,
make tegra30_defconfig tegra30_seaboard.config
make tegra30_defconfig tegra30_trimslice.configThe disadvantage is that we would have to input more for the configuration and has some impact on other projects such as BuildRoot...
Another option is "multi-image".
Actually barebox adopted this solution to solve the increasing defconfig problem.
In barebox, for example, all the Tegra boards share a single defconfig, "tegra_v7_defconfig"
tegra_v7_defconfig creates images for beaver, jetson, colibri, ac100, ...
It takes advantage of Device Tree configuration and garbage collection. So, it generates multipule images without increasing memory foot-print.
Quoted 9 lines
I notice that some kernel distributions have a script which pulls out common kernel configs in a separate file (e.g. for ARM, or for Tegra) for checking into source control, then combine them again for the kernel. This suggests that others have this problem too. It does seem like a convenient feature to be able to have some sort of hierarchy of config.
Re messed-up configs, what will mess up? We can make it part of writing the config, perhaps.
The hierarchical config strategy makes "savedefconfig" difficult , I think.
Quoted 33 lines
Quoted 27 lines
Quoted 11 lines
Quoted 11 lines
Quoted 7 lines
That's a separate topic. I do agree that
CMD_FPGAmakes not much sense for most of boards, as well as some others.And I think during migration process of commands to
Kconfigit's a good time to reconsider default commands.Agree.
We should reconsider the default.
In my opition, most of the ones inconfig_cmd_default.hare not default commands.Right but if we expect to switch to
Kconfigsolely for commands selection we may not care much about contents of "config_cmd_default.h" assuming it will go away sometime soon.Probably we may just focus on:
1. Add all existing commands inKconfig
2. Select very few of them to be globally default(1) is pretty simple and anybody may do it if time permits
(2) requires wide discussionBut what's really nice with
Kconfigis its "savedefconfig". So we may not set any commands as globally default and let every architecture, board or defconfig to select really required options.Quoted 5 lines
Then once any option is marked as global (or even arch or board) default in a matter of simple script that does "make
XXX_defconfig&& make savedefconfig && mv defconfig configs/XXX_defconfig" all relevant defconfigs will be correctly updated (default options will be stripped out).
Quoted 7 lines
Yes, it would be great to get all command configs into
Kconfig.I wonder if we need a script which automates the conversion? The header file includes in the
include/configs/... files makes this non-trivial. But if we had a script which could take a CONFIG as a parameter, remove it from all config headers, and add it to relevant defconfigs, it would be very useful.
I have a Python script that moves each CONFIG from header files to defconfig files.
I wrote it for my local use, so it might not be very clean.
If necessary, I can share it on ML.
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
Hi Masahiro,
Quoted 138 lines · Masahiro YAMADA
Hi
2015-01-15 23:46 GMT+09:00 Simon Glass <[email protected]>:
Quoted 116 lines
Hi,
Quoted 113 lines · Alexey Brodkin
Hi Simon, Masahiro-san,
Quoted 9 lines · Simon Glass
Quoted 9 lines
Quoted 7 lines
Probably I'm missing details of our
Kconfigmigration 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 forKconfigmigration we may start discussion on how to deal with "commands" in particular.Quoted 4 lines
Quoted 4 lines
I proposed the following way, but no big conversion movement has happened yet.
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/199965/focus=200089If you have an idea, please propose it.
Unfortunately I cannot open this link - I see "Connection to 80.91.229.5 failed". Do you mind to provide a link for the same message in
http://lists.denx.de ?Quoted 2 lines
Quoted 2 lines
Kconfigconversion is a too big task to be done by a single indivisual. Any suggestion, any form of contribution is very appreciated.Indeed and that stops me from starting this work as well. So my point is:
1) anybody may do updates toKconfiglike add more U-Boot commands,
some settings (CONFIG_SYS_xxx)
2) board maintainers are responsible for updates in defconfigs and
corresponding headers in "include/configs/"
3) that would be helpful if at (1) board maintainers are notified via
direct emails on the change that has been doneQuoted 8 lines
Quoted 8 lines
I personally keep away from any global changes until non-generic boards are dumped.
As Tom said in the following mail,
http://lists.denx.de/pipermail/u-boot/2015-January/201032.html
we are going to remove lots of boards.I do not want to make extra efforts on non-generic boards.
That makes sense but why don't we start implementation of changes in good boards we know already converted to "generic"? There're even entire arches that switched to "generic boards".
Quoted 47 lines
Quoted 16 lines
Quoted 5 lines
The point is commands are low-hanging fruits in terms of
Kconfigmigration - there're no extra options and tweaks, once all commands are added inKconfig(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.I realized one problem when I was doing this task
for my boards in commit25e274e20208.The defconfigs of my boards are almost the same:
(configs/ph1_ld4_defconfig, configs/ph1_pro4_defconfig, configs/ph1_sld8_defconfig)What is inconvenient as for defconfig is that it does not support "include" directive like C headers.
Quoted 8 lines
People generally like to add CONFIG_CMD_* to a common header file such as
include/configs/tegra-common.hOn the other hand, on defconfig, we must touch each defconfig of the board family.
I have not been able to decide right direction to solve this issue.
I think we need to discuss about how to live with lots of defconfigs.
How about this:
1. Support an 'include' option in defconfig to include another file. This could take the form of
CONFIG_DEFCONFIG_INCLUDES(comma-separated list of filenames). Don't allow nested includes - this CONFIG provides a complete list of includes.
2. When you use menuconfig to edit the config, it ignores the include and just writes out everything. Then it runs a simple script which parses the include files, and adjusts the file so that things in the includes are not repeated in the defconfig.I think this scheme would be good enough, but can probably be improved. At least it would be better than what we have.
Or we could instead define particular includes for different purposes:
- Arch
- SOC
- SOC Vendor
- Board vendor
- Board familyQuoted 7 lines
We could then require that standard filenames are used, and search for the correct file based on the SOC/board/vendor setting, etc.
As an example, for trimslice, we could search for
arm.h,tegra.h,nvidia.h,compulab.h,some_family_name.h.This is less flexible though.
Frankly I don't like this approach with post-processing steps. It will inevitably end-up with messed up configs.
Why don't we just use default values in
Kconfigfor ARCH/SOC/Board? It's pretty obvious that 1 board may have N flavors but then have a baseline options selected in "board/vendor/board_name/Kconfig" and only put options that differ between boards in your defconfigs.This way "savedefconfig" will automatically strip down all extra lines for a particular board.
Quoted 8 lines
Quoted 4 lines
This is how things work in Linux kernel and Buildroot Kconfig-based build systems. Probably I'm missing something here because U-Boot differs from mentioned projects in some aspects - if so please correct me.
I started with this approach and Masahiro was not very keen on it. I'm OK with it, particularly as it is already supported, but I wonder whether we can do better.
Honestly, I do not like baseline options in board-Kconfig very much. The advantage is that it works without any change.
What I suggested before was to use
scripts/kconfig/merge_config.sh.For example, put the SoC baseline options into
tegra30_defconfig. Put the difference from that into tegra30_(board).config For example,
Quoted 5 lines
make tegra30_defconfig tegra30_seaboard.config make tegra30_defconfig tegra30_trimslice.configThe disadvantage is that we would have to input more for the configuration and has some impact on other projects such as BuildRoot...
Is there any way that tegra30_seaboard could include tegra30 automatically?
Quoted 7 lines
Another option is "multi-image".
Actually barebox adopted this solution to solve the increasing defconfig problem.
Quoted 8 lines
In barebox, for example, all the Tegra boards share a single defconfig, "
tegra_v7_defconfig"
tegra_v7_defconfigcreates images for beaver, jetson, colibri, ac100, ...It takes advantage of Device Tree configuration and garbage collection. So, it generates multipule images without increasing memory foot-print.
I've been keen on that approach and have taken some steps for Tegra and Exynos. Exynos is actually not to far away, but Tegra 124 pinmux approach makes this hard.
Still I think this is the best solution - fewer boards to build also.
Quoted 10 lines
Quoted 10 lines
I notice that some kernel distributions have a script which pulls out common kernel configs in a separate file (e.g. for ARM, or for Tegra) for checking into source control, then combine them again for the kernel. This suggests that others have this problem too. It does seem like a convenient feature to be able to have some sort of hierarchy of config.
Quoted 5 lines
Quoted 2 lines
Re messed-up configs, what will mess up? We can make it part of writing the config, perhaps.
The hierarchical config strategy makes "savedefconfig" difficult , I think.
I never said it would be easy. Kconfig wasn't easy.
Quoted 43 lines
Quoted 35 lines
Quoted 29 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
That's a separate topic. I do agree that
CMD_FPGAmakes not much sense for most of boards, as well as some others.Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
And I think during migration process of commands to
Kconfigit's a good time to reconsider default commands.Agree.
We should reconsider the default.
In my opition, most of the ones inconfig_cmd_default.hare not default commands.Right but if we expect to switch to
Kconfigsolely for commands selection we may not care much about contents of "config_cmd_default.h" assuming it will go away sometime soon.Probably we may just focus on:
1. Add all existing commands inKconfig
2. Select very few of them to be globally default(1) is pretty simple and anybody may do it if time permits
(2) requires wide discussionBut what's really nice with
Kconfigis its "savedefconfig". So we may not set any commands as globally default and let every architecture, board or defconfig to select really required options.Quoted 5 lines
Then once any option is marked as global (or even arch or board) default in a matter of simple script that does "make
XXX_defconfig&& make savedefconfig && mv defconfig configs/XXX_defconfig" all relevant defconfigs will be correctly updated (default options will be stripped out).Quoted 7 lines
Yes, it would be great to get all command configs into
Kconfig.I wonder if we need a script which automates the conversion? The header file includes in the
include/configs/... files makes this non-trivial. But if we had a script which could take a CONFIG as a parameter, remove it from all config headers, and add it to relevant defconfigs, it would be very useful.
Quoted 7 lines
I have a Python script that moves each CONFIG from header files to defconfig files.
I wrote it for my local use, so it might not be very clean.
If necessary, I can share it on ML.
Yes please!
- Simon
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
Hi Simon, Masahiro-san,
Quoted 16 lines · Simon Glass
Hi Masahiro,
Quoted 15 lines
Honestly, I do not like baseline options in board-Kconfig very much. The advantage is that it works without any change.
What I suggested before was to use
scripts/kconfig/merge_config.sh.For example, put the SoC baseline options into
tegra30_defconfig. Put the difference from that into tegra30_(board).config For example,make tegra30_defconfig tegra30_seaboard.config make tegra30_defconfig tegra30_trimslice.configThe disadvantage is that we would have to input more for the configuration and has some impact on other projects such as BuildRoot...
Are you saying this approach really works?
I mean "make tegra30_defconfig tegra30_seaboard.config".
Anyway I don't really like to change behavior of things people used to use. It will produce a lot of confusion instead of convenience of well-known tool.
Quoted 10 lines
Quoted 9 lines
In barebox, for example, all the Tegra boards share a single defconfig, "
tegra_v7_defconfig"
tegra_v7_defconfigcreates images for beaver, jetson, colibri, ac100, ...It takes advantage of Device Tree configuration and garbage collection. So, it generates multipule images without increasing memory foot-print.
Quoted 5 lines
I've been keen on that approach and have taken some steps for Tegra and Exynos. Exynos is actually not to far away, but Tegra 124 pinmux approach makes this hard.
Still I think this is the best solution - fewer boards to build also.
I do like this approach as well.
But there will be pitfalls.
Imagine there's say a driver for Ethernet controller which is used on MyBoard1 and MyBoard2. One board may use DMA/Phylib/caches and another doesn't use either of options I listed.
This means we need to build 2 instances of the driver, because options that I listed could not be built as extensions to some basic driver. You may think of it like compilation with different flags.
Another good example which will inevitable hit me with proposed solution
- some of our boards have either replaceable CPU tile or FPGA instead of real silicon CPU. It means that the same one board (read peripherals) could be driven by different CPUs. I mean not only variations of one core (in this case we may build for some base-line configuration of CPU so it will run on all more advanced cores) but it could be binary-incompatible CPUs. It means we'll need to re-build everything (sic!) for each board.
Still I'm not saying anything against proposed "multibuild" approach - I do like it, but we need to understand if it may satisfy all of our requirements. Or what will be overheads if we decide to go this way. Probably in my case with binary-incompatible cores the simplest solution will be 2 defconfigs which only differ in CPU version selection.
-Alexey
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
Hi Alexey,
Quoted 46 lines · Alexey Brodkin
Hi Simon, Masahiro-san,
Quoted 16 lines · Simon Glass
Hi Masahiro,
Quoted 15 lines
Honestly, I do not like baseline options in board-Kconfig very much. The advantage is that it works without any change.
What I suggested before was to use
scripts/kconfig/merge_config.sh.For example, put the SoC baseline options into
tegra30_defconfig. Put the difference from that into tegra30_(board).config For example,make tegra30_defconfig tegra30_seaboard.config make tegra30_defconfig tegra30_trimslice.configThe disadvantage is that we would have to input more for the configuration and has some impact on other projects such as BuildRoot...
Are you saying this approach really works?
I mean "maketegra30_defconfigtegra30_seaboard.config".Anyway I don't really like to change behavior of things people used to use. It will produce a lot of confusion instead of convenience of well-known tool.
Quoted 10 lines
Quoted 9 lines
In barebox, for example, all the Tegra boards share a single defconfig, "
tegra_v7_defconfig"
tegra_v7_defconfigcreates images for beaver, jetson, colibri, ac100, ...It takes advantage of Device Tree configuration and garbage collection. So, it generates multipule images without increasing memory foot-print.
Quoted 5 lines
I've been keen on that approach and have taken some steps for Tegra and Exynos. Exynos is actually not to far away, but Tegra 124 pinmux approach makes this hard.
Still I think this is the best solution - fewer boards to build also.
I do like this approach as well.
But there will be pitfalls.
Quoted 7 lines
Imagine there's say a driver for Ethernet controller which is used on MyBoard1 and MyBoard2. One board may use DMA/Phylib/caches and another doesn't use either of options I listed.
This means we need to build 2 instances of the driver, because options that I listed could not be built as extensions to some basic driver. You may think of it like compilation with different flags.
Not a nice driver. Can it not support both at run-time?
Quoted 9 lines
Another good example which will inevitable hit me with proposed solution
- some of our boards have either replaceable CPU tile or FPGA instead of real silicon CPU. It means that the same one board (read peripherals) could be driven by different CPUs. I mean not only variations of one core (in this case we may build for some base-line configuration of CPU so it will run on all more advanced cores) but it could be binary-incompatible CPUs. It means we'll need to re-build everything (sic!) for each board.
It would be nice to have a cpu interface to allow multiple CPUs, but yes at present this is where we are.
Quoted 6 lines
Still I'm not saying anything against proposed "multibuild" approach - I do like it, but we need to understand if it may satisfy all of our requirements. Or what will be overheads if we decide to go this way. Probably in my case with binary-incompatible cores the simplest solution will be 2 defconfigs which only differ in CPU version selection.
Yes indeed.
Regards,
Simon
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
In reply to Alexey BrodkinQuoted 14 lines · On Thu, 15 Jan 2015 21:49:59 +0000 Alexey Brodkin…
Hi Simon, Masahiro-san,
Quoted 11 lines · Simon Glass
Hi Masahiro,
Quoted 10 lines
Honestly, I do not like baseline options in board-Kconfig very much. The advantage is that it works without any change.
What I suggested before was to use
scripts/kconfig/merge_config.sh.For example, put the SoC baseline options into
tegra30_defconfig. Put the difference from that into tegra30_(board).config For example,
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
make tegra30_defconfig tegra30_seaboard.config make tegra30_defconfig tegra30_trimslice.configThe disadvantage is that we would have to input more for the configuration and has some impact on other projects such as BuildRoot...
Are you saying this approach really works?
I mean "maketegra30_defconfigtegra30_seaboard.config".
I admit this would not be accpetable.
Quoted 3 lines
Anyway I don't really like to change behavior of things people used to use. It will produce a lot of confusion instead of convenience of well-known tool.
OK. Let's do not.
Quoted 19 lines
Quoted 10 lines
Quoted 9 lines
In barebox, for example, all the Tegra boards share a single defconfig, "
tegra_v7_defconfig"
tegra_v7_defconfigcreates images for beaver, jetson, colibri, ac100, ...It takes advantage of Device Tree configuration and garbage collection. So, it generates multipule images without increasing memory foot-print.
Quoted 5 lines
I've been keen on that approach and have taken some steps for Tegra and Exynos. Exynos is actually not to far away, but Tegra 124 pinmux approach makes this hard.
Still I think this is the best solution - fewer boards to build also.
I do like this approach as well.
But there will be pitfalls.
Quoted 7 lines
Imagine there's say a driver for Ethernet controller which is used on MyBoard1 and MyBoard2. One board may use DMA/Phylib/caches and another doesn't use either of options I listed.
This means we need to build 2 instances of the driver, because options that I listed could not be built as extensions to some basic driver. You may think of it like compilation with different flags.
We should not mix-up configurations and board properties.
- Cache on/off is configuration: It should be configured thru Kconfig. Some might want to run a board with cache-enabled,
and some might want to run the same board with cached-disabled. This makes sense.
- CONFIG_FOO_BASE_ADDRESS is not configuration: Each board has its correct value. It must be passed from device tree, platform data or some other structures.
Such CONFIGs will eventually go away if we move forward the Driver Model works.
Quoted 8 lines
Another good example which will inevitable hit me with proposed solution
- some of our boards have either replaceable CPU tile or FPGA instead of real silicon CPU. It means that the same one board (read peripherals) could be driven by different CPUs. I mean not only variations of one core (in this case we may build for some base-line configuration of CPU so it will run on all more advanced cores) but it could be binary-incompatible CPUs. It means we'll need to re-build everything (sic!) for each board.
Drivers should be written in a generic way
so as not to depend on a specific ARCH/CPU.
If it is still not possible, OK, your boards cannot support multi-image. Prepare defconfig per board as we do now.
I would not go as far as say all the boards should switch to multi-image build.
It is a good idea to adopt multi-image-build if there are lots of board variants (like Tegra).
Quoted 6 lines
Still I'm not saying anything against proposed "multibuild" approach - I do like it, but we need to understand if it may satisfy all of our requirements. Or what will be overheads if we decide to go this way. Probably in my case with binary-incompatible cores the simplest solution will be 2 defconfigs which only differ in CPU version selection.
This is the case multi-image cannot be used.
You have to separate the defconfigs.
Best Regards
Masahiro Yamada
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
In reply to Simon GlassQuoted 141 lines · On Thu, 15 Jan 2015 12:44:16 -0700 Simon Glass <[email protected]> wrote:
Hi Masahiro,
Quoted 138 lines · Masahiro YAMADA
Hi
2015-01-15 23:46 GMT+09:00 Simon Glass <[email protected]>:
Quoted 116 lines
Hi,
Quoted 113 lines · Alexey Brodkin
Hi Simon, Masahiro-san,
Quoted 9 lines · Simon Glass
Quoted 9 lines
Quoted 7 lines
Probably I'm missing details of our
Kconfigmigration 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 forKconfigmigration we may start discussion on how to deal with "commands" in particular.Quoted 4 lines
Quoted 4 lines
I proposed the following way, but no big conversion movement has happened yet.
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/199965/focus=200089If you have an idea, please propose it.
Unfortunately I cannot open this link - I see "Connection to 80.91.229.5 failed". Do you mind to provide a link for the same message in
http://lists.denx.de ?Quoted 2 lines
Quoted 2 lines
Kconfigconversion is a too big task to be done by a single indivisual. Any suggestion, any form of contribution is very appreciated.Indeed and that stops me from starting this work as well. So my point is:
1) anybody may do updates toKconfiglike add more U-Boot commands,
some settings (CONFIG_SYS_xxx)
2) board maintainers are responsible for updates in defconfigs and
corresponding headers in "include/configs/"
3) that would be helpful if at (1) board maintainers are notified via
direct emails on the change that has been doneQuoted 8 lines
Quoted 8 lines
I personally keep away from any global changes until non-generic boards are dumped.
As Tom said in the following mail,
http://lists.denx.de/pipermail/u-boot/2015-January/201032.html
we are going to remove lots of boards.I do not want to make extra efforts on non-generic boards.
That makes sense but why don't we start implementation of changes in good boards we know already converted to "generic"? There're even entire arches that switched to "generic boards".
Quoted 47 lines
Quoted 16 lines
Quoted 5 lines
The point is commands are low-hanging fruits in terms of
Kconfigmigration - there're no extra options and tweaks, once all commands are added inKconfig(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.I realized one problem when I was doing this task
for my boards in commit25e274e20208.The defconfigs of my boards are almost the same:
(configs/ph1_ld4_defconfig, configs/ph1_pro4_defconfig, configs/ph1_sld8_defconfig)What is inconvenient as for defconfig is that it does not support "include" directive like C headers.
Quoted 8 lines
People generally like to add CONFIG_CMD_* to a common header file such as
include/configs/tegra-common.hOn the other hand, on defconfig, we must touch each defconfig of the board family.
I have not been able to decide right direction to solve this issue.
I think we need to discuss about how to live with lots of defconfigs.
How about this:
1. Support an 'include' option in defconfig to include another file. This could take the form of
CONFIG_DEFCONFIG_INCLUDES(comma-separated list of filenames). Don't allow nested includes - this CONFIG provides a complete list of includes.
2. When you use menuconfig to edit the config, it ignores the include and just writes out everything. Then it runs a simple script which parses the include files, and adjusts the file so that things in the includes are not repeated in the defconfig.I think this scheme would be good enough, but can probably be improved. At least it would be better than what we have.
Or we could instead define particular includes for different purposes:
- Arch
- SOC
- SOC Vendor
- Board vendor
- Board familyQuoted 7 lines
We could then require that standard filenames are used, and search for the correct file based on the SOC/board/vendor setting, etc.
As an example, for trimslice, we could search for
arm.h,tegra.h,nvidia.h,compulab.h,some_family_name.h.This is less flexible though.
Frankly I don't like this approach with post-processing steps. It will inevitably end-up with messed up configs.
Why don't we just use default values in
Kconfigfor ARCH/SOC/Board? It's pretty obvious that 1 board may have N flavors but then have a baseline options selected in "board/vendor/board_name/Kconfig" and only put options that differ between boards in your defconfigs.This way "savedefconfig" will automatically strip down all extra lines for a particular board.
Quoted 8 lines
Quoted 4 lines
This is how things work in Linux kernel and Buildroot Kconfig-based build systems. Probably I'm missing something here because U-Boot differs from mentioned projects in some aspects - if so please correct me.
I started with this approach and Masahiro was not very keen on it. I'm OK with it, particularly as it is already supported, but I wonder whether we can do better.
Honestly, I do not like baseline options in board-Kconfig very much. The advantage is that it works without any change.
What I suggested before was to use
scripts/kconfig/merge_config.sh.For example, put the SoC baseline options into
tegra30_defconfig. Put the difference from that into tegra30_(board).config For example,
Quoted 7 lines
Quoted 5 lines
make tegra30_defconfig tegra30_seaboard.config make tegra30_defconfig tegra30_trimslice.configThe disadvantage is that we would have to input more for the configuration and has some impact on other projects such as BuildRoot...
Is there any way that
tegra30_seaboardcould include tegra30 automatically?
I do not know the native Kconfig does not have this feature. If this is desired, I think we have to modify the Kconfig for our special demand.
Quoted 16 lines
Quoted 7 lines
Another option is "multi-image".
Actually barebox adopted this solution to solve the increasing defconfig problem.Quoted 8 lines
In barebox, for example, all the Tegra boards share a single defconfig, "
tegra_v7_defconfig"
tegra_v7_defconfigcreates images for beaver, jetson, colibri, ac100, ...It takes advantage of Device Tree configuration and garbage collection. So, it generates multipule images without increasing memory foot-print.
Quoted 5 lines
I've been keen on that approach and have taken some steps for Tegra and Exynos. Exynos is actually not to far away, but Tegra 124 pinmux approach makes this hard.
Still I think this is the best solution - fewer boards to build also.
Agree.
This multi-image approach high depends on the Driver Model and Device Tree because each driver should not hard-code driver properties such as base-address.
In legacy drivers, drivers are configured with CONFIGs. It makes it difficult to share a driver between multiple boards. We have to achieve run-time driver configuration.
Let's keep it in our mind as our long-term target!
Quoted 64 lines
Quoted 10 lines
Quoted 10 lines
I notice that some kernel distributions have a script which pulls out common kernel configs in a separate file (e.g. for ARM, or for Tegra) for checking into source control, then combine them again for the kernel. This suggests that others have this problem too. It does seem like a convenient feature to be able to have some sort of hierarchy of config.
Quoted 5 lines
Quoted 2 lines
Re messed-up configs, what will mess up? We can make it part of writing the config, perhaps.
The hierarchical config strategy makes "savedefconfig" difficult , I think.
I never said it would be easy.
Kconfigwasn't easy.Quoted 46 lines
Quoted 35 lines
Quoted 29 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
That's a separate topic. I do agree that
CMD_FPGAmakes not much sense for most of boards, as well as some others.Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
And I think during migration process of commands to
Kconfigit's a good time to reconsider default commands.Agree.
We should reconsider the default.
In my opition, most of the ones inconfig_cmd_default.hare not default commands.Right but if we expect to switch to
Kconfigsolely for commands selection we may not care much about contents of "config_cmd_default.h" assuming it will go away sometime soon.Probably we may just focus on:
1. Add all existing commands inKconfig
2. Select very few of them to be globally default(1) is pretty simple and anybody may do it if time permits
(2) requires wide discussionBut what's really nice with
Kconfigis its "savedefconfig". So we may not set any commands as globally default and let every architecture, board or defconfig to select really required options.Quoted 5 lines
Then once any option is marked as global (or even arch or board) default in a matter of simple script that does "make
XXX_defconfig&& make savedefconfig && mv defconfig configs/XXX_defconfig" all relevant defconfigs will be correctly updated (default options will be stripped out).Quoted 7 lines
Yes, it would be great to get all command configs into
Kconfig.I wonder if we need a script which automates the conversion? The header file includes in the
include/configs/... files makes this non-trivial. But if we had a script which could take a CONFIG as a parameter, remove it from all config headers, and add it to relevant defconfigs, it would be very useful.I have a Python script that moves each CONFIG from header files to defconfig files.
Quoted 7 lines
Quoted 4 lines
I wrote it for my local use, so it might not be very clean.
If necessary, I can share it on ML.
Yes please!
OK.
Please check this out:
http://patchwork.ozlabs.org/patch/430422/
Best Regards
Masahiro Yamada
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
In reply to Simon GlassHi Simon, Alexey,
Quoted 11 lines · On Thu, 15 Jan 2015 12:44:16 -0700 Simon Glass <[email protected]> wrote:
Quoted 11 lines
Quoted 11 lines
Frankly I don't like this approach with post-processing steps. It will inevitably end-up with messed up configs.
Why don't we just use default values in
Kconfigfor ARCH/SOC/Board? It's pretty obvious that 1 board may have N flavors but then have a baseline options selected in "board/vendor/board_name/Kconfig" and only put options that differ between boards in your defconfigs.This way "savedefconfig" will automatically strip down all extra lines for a particular board.
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
This is how things work in Linux kernel and Buildroot Kconfig-based build systems. Probably I'm missing something here because U-Boot differs from mentioned projects in some aspects - if so please correct me.
I started with this approach and Masahiro was not very keen on it. I'm OK with it, particularly as it is already supported, but I wonder whether we can do better.
Shall we go with this way?
It is true that I was not very keen on it at first, but after discussion with you, I understand that this is the best solution we can do now in terms of code maintainability.
Best Regards
Masahiro Yamada
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
Hi Masahiro,
Quoted 26 lines · Masahiro Yamada
Hi Simon, Alexey,
Quoted 11 lines · On Thu, 15 Jan 2015 12:44:16 -0700 Simon Glass <[email protected]> wrote:
Quoted 11 lines
Quoted 11 lines
Frankly I don't like this approach with post-processing steps. It will inevitably end-up with messed up configs.
Why don't we just use default values in
Kconfigfor ARCH/SOC/Board? It's pretty obvious that 1 board may have N flavors but then have a baseline options selected in "board/vendor/board_name/Kconfig" and only put options that differ between boards in your defconfigs.This way "savedefconfig" will automatically strip down all extra lines for a particular board.
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
This is how things work in Linux kernel and Buildroot Kconfig-based build systems. Probably I'm missing something here because U-Boot differs from mentioned projects in some aspects - if so please correct me.
I started with this approach and Masahiro was not very keen on it. I'm OK with it, particularly as it is already supported, but I wonder whether we can do better.
Quoted 6 lines
Shall we go with this way?
It is true that I was not very keen on it at first, but after discussion with you, I understand that this is the best solution we can do now in terms of code maintainability.
Yes I'm OK with it. Clearly there is a need for Kconfig to do better in this area, but I don't believe it is critical.
Regards,
Simon
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
In reply to Alexey BrodkinHi Alexey,
2015-01-14 17:18 GMT+09:00 Alexey Brodkin <[email protected]>:
Quoted 12 lines
Hi Simon, Masahiro-san,
Quoted 9 lines · Simon Glass
Quoted 9 lines
Quoted 7 lines
Probably I'm missing details of our
Kconfigmigration 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 forKconfigmigration we may start discussion on how to deal with "commands" in particular.
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
I proposed the following way, but no big conversion movement has happened yet.
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/199965/focus=200089If you have an idea, please propose it.
Unfortunately I cannot open this link - I see "Connection to 80.91.229.5 failed". Do you mind to provide a link for the same message in
http://lists.denx.de ?
Weird. I can access the link.
The subject is
[RFC] How to move lots of CONFIGs from header files to Kconfig
Another URL is
http://lists.denx.de/pipermail/u-boot/2014-October/193117.html
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Kconfigconversion is a too big task to be done by a single indivisual. Any suggestion, any form of contribution is very appreciated.Indeed and that stops me from starting this work as well. So my point is:
1) anybody may do updates toKconfiglike add more U-Boot commands,
some settings (CONFIG_SYS_xxx)
Yes, U-Boot is an open source project. Anybody can contribute and it is very appreciated.
Quoted 2 lines
2) board maintainers are responsible for updates in defconfigs and
corresponding headers in "include/configs/"
Yes. I expect this, but some board maintainers might not like to do it for some reason.
( too busy, no interest , etc.)
At some point, we need to convert globally, I think.
Quoted 2 lines
3) that would be helpful if at (1) board maintainers are notified via
direct emails on the change that has been done
Yes, good idea.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
I personally keep away from any global changes until non-generic boards are dumped.
As Tom said in the following mail,
http://lists.denx.de/pipermail/u-boot/2015-January/201032.html
we are going to remove lots of boards.
Quoted 5 lines
Quoted 1 line
Quoted 1 line
I do not want to make extra efforts on non-generic boards.
That makes sense but why don't we start implementation of changes in good boards we know already converted to "generic"? There're even entire arches that switched to "generic boards".
Yes, we can start with well-maintained boards.
Quoted 50 lines
Quoted 50 lines
Quoted 16 lines
Quoted 5 lines
The point is commands are low-hanging fruits in terms of
Kconfigmigration - there're no extra options and tweaks, once all commands are added inKconfig(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.I realized one problem when I was doing this task
for my boards in commit25e274e20208.The defconfigs of my boards are almost the same:
(configs/ph1_ld4_defconfig, configs/ph1_pro4_defconfig, configs/ph1_sld8_defconfig)What is inconvenient as for defconfig is that it does not support "include" directive like C headers.
Quoted 8 lines
People generally like to add CONFIG_CMD_* to a common header file such as
include/configs/tegra-common.hOn the other hand, on defconfig, we must touch each defconfig of the board family.
I have not been able to decide right direction to solve this issue.
I think we need to discuss about how to live with lots of defconfigs.
How about this:
1. Support an 'include' option in defconfig to include another file. This could take the form of
CONFIG_DEFCONFIG_INCLUDES(comma-separated list of filenames). Don't allow nested includes - this CONFIG provides a complete list of includes.
2. When you use menuconfig to edit the config, it ignores the include and just writes out everything. Then it runs a simple script which parses the include files, and adjusts the file so that things in the includes are not repeated in the defconfig.I think this scheme would be good enough, but can probably be improved. At least it would be better than what we have.
Or we could instead define particular includes for different purposes:
- Arch
- SOC
- SOC Vendor
- Board vendor
- Board familyWe could then require that standard filenames are used, and search for the correct file based on the SOC/board/vendor setting, etc.
Quoted 7 lines
Quoted 4 lines
As an example, for trimslice, we could search for
arm.h,tegra.h,nvidia.h,compulab.h,some_family_name.h.This is less flexible though.
Frankly I don't like this approach with post-processing steps. It will inevitably end-up with messed up configs.
Me neither.
I hesitate to drift apart from the Linux's Kconfig.
Quoted 6 lines
Why don't we just use default values in
Kconfigfor ARCH/SOC/Board? It's pretty obvious that 1 board may have N flavors but then have a baseline options selected in "board/vendor/board_name/Kconfig" and only put options that differ between boards in your defconfigs. This way "savedefconfig" will automatically strip down all extra lines for a particular board.
Indeed.
But we need to write 2 lines per CONFIG. This is a disadvantage against defconfig
config CMD_FOO
default y
Quoted 20 lines
This is how things work in Linux kernel and Buildroot Kconfig-based build systems. Probably I'm missing something here because U-Boot differs from mentioned projects in some aspects - if so please correct me.
Quoted 10 lines
Quoted 10 lines
Quoted 6 lines
That's a separate topic. I do agree that
CMD_FPGAmakes not much sense for most of boards, as well as some others.And I think during migration process of commands to
Kconfigit's a good time to reconsider default commands.Agree.
We should reconsider the default.
In my opition, most of the ones inconfig_cmd_default.hare not default commands.Right but if we expect to switch to
Kconfigsolely for commands selection we may not care much about contents of "config_cmd_default.h" assuming it will go away sometime soon.
Quoted 6 lines
Probably we may just focus on:
1. Add all existing commands inKconfig
2. Select very few of them to be globally default(1) is pretty simple and anybody may do it if time permits
(2) requires wide discussion
Agreed.
Quoted 15 lines
But what's really nice with
Kconfigis its "savedefconfig". So we may not set any commands as globally default and let every architecture, board or defconfig to select really required options.Then once any option is marked as global (or even arch or board) default in a matter of simple script that does "make
XXX_defconfig&& make savedefconfig && mv defconfig configs/XXX_defconfig" all relevant defconfigs will be correctly updated (default options will be stripped out).-Alexey
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
Hi MAsahiro-san,
Quoted 8 lines · Masahiro YAMADA
Weird. I can access the link.
The subject is
[RFC] How to move lots of CONFIGs from header files toKconfigAnother URL is
http://lists.denx.de/pipermail/u-boot/2014-October/193117.html
Thanks a lot! Now I was able to read your message. And it looks like I was proposing the same options (1) and (2) :-)
Quoted 7 lines
work as well.
Quoted 3 lines
So my point is:
1) anybody may do updates toKconfiglike add more U-Boot commands,
some settings (CONFIG_SYS_xxx)Yes, U-Boot is an open source project. Anybody can contribute and it is very appreciated.
Here I implicitly meant "anybody" = "either you or me" because we're both interested in that change to be done and sooner is better :-)
Quoted 6 lines
Quoted 2 lines
2) board maintainers are responsible for updates in defconfigs and
corresponding headers in "include/configs/"Yes. I expect this, but some board maintainers might not like to do it for some reason.
( too busy, no interest , etc.)
That's understood. But probably we may move forward with both
implementations: Kconfig & config headers.
I really hate to introduce breakages for people so if co-existence of config headers with Kconfig is a matter of few "ifdefs" (an example is my patch for default commands) then why not?
In the end once inactive maintainer returns back (for example it was right the case for me recently) he most probably will spend some time on switching to Kconfig just because defconfig way is so much cleaner compared to headers.
Quoted 1 line
At some point, we need to convert globally, I think.
Completely agree, and if we're done with well-maintained arches and boards "complete switch" will be as easy as:
1. Removal of more stale boards
2. Auto-conversion of headers to defconfigs with automated script
For sure (2) will introduce unexpected behavior for some boards. Then if people start complaining real maintainer or we will incrementally fix things.
Quoted 4 lines
Quoted 2 lines
3) that would be helpful if at (1) board maintainers are notified via
direct emails on the change that has been doneYes, good idea.
That's important because not everybody follows mailing list closely especially if their development focus is temporary switched to other projects.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
I personally keep away from any global changes until non-generic boards are dumped.
As Tom said in the following mail,
http://lists.denx.de/pipermail/u-boot/2015-January/201032.html
we are going to remove lots of boards.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
I do not want to make extra efforts on non-generic boards.
That makes sense but why don't we start implementation of changes in good boards we know already converted to "generic"? There're even entire arches that switched to "generic boards".
Yes, we can start with well-maintained boards.
This is important because "release early, release often". In the very beginning of Kconfig way we'll do many non-optimal or even plain wrong decisions (probably even intentionally just because at that point it could be the best decision we see). And then by the time of "global/complete switch" to Kconfig most of thins will be implemented properly and most of issues fixed.
-Alexey
PATCH 1/2 common: mark commands as default to match "config_cmd_default.h"
Hi Alexey,
Quoted 8 lines · On Thu, 15 Jan 2015 21:22:42 +0000 Alexey Brodkin…
Quoted 4 lines
Quoted 2 lines
3) that would be helpful if at (1) board maintainers are notified via
direct emails on the change that has been doneYes, good idea.
That's important because not everybody follows mailing list closely especially if their development focus is temporary switched to other projects.
No problem.
Patman automatically CCs board maintainers.
Best Regards
Masahiro Yamada
PATCH 2/2 config_cmd_default.h: wrap each definition in "ifndef"
In reply to Alexey BrodkinNow with switch to Kconfig it's possible to select commands via menuconfig or defconfigs.
Moreover some commands are enabled by default in both "config_cmd_default.h" as a legacy way and in "common/Kconfig".
And on attempt to build U-Boot following warnings are printed for definitions made in both:
--->---
In file included from include/configs/arcangel4.h:45:0,
from include/config.h:4,
from include/common.h:18,
from examples/standalone/stubs.c:1:include/config_cmd_default.h:20:0: warning: "CONFIG_CMD_BDI" redefined [enabled by default]
#define CONFIG_CMD_BDI /* bdinfo */
^
In file included from ././include/linux/kconfig.h:4:0,
from <command-line>:0:
include/generated/autoconf.h:10:0: note: this is the location of the previous definition
#define CONFIG_CMD_BDI 1
^
--->---
An obvious fix is to wrap all definitions in "config_cmd_default.h" since we still have to keep it util we're done with complete switch to Kconfig.
--- include/config_cmd_default.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)
include/config_cmd_default.h +42 -0
@@ -16,28 +16,70 @@* hardware, not fully tested, etc.). */ +#ifndef CONFIG_CMD_BDI #define CONFIG_CMD_BDI /* bdinfo */ +#endif +#ifndef CONFIG_CMD_BOOTD #define CONFIG_CMD_BOOTD /* bootd */ +#endif +#ifndef CONFIG_CMD_CONSOLE #define CONFIG_CMD_CONSOLE /* coninfo */ +#endif +#ifndef CONFIG_CMD_ECHO #define CONFIG_CMD_ECHO /* echo arguments */ +#endif +#ifndef CONFIG_CMD_EDITENV #define CONFIG_CMD_EDITENV /* editenv */ +#endif +#ifndef CONFIG_CMD_FPGA #define CONFIG_CMD_FPGA /* FPGA configuration Support */ +#endif +#ifndef CONFIG_CMD_IMI #define CONFIG_CMD_IMI /* iminfo */ +#endif +#ifndef CONFIG_CMD_ITEST #define CONFIG_CMD_ITEST /* Integer (and string) test */ +#endif #ifndef CONFIG_SYS_NO_FLASH +#ifndef CONFIG_CMD_FLASH #define CONFIG_CMD_FLASH /* flinfo, erase, protect */ +#endif +#ifndef CONFIG_CMD_IMLS #define CONFIG_CMD_IMLS /* List all found images */ #endif +#endif /* CONFIG_SYS_NO_FLASH */ +#ifndef CONFIG_CMD_LOADB #define CONFIG_CMD_LOADB /* loadb */ +#endif +#ifndef CONFIG_CMD_LOADS #define CONFIG_CMD_LOADS /* loads */ +#endif +#ifndef CONFIG_CMD_MEMORY #define CONFIG_CMD_MEMORY /* md mm nm mw cp cmp crc base loop */ +#endif +#ifndef CONFIG_CMD_MISC #define CONFIG_CMD_MISC /* Misc functions like sleep etc*/ +#endif +#ifndef CONFIG_CMD_NET #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ +#endif +#ifndef CONFIG_CMD_NFS #define CONFIG_CMD_NFS /* NFS support */ +#endif +#ifndef CONFIG_CMD_RUN #define CONFIG_CMD_RUN /* run command in env variable */ +#endif +#ifndef CONFIG_CMD_SAVEENV #define CONFIG_CMD_SAVEENV /* saveenv */ +#endif +#ifndef CONFIG_CMD_SETGETDCR #define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */ +#endif +#ifndef CONFIG_CMD_SOURCE #define CONFIG_CMD_SOURCE /* "source" command support */ +#endif +#ifndef CONFIG_CMD_XIMG #define CONFIG_CMD_XIMG /* Load part of Multi Image */ +#endif #endif /* _CONFIG_CMD_DEFAULT_H */
Signature · 1 line
2.1.0
PATCH 2/2 config_cmd_default.h: wrap each definition in "ifndef"
Hi all,
Quoted 100 lines · Alexey Brodkin
Now with switch to
Kconfigit's possible to select commands via menuconfig or defconfigs.Moreover some commands are enabled by default in both "
config_cmd_default.h" as a legacy way and in "common/Kconfig".And on attempt to build U-Boot following warnings are printed for definitions made in both:
--->---
In file included frominclude/configs/arcangel4.h:45:0,
frominclude/config.h:4,
frominclude/common.h:18,
fromexamples/standalone/stubs.c:1:include/config_cmd_default.h:20:0: warning: "CONFIG_CMD_BDI" redefined [enabled by default]
#defineCONFIG_CMD_BDI/* bdinfo */
^
In file included from././include/linux/kconfig.h:4:0,from <command-line>:0:
include/generated/autoconf.h:10:0: note: this is the location of the previous definition
#defineCONFIG_CMD_BDI1
^
--->---An obvious fix is to wrap all definitions in "
config_cmd_default.h" since we still have to keep it util we're done with complete switch toKconfig.Signed-off-by Alexey Brodkin <[email protected]>Cc Tom Rini <[email protected]>--- include/config_cmd_default.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)include/config_cmd_default.h +37
-0@@ -16,28 +16,70 @@* hardware, not fully tested, etc.). */ +#ifndef CONFIG_CMD_BDI #define CONFIG_CMD_BDI /* bdinfo */ +#endif +#ifndef CONFIG_CMD_BOOTD #define CONFIG_CMD_BOOTD /* bootd */ +#endif +#ifndef CONFIG_CMD_CONSOLE #define CONFIG_CMD_CONSOLE /* coninfo */ +#endif +#ifndef CONFIG_CMD_ECHO #define CONFIG_CMD_ECHO /* echo arguments */ +#endif +#ifndef CONFIG_CMD_EDITENV #define CONFIG_CMD_EDITENV /* editenv */ +#endif +#ifndef CONFIG_CMD_FPGA #define CONFIG_CMD_FPGA /* FPGA configuration Support */ +#endif +#ifndef CONFIG_CMD_IMI #define CONFIG_CMD_IMI /* iminfo */ +#endif +#ifndef CONFIG_CMD_ITEST #define CONFIG_CMD_ITEST /* Integer (and string) test */ +#endif #ifndef CONFIG_SYS_NO_FLASH +#ifndef CONFIG_CMD_FLASH #define CONFIG_CMD_FLASH /* flinfo, erase, protect */ +#endif +#ifndef CONFIG_CMD_IMLS #define CONFIG_CMD_IMLS /* List all found images */ #endif +#endif /* CONFIG_SYS_NO_FLASH */ +#ifndef CONFIG_CMD_LOADB #define CONFIG_CMD_LOADB /* loadb */ +#endif +#ifndef CONFIG_CMD_LOADS #define CONFIG_CMD_LOADS /* loads */ +#endif +#ifndef CONFIG_CMD_MEMORY #define CONFIG_CMD_MEMORY /* md mm nm mw cp cmp crc base loop */ +#endif +#ifndef CONFIG_CMD_MISC #define CONFIG_CMD_MISC /* Misc functions like sleep etc*/ +#endif +#ifndef CONFIG_CMD_NET #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ +#endif +#ifndef CONFIG_CMD_NFS #define CONFIG_CMD_NFS /* NFS support */ +#endif +#ifndef CONFIG_CMD_RUN #define CONFIG_CMD_RUN /* run command in env variable */ +#endif +#ifndef CONFIG_CMD_SAVEENV #define CONFIG_CMD_SAVEENV /* saveenv */ +#endif +#ifndef CONFIG_CMD_SETGETDCR
include/config_cmd_default.h line 85
Quoted 10 lines
include/config_cmd_default.h +5
-0#define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */ +#endif +#ifndef CONFIG_CMD_SOURCE #define CONFIG_CMD_SOURCE /* "source" command support */ +#endif +#ifndef CONFIG_CMD_XIMG #define CONFIG_CMD_XIMG /* Load part of Multi Image */ +#endif #endif /* _CONFIG_CMD_DEFAULT_H */
Looks like the first patch from this series is not yet ready for a prime-time (look at discussion here
http://patchwork.ozlabs.org/patch/425106/) I still think this particular patch makes sense because users may select command via Kconfig now and once one of the commands listed in "config_cmd_default.h" is selected inevitably warnings will appear in build console.
So if there're no comment and objections I'll re-send this patch separately.
-Alexey
PATCH 2/2 config_cmd_default.h: wrap each definition in "ifndef"
Quoted 121 lines · On Fri, 9 Jan 2015 21:21:20 +0000 Alexey Brodkin <[email protected]>…
Hi all,
Quoted 100 lines · Alexey Brodkin
Now with switch to
Kconfigit's possible to select commands via menuconfig or defconfigs.Moreover some commands are enabled by default in both "
config_cmd_default.h" as a legacy way and in "common/Kconfig".And on attempt to build U-Boot following warnings are printed for definitions made in both:
--->---
In file included frominclude/configs/arcangel4.h:45:0,
frominclude/config.h:4,
frominclude/common.h:18,
fromexamples/standalone/stubs.c:1:include/config_cmd_default.h:20:0: warning: "CONFIG_CMD_BDI" redefined [enabled by default]
#defineCONFIG_CMD_BDI/* bdinfo */
^
In file included from././include/linux/kconfig.h:4:0,from <command-line>:0:
include/generated/autoconf.h:10:0: note: this is the location of the previous definition
#defineCONFIG_CMD_BDI1
^
--->---An obvious fix is to wrap all definitions in "
config_cmd_default.h" since we still have to keep it util we're done with complete switch toKconfig.Signed-off-by Alexey Brodkin <[email protected]>Cc Tom Rini <[email protected]>--- include/config_cmd_default.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)include/config_cmd_default.h +37
-0@@ -16,28 +16,70 @@* hardware, not fully tested, etc.). */ +#ifndef CONFIG_CMD_BDI #define CONFIG_CMD_BDI /* bdinfo */ +#endif +#ifndef CONFIG_CMD_BOOTD #define CONFIG_CMD_BOOTD /* bootd */ +#endif +#ifndef CONFIG_CMD_CONSOLE #define CONFIG_CMD_CONSOLE /* coninfo */ +#endif +#ifndef CONFIG_CMD_ECHO #define CONFIG_CMD_ECHO /* echo arguments */ +#endif +#ifndef CONFIG_CMD_EDITENV #define CONFIG_CMD_EDITENV /* editenv */ +#endif +#ifndef CONFIG_CMD_FPGA #define CONFIG_CMD_FPGA /* FPGA configuration Support */ +#endif +#ifndef CONFIG_CMD_IMI #define CONFIG_CMD_IMI /* iminfo */ +#endif +#ifndef CONFIG_CMD_ITEST #define CONFIG_CMD_ITEST /* Integer (and string) test */ +#endif #ifndef CONFIG_SYS_NO_FLASH +#ifndef CONFIG_CMD_FLASH #define CONFIG_CMD_FLASH /* flinfo, erase, protect */ +#endif +#ifndef CONFIG_CMD_IMLS #define CONFIG_CMD_IMLS /* List all found images */ #endif +#endif /* CONFIG_SYS_NO_FLASH */ +#ifndef CONFIG_CMD_LOADB #define CONFIG_CMD_LOADB /* loadb */ +#endif +#ifndef CONFIG_CMD_LOADS #define CONFIG_CMD_LOADS /* loads */ +#endif +#ifndef CONFIG_CMD_MEMORY #define CONFIG_CMD_MEMORY /* md mm nm mw cp cmp crc base loop */ +#endif +#ifndef CONFIG_CMD_MISC #define CONFIG_CMD_MISC /* Misc functions like sleep etc*/ +#endif +#ifndef CONFIG_CMD_NET #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ +#endif +#ifndef CONFIG_CMD_NFS #define CONFIG_CMD_NFS /* NFS support */ +#endif +#ifndef CONFIG_CMD_RUN #define CONFIG_CMD_RUN /* run command in env variable */ +#endif +#ifndef CONFIG_CMD_SAVEENV #define CONFIG_CMD_SAVEENV /* saveenv */ +#endif +#ifndef CONFIG_CMD_SETGETDCR include/config_cmd_default.h line 85
Quoted 10 lines
include/config_cmd_default.h +5
-0#define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */ +#endif +#ifndef CONFIG_CMD_SOURCE #define CONFIG_CMD_SOURCE /* "source" command support */ +#endif +#ifndef CONFIG_CMD_XIMG #define CONFIG_CMD_XIMG /* Load part of Multi Image */ +#endif #endif /* _CONFIG_CMD_DEFAULT_H */ Looks like the first patch from this series is not yet ready for a prime-time (look at discussion here
http://patchwork.ozlabs.org/patch/425106/) I still think this particular patch makes sense because users may select command viaKconfignow and once one of the commands listed in "config_cmd_default.h" is selected inevitably warnings will appear in build console.
Quoted 4 lines
So if there're no comment and objections I'll re-send this patch separately.
-Alexey
I think this change is harmless, but
#define CONFIG_CMD_BDI 1
is simpler than
#ifndef CONFIG_CMD_BDI
#define CONFIG_CMD_BDI
#endif
Maybe?
Best Regards
Masahiro Yamada
PATCH 2/2 config_cmd_default.h: wrap each definition in "ifndef"
Hi Masahiro-san,
Quoted 6 lines · Masahiro Yamada
On Fri, 9 Jan 2015 21:21:20 +0000
Alexey Brodkin <[email protected]> wrote:
I think this change is harmless, but#define
CONFIG_CMD_BDI1
Quoted 8 lines
is simpler than
#ifndef
CONFIG_CMD_BDI
#defineCONFIG_CMD_BDI
#endifMaybe?
I don't think so :)
Please look at Wolfgang's comment here
http://lists.denx.de/pipermail/u-boot/2014-February/172494.html
--->8---
Please do not define values for logical variables [please check everywhere].
--->8---
-Alexey
PATCH 2/2 config_cmd_default.h: wrap each definition in "ifndef"
Hi Alexey,
Quoted 20 lines · On Wed, 14 Jan 2015 06:23:55 +0000 Alexey Brodkin…
Hi Masahiro-san,
Quoted 6 lines · Masahiro Yamada
On Fri, 9 Jan 2015 21:21:20 +0000
Alexey Brodkin <[email protected]> wrote:
I think this change is harmless, but#define
CONFIG_CMD_BDI1Quoted 8 lines
is simpler than
#ifndef
CONFIG_CMD_BDI
#defineCONFIG_CMD_BDI
#endifMaybe?
I don't think so :)
Quoted 7 lines
Please look at Wolfgang's comment here
http://lists.denx.de/pipermail/u-boot/2014-February/172494.html--->8---
Please do not define values for logical variables [please check everywhere].
--->8---
Uh, OK.
Yours will do.
Best Regards
Masahiro Yamada