
Hi Simon,
On Mon, Sep 26, 2016 at 5:27 AM, Simon Glass sjg@chromium.org wrote:
It is useful to have a basic sanity check for EFI loader support. Add a 'bootefi hello' command which loads HelloWord.efi and runs it under U-Boot.
Signed-off-by: Simon Glass sjg@chromium.org
Changes in v2: None
arch/arm/lib/HelloWorld32.efi | Bin 0 -> 11712 bytes arch/arm/lib/Makefile | 7 +++++++ cmd/Kconfig | 10 ++++++++++ cmd/bootefi.c | 26 ++++++++++++++++++++------ include/asm-generic/sections.h | 2 ++ scripts/Makefile.lib | 19 +++++++++++++++++++ 6 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 arch/arm/lib/HelloWorld32.efi
[snip]
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index caa62c6..64378e1 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile @@ -30,6 +30,13 @@ obj-$(CONFIG_CMD_BOOTI) += bootm.o obj-$(CONFIG_CMD_BOOTM) += bootm.o obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o +ifdef CONFIG_ARM64 +# This option does not work for arm64, as there is no binary. +# TODO(sjg@chromium.org): Add this once it is possible to build one +obj-$(CONFIG_CMD_BOOTEFI_HELLO) += HelloWorld64.o +else +obj-$(CONFIG_CMD_BOOTEFI_HELLO) += HelloWorld32.o +endif obj-$(CONFIG_USE_ARCH_MEMSET) += memset.o obj-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o else diff --git a/cmd/Kconfig b/cmd/Kconfig index d28da54..f12fcb8 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -181,6 +181,16 @@ config CMD_BOOTEFI help Boot an EFI image from memory.
+config CMD_BOOTEFI_HELLO
bool "Allow booting a standard EFI hello word for testing"
typo: world
Please fix all other typos which were pointed out in the v1 comment: http://patchwork.ozlabs.org/patch/656430/
depends on CMD_BOOTEFI
default y if CMD_BOOTEFI && !ARM64
help
This adds a standard EFI hello world application to U-Boot so that
it can be used with the 'bootefi hello' command. This is useful
for testing that EFI is woring at a basic level, and for brining
up EFI support on a new architecture.
[snip]
Regards, Bin