mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 19:34:35 +00:00
efi_loader: Rename and move CMD_BOOTEFI_HELLO_COMPILE
This is not actually a command so the name is confusing. Use BOOTEFI_HELLO_COMPILE instead. Put it in the efi_loader directory with the other such config options. The link rule (for $(obj)/%_efi.so) in scripts/Makefile.lib handles pulling in efi_crt0.o and efi_reloc.o so drop the 'extra' rules. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
77a93ae681
commit
6fe80876dc
13 changed files with 22 additions and 24 deletions
|
@ -130,7 +130,6 @@ CFLAGS_REMOVE_$(EFI_CRT0) := $(CFLAGS_NON_EFI)
|
||||||
CFLAGS_$(EFI_RELOC) := $(CFLAGS_EFI)
|
CFLAGS_$(EFI_RELOC) := $(CFLAGS_EFI)
|
||||||
CFLAGS_REMOVE_$(EFI_RELOC) := $(CFLAGS_NON_EFI)
|
CFLAGS_REMOVE_$(EFI_RELOC) := $(CFLAGS_NON_EFI)
|
||||||
|
|
||||||
extra-$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE) += $(EFI_CRT0) $(EFI_RELOC)
|
|
||||||
# TODO: As of v2019.01 the relocation code for the EFI application cannot
|
# TODO: As of v2019.01 the relocation code for the EFI application cannot
|
||||||
# be built on ARMv7-M.
|
# be built on ARMv7-M.
|
||||||
ifndef CONFIG_CPU_V7M
|
ifndef CONFIG_CPU_V7M
|
||||||
|
|
|
@ -36,7 +36,6 @@ CFLAGS_REMOVE_$(EFI_CRT0) := $(CFLAGS_NON_EFI)
|
||||||
CFLAGS_$(EFI_RELOC) := $(CFLAGS_EFI)
|
CFLAGS_$(EFI_RELOC) := $(CFLAGS_EFI)
|
||||||
CFLAGS_REMOVE_$(EFI_RELOC) := $(CFLAGS_NON_EFI)
|
CFLAGS_REMOVE_$(EFI_RELOC) := $(CFLAGS_NON_EFI)
|
||||||
|
|
||||||
extra-$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE) += $(EFI_CRT0) $(EFI_RELOC)
|
|
||||||
extra-$(CONFIG_CMD_BOOTEFI_SELFTEST) += $(EFI_CRT0) $(EFI_RELOC)
|
extra-$(CONFIG_CMD_BOOTEFI_SELFTEST) += $(EFI_CRT0) $(EFI_RELOC)
|
||||||
extra-$(CONFIG_EFI) += $(EFI_CRT0) $(EFI_RELOC)
|
extra-$(CONFIG_EFI) += $(EFI_CRT0) $(EFI_RELOC)
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ endif
|
||||||
else
|
else
|
||||||
|
|
||||||
ifndef CONFIG_SPL_BUILD
|
ifndef CONFIG_SPL_BUILD
|
||||||
ifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST)$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
|
ifneq ($(CONFIG_CMD_BOOTEFI_SELFTEST),)
|
||||||
extra-y += $(EFI_CRT0) $(EFI_RELOC)
|
extra-y += $(EFI_CRT0) $(EFI_RELOC)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
14
cmd/Kconfig
14
cmd/Kconfig
|
@ -438,21 +438,9 @@ config CMD_BOOTEFI_BOOTMGR
|
||||||
This subcommand will allow you to select the UEFI binary to be booted
|
This subcommand will allow you to select the UEFI binary to be booted
|
||||||
via UEFI variables Boot####, BootOrder, and BootNext.
|
via UEFI variables Boot####, BootOrder, and BootNext.
|
||||||
|
|
||||||
config CMD_BOOTEFI_HELLO_COMPILE
|
|
||||||
bool "Compile a standard EFI hello world binary for testing"
|
|
||||||
default y
|
|
||||||
help
|
|
||||||
This compiles a standard EFI hello world application with U-Boot so
|
|
||||||
that it can be used with the test/py testing framework. This is useful
|
|
||||||
for testing that EFI is working at a basic level, and for bringing
|
|
||||||
up EFI support on a new architecture.
|
|
||||||
|
|
||||||
No additional space will be required in the resulting U-Boot binary
|
|
||||||
when this option is enabled.
|
|
||||||
|
|
||||||
config CMD_BOOTEFI_HELLO
|
config CMD_BOOTEFI_HELLO
|
||||||
bool "Allow booting a standard EFI hello world for testing"
|
bool "Allow booting a standard EFI hello world for testing"
|
||||||
depends on CMD_BOOTEFI_BINARY && CMD_BOOTEFI_HELLO_COMPILE
|
depends on CMD_BOOTEFI_BINARY && BOOTEFI_HELLO_COMPILE
|
||||||
default y if CMD_BOOTEFI_SELFTEST
|
default y if CMD_BOOTEFI_SELFTEST
|
||||||
help
|
help
|
||||||
This adds a standard EFI hello world application to U-Boot so that
|
This adds a standard EFI hello world application to U-Boot so that
|
||||||
|
|
|
@ -38,7 +38,7 @@ CONFIG_SYS_PBSIZE=1050
|
||||||
CONFIG_BOARD_EARLY_INIT_R=y
|
CONFIG_BOARD_EARLY_INIT_R=y
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
CONFIG_SYS_PROMPT="Marvell> "
|
CONFIG_SYS_PROMPT="Marvell> "
|
||||||
# CONFIG_CMD_BOOTEFI_HELLO_COMPILE is not set
|
# CONFIG_BOOTEFI_HELLO_COMPILE is not set
|
||||||
CONFIG_CMD_MD5SUM=y
|
CONFIG_CMD_MD5SUM=y
|
||||||
CONFIG_MD5SUM_VERIFY=y
|
CONFIG_MD5SUM_VERIFY=y
|
||||||
CONFIG_CMD_MX_CYCLIC=y
|
CONFIG_CMD_MX_CYCLIC=y
|
||||||
|
|
|
@ -38,7 +38,7 @@ CONFIG_SYS_PBSIZE=1050
|
||||||
CONFIG_BOARD_EARLY_INIT_R=y
|
CONFIG_BOARD_EARLY_INIT_R=y
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
CONFIG_SYS_PROMPT="Marvell> "
|
CONFIG_SYS_PROMPT="Marvell> "
|
||||||
# CONFIG_CMD_BOOTEFI_HELLO_COMPILE is not set
|
# CONFIG_BOOTEFI_HELLO_COMPILE is not set
|
||||||
CONFIG_CMD_MD5SUM=y
|
CONFIG_CMD_MD5SUM=y
|
||||||
CONFIG_MD5SUM_VERIFY=y
|
CONFIG_MD5SUM_VERIFY=y
|
||||||
CONFIG_CMD_MX_CYCLIC=y
|
CONFIG_CMD_MX_CYCLIC=y
|
||||||
|
|
|
@ -39,7 +39,7 @@ CONFIG_SYS_PBSIZE=1050
|
||||||
CONFIG_BOARD_EARLY_INIT_R=y
|
CONFIG_BOARD_EARLY_INIT_R=y
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
CONFIG_SYS_PROMPT="Marvell> "
|
CONFIG_SYS_PROMPT="Marvell> "
|
||||||
# CONFIG_CMD_BOOTEFI_HELLO_COMPILE is not set
|
# CONFIG_BOOTEFI_HELLO_COMPILE is not set
|
||||||
CONFIG_CMD_MD5SUM=y
|
CONFIG_CMD_MD5SUM=y
|
||||||
CONFIG_MD5SUM_VERIFY=y
|
CONFIG_MD5SUM_VERIFY=y
|
||||||
CONFIG_CMD_MX_CYCLIC=y
|
CONFIG_CMD_MX_CYCLIC=y
|
||||||
|
|
|
@ -37,7 +37,7 @@ CONFIG_SYS_PBSIZE=1050
|
||||||
CONFIG_BOARD_EARLY_INIT_R=y
|
CONFIG_BOARD_EARLY_INIT_R=y
|
||||||
CONFIG_HUSH_PARSER=y
|
CONFIG_HUSH_PARSER=y
|
||||||
CONFIG_SYS_PROMPT="Marvell> "
|
CONFIG_SYS_PROMPT="Marvell> "
|
||||||
# CONFIG_CMD_BOOTEFI_HELLO_COMPILE is not set
|
# CONFIG_BOOTEFI_HELLO_COMPILE is not set
|
||||||
CONFIG_CMD_MD5SUM=y
|
CONFIG_CMD_MD5SUM=y
|
||||||
CONFIG_MD5SUM_VERIFY=y
|
CONFIG_MD5SUM_VERIFY=y
|
||||||
CONFIG_CMD_MX_CYCLIC=y
|
CONFIG_CMD_MX_CYCLIC=y
|
||||||
|
|
|
@ -720,7 +720,7 @@ Executing the built in hello world application
|
||||||
|
|
||||||
A hello world UEFI application can be built with::
|
A hello world UEFI application can be built with::
|
||||||
|
|
||||||
CONFIG_CMD_BOOTEFI_HELLO_COMPILE=y
|
CONFIG_BOOTEFI_HELLO_COMPILE=y
|
||||||
|
|
||||||
It can be embedded into the U-Boot binary with::
|
It can be embedded into the U-Boot binary with::
|
||||||
|
|
||||||
|
|
|
@ -552,6 +552,18 @@ config EFI_HTTP_BOOT
|
||||||
directly boot from network.
|
directly boot from network.
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
|
config BOOTEFI_HELLO_COMPILE
|
||||||
|
bool "Compile a standard EFI hello world binary for testing"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
This compiles a standard EFI hello world application with U-Boot so
|
||||||
|
that it can be used with the test/py testing framework. This is useful
|
||||||
|
for testing that EFI is working at a basic level, and for bringing
|
||||||
|
up EFI support on a new architecture.
|
||||||
|
|
||||||
|
No additional space will be required in the resulting U-Boot binary
|
||||||
|
when this option is enabled.
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
source "lib/efi/Kconfig"
|
source "lib/efi/Kconfig"
|
||||||
|
|
|
@ -27,7 +27,7 @@ always += boothart.efi
|
||||||
targets += boothart.o
|
targets += boothart.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
|
ifneq ($(CONFIG_BOOTEFI_HELLO_COMPILE),)
|
||||||
always += helloworld.efi
|
always += helloworld.efi
|
||||||
targets += helloworld.o
|
targets += helloworld.o
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -119,7 +119,7 @@ FDT_DATA = '''
|
||||||
'''
|
'''
|
||||||
|
|
||||||
@pytest.mark.buildconfigspec('bootm_efi')
|
@pytest.mark.buildconfigspec('bootm_efi')
|
||||||
@pytest.mark.buildconfigspec('cmd_bootefi_hello_compile')
|
@pytest.mark.buildconfigspec('BOOTEFI_HELLO_COMPILE')
|
||||||
@pytest.mark.buildconfigspec('fit')
|
@pytest.mark.buildconfigspec('fit')
|
||||||
@pytest.mark.notbuildconfigspec('generate_acpi_table')
|
@pytest.mark.notbuildconfigspec('generate_acpi_table')
|
||||||
@pytest.mark.requiredtool('dtc')
|
@pytest.mark.requiredtool('dtc')
|
||||||
|
|
|
@ -170,7 +170,7 @@ def do_test_efi_helloworld_net(u_boot_console, proto):
|
||||||
assert expected_text not in output
|
assert expected_text not in output
|
||||||
|
|
||||||
@pytest.mark.buildconfigspec('of_control')
|
@pytest.mark.buildconfigspec('of_control')
|
||||||
@pytest.mark.buildconfigspec('cmd_bootefi_hello_compile')
|
@pytest.mark.buildconfigspec('bootefi_hello_compile')
|
||||||
@pytest.mark.buildconfigspec('cmd_tftpboot')
|
@pytest.mark.buildconfigspec('cmd_tftpboot')
|
||||||
def test_efi_helloworld_net_tftp(u_boot_console):
|
def test_efi_helloworld_net_tftp(u_boot_console):
|
||||||
"""Run the helloworld.efi binary via TFTP.
|
"""Run the helloworld.efi binary via TFTP.
|
||||||
|
|
Loading…
Add table
Reference in a new issue