efi: Update README.efi to clarify build and test instructions

The doc has a misleading 'make menuconfig' when building the EFI
application and payload. Clarify this and also update information
on test with QEMU.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
master
Bin Meng 10 years ago committed by Simon Glass
parent 1916ec1267
commit 7a86760924
  1. 33
      doc/README.efi

@ -47,23 +47,25 @@ machine. You can use devices, boot a kernel, etc.
Build Instructions Build Instructions
------------------ ------------------
First choose a board that has EFI support and obtain an EFI implementation First choose a board that has EFI support and obtain an EFI implementation
for that board. It will be either 32-bit or 64-bit. for that board. It will be either 32-bit or 64-bit. Alternatively, you can
opt for using QEMU [1] and the OVMF [2], as detailed below.
To build U-Boot as an EFI application (32-bit EFI required), enable To build U-Boot as an EFI application (32-bit EFI required), enable CONFIG_EFI
CONFIG_EFI and CONFIG_EFI_APP. The efi-x86 config is set up for this. and CONFIG_EFI_APP. The efi-x86 config (efi-x86_defconfig) is set up for this.
Just build U-Boot as normal, e.g.
To build U-Boot as an EFI payload (32-bit or 64-bit EFI can be used), adjust make efi-x86_defconfig
an existing config to enable CONFIG_EFI, CONFIG_EFI_STUB and either make
CONFIG_EFI_STUB_32BIT or CONFIG_EFI_STUB_64BIT.
Then build U-Boot as normal, e.g. To build U-Boot as an EFI payload (32-bit or 64-bit EFI can be used), adjust an
existing config (like qemu-x86_defconfig) to enable CONFIG_EFI, CONFIG_EFI_STUB
and either CONFIG_EFI_STUB_32BIT or CONFIG_EFI_STUB_64BIT. All of these are
boolean Kconfig options. Then build U-Boot as normal, e.g.
make qemu-x86_defconfig make qemu-x86_defconfig
make menuconfig (or make xconfig if you prefer)
# change the settings as above
make make
You will end up with one of these files: You will end up with one of these files depending on what you build for:
u-boot-app.efi - U-Boot EFI application u-boot-app.efi - U-Boot EFI application
u-boot-payload.efi - U-Boot EFI payload application u-boot-payload.efi - U-Boot EFI payload application
@ -71,8 +73,9 @@ You will end up with one of these files:
Trying it out Trying it out
------------- -------------
Qemu is an emulator and it can emulate an x86 machine. You can run the QEMU is an emulator and it can emulate an x86 machine. Please make sure your
payload with something like this: QEMU version is 2.3.0 or above to test this. You can run the payload with
something like this:
mkdir /tmp/efi mkdir /tmp/efi
cp /path/to/u-boot*.efi /tmp/efi cp /path/to/u-boot*.efi /tmp/efi
@ -80,7 +83,8 @@ payload with something like this:
Add -nographic if you want to use the terminal for output. Once it starts Add -nographic if you want to use the terminal for output. Once it starts
type 'fs0:u-boot-payload.efi' to run the payload or 'fs0:u-boot-app.efi' to type 'fs0:u-boot-payload.efi' to run the payload or 'fs0:u-boot-app.efi' to
run the application. 'bios.bin' is the EFI 'BIOS'. run the application. 'bios.bin' is the EFI 'BIOS'. Check [2] to obtain a
prebuilt EFI BIOS for QEMU or you can build one from source as well.
To try it on real hardware, put u-boot-app.efi on a suitable boot medium, To try it on real hardware, put u-boot-app.efi on a suitable boot medium,
such as a USB stick. Then you can type something like this to start it: such as a USB stick. Then you can type something like this to start it:
@ -235,3 +239,6 @@ common/cmd_efi.c
Ben Stoltz, Simon Glass Ben Stoltz, Simon Glass
Google, Inc Google, Inc
July 2015 July 2015
[1] http://www.qemu.org
[2] http://www.tianocore.org/ovmf/

Loading…
Cancel
Save