[U-Boot] [PATCH] common: show "Boot media" menu only for some TI and Freescale SoCs

The CONFIG_"_BOOT does not control anything in common code; they are mostly used to enable a set of options in include/configs/<board>.h, in other words, the behavior of these options are highly SoC specific. Actually, nothing happens for other SoCs than some TI, Freescale ones.
This menu is weird in multiple ways: [1] These options, which make sense only for TI and Freescale boards, are visible to all. The menu was place in the common place perhaps because TI and Freescale just happened to use the same config names.
[2] Multiple boot media can be enabled, and its behavior is probably undefined. This will be solved by changing "menu" to "choice". I leave this to somebody who has interest.
[3] All boot media, some of them are not supported, are visible. In fact, I do not see any reference to CONFIG_ONENAND_BOOT, CONFIG_SATA_BOOT.
This commit addresses [1]. Instead of pushing the menu away to SoC Kconfig files or somewhere, one alternative solution is to hide such a non-sense menu because it is misleading users of other boards.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com ---
This patch implies that I am opposed to the following patch:
http://patchwork.ozlabs.org/patch/661514/
common/Kconfig | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/common/Kconfig b/common/Kconfig index 46e7173..8a56967 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -98,6 +98,11 @@ config BOOTSTAGE_STASH_SIZE endmenu
menu "Boot media" + depends on TARGET_AM335X_EVM || TARGET_AM43XX_EVM || TARGET_BRPPT1 || \ + TARGET_LS1012AFRDM || TARGET_LS1012AQDS || \ + TARGET_LS1012ARDB || TARGET_LS1021AQDS || \ + TARGET_LS1021ATWR || TARGET_LS1043AQDS || \ + TARGET_LS1043ARDB || TARGET_LS2080AQDS
config NOR_BOOT bool "Support for booting from NOR flash"

On Tue, Aug 23, 2016 at 03:08:02PM +0900, Masahiro Yamada wrote:
The CONFIG_"_BOOT does not control anything in common code; they are mostly used to enable a set of options in include/configs/<board>.h, in other words, the behavior of these options are highly SoC specific. Actually, nothing happens for other SoCs than some TI, Freescale ones.
This menu is weird in multiple ways: [1] These options, which make sense only for TI and Freescale boards, are visible to all. The menu was place in the common place perhaps because TI and Freescale just happened to use the same config names.
[2] Multiple boot media can be enabled, and its behavior is probably undefined. This will be solved by changing "menu" to "choice". I leave this to somebody who has interest.
[3] All boot media, some of them are not supported, are visible. In fact, I do not see any reference to CONFIG_ONENAND_BOOT, CONFIG_SATA_BOOT.
This commit addresses [1]. Instead of pushing the menu away to SoC Kconfig files or somewhere, one alternative solution is to hide such a non-sense menu because it is misleading users of other boards.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com
So, I think in the case of the current "Boot menu" stuff, I think the problem in hind sight is that this stuff belongs in board/freescale/Kconfig (and NOR_BOOT in board/ti/am335x_evm/Kconfig). There is a certain amount of vendor-specific "configure stuff so it will boot" that needs to be handled.
This patch implies that I am opposed to the following patch:
That patch, imho, is a different problem to solve and I'll reply there. Thanks!
participants (2)
-
Masahiro Yamada
-
Tom Rini