mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-27 16:01:27 +00:00
boot: Introduce BOOTSTD_MENU to control bootflow menu build
The bootflow_menu.c code depends on e.g. scene_txt_set_font(), which is only built when CONFIG_EXPO is enabled. Introduce new Kconfig symbol BOOTSTD_MENU which depends on EXPO to prevent triggering errors like these in case e.g. CONFIG_VIDEO=n : " boot/bootflow_menu.c:158:(.text+0x8851): undefined reference to `scene_txt_set_font' " Make the symbol depend on BOOTSTD_FULL as well to get rid of the Makefile dependency workaround. Since BOOTSTD_FULL is not available in SPL, do not define SPL variant of BOOTSTD_MENU. Fix up bootflow test accordingly. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
3cf94b6f41
commit
f692cfeeb3
3 changed files with 11 additions and 4 deletions
|
@ -469,6 +469,13 @@ config BOOTSTD_BOOTCOMMAND
|
||||||
standard boot does not support all of the features of distro boot
|
standard boot does not support all of the features of distro boot
|
||||||
yet.
|
yet.
|
||||||
|
|
||||||
|
config BOOTSTD_MENU
|
||||||
|
bool "Provide a menu of available bootflows for standard boot"
|
||||||
|
depends on BOOTSTD_FULL && EXPO
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Provide a menu of available bootflows and related options.
|
||||||
|
|
||||||
config BOOTSTD_PROG
|
config BOOTSTD_PROG
|
||||||
bool "Use programmatic boot"
|
bool "Use programmatic boot"
|
||||||
depends on !CMDLINE
|
depends on !CMDLINE
|
||||||
|
|
|
@ -24,6 +24,7 @@ obj-$(CONFIG_$(PHASE_)BOOTSTD) += bootflow.o
|
||||||
obj-$(CONFIG_$(PHASE_)BOOTSTD) += bootmeth-uclass.o
|
obj-$(CONFIG_$(PHASE_)BOOTSTD) += bootmeth-uclass.o
|
||||||
obj-$(CONFIG_$(PHASE_)BOOTSTD) += bootstd-uclass.o
|
obj-$(CONFIG_$(PHASE_)BOOTSTD) += bootstd-uclass.o
|
||||||
|
|
||||||
|
obj-$(CONFIG_$(PHASE_)BOOTSTD_MENU) += bootflow_menu.o
|
||||||
obj-$(CONFIG_$(PHASE_)BOOTSTD_PROG) += prog_boot.o
|
obj-$(CONFIG_$(PHASE_)BOOTSTD_PROG) += prog_boot.o
|
||||||
|
|
||||||
obj-$(CONFIG_$(PHASE_)BOOTMETH_EXTLINUX) += bootmeth_extlinux.o
|
obj-$(CONFIG_$(PHASE_)BOOTMETH_EXTLINUX) += bootmeth_extlinux.o
|
||||||
|
@ -35,10 +36,6 @@ obj-$(CONFIG_$(PHASE_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o
|
||||||
obj-$(CONFIG_$(PHASE_)BOOTMETH_SCRIPT) += bootmeth_script.o
|
obj-$(CONFIG_$(PHASE_)BOOTMETH_SCRIPT) += bootmeth_script.o
|
||||||
obj-$(CONFIG_$(PHASE_)CEDIT) += cedit.o
|
obj-$(CONFIG_$(PHASE_)CEDIT) += cedit.o
|
||||||
obj-$(CONFIG_$(PHASE_)BOOTMETH_EFI_BOOTMGR) += bootmeth_efi_mgr.o
|
obj-$(CONFIG_$(PHASE_)BOOTMETH_EFI_BOOTMGR) += bootmeth_efi_mgr.o
|
||||||
ifdef CONFIG_$(PHASE_)BOOTSTD_FULL
|
|
||||||
obj-$(CONFIG_$(PHASE_)EXPO) += bootflow_menu.o
|
|
||||||
obj-$(CONFIG_$(PHASE_)BOOTSTD) += bootflow_menu.o
|
|
||||||
endif
|
|
||||||
|
|
||||||
obj-$(CONFIG_$(PHASE_)OF_LIBFDT) += fdt_support.o
|
obj-$(CONFIG_$(PHASE_)OF_LIBFDT) += fdt_support.o
|
||||||
obj-$(CONFIG_$(PHASE_)FDT_SIMPLEFB) += fdt_simplefb.o
|
obj-$(CONFIG_$(PHASE_)FDT_SIMPLEFB) += fdt_simplefb.o
|
||||||
|
|
|
@ -857,6 +857,9 @@ static int bootflow_menu_theme(struct unit_test_state *uts)
|
||||||
ofnode node;
|
ofnode node;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (!CONFIG_IS_ENABLED(BOOTSTD_MENU))
|
||||||
|
return -EAGAIN;
|
||||||
|
|
||||||
ut_assertok(scan_mmc4_bootdev(uts));
|
ut_assertok(scan_mmc4_bootdev(uts));
|
||||||
|
|
||||||
ut_assertok(bootflow_menu_new(&exp));
|
ut_assertok(bootflow_menu_new(&exp));
|
||||||
|
|
Loading…
Add table
Reference in a new issue