[U-Boot] [PATCH v2] efi: Update README.efi to clarify build and test instructions
Bin Meng
bmeng.cn at gmail.com
Sat Aug 15 03:44:34 CEST 2015
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 at gmail.com>
---
Changes in v2:
- incorporate comments from Igor, clarify boolean options
doc/README.efi | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/doc/README.efi b/doc/README.efi
index 7c95579..38b9ab1 100644
--- a/doc/README.efi
+++ b/doc/README.efi
@@ -47,20 +47,25 @@ machine. You can use devices, boot a kernel, etc.
Build Instructions
------------------
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
-CONFIG_EFI and CONFIG_EFI_APP. The efi-x86 config is set up for this.
+To build U-Boot as an EFI application (32-bit EFI required), enable CONFIG_EFI
+and CONFIG_EFI_APP. The efi-x86 config (efi-x86_defconfig) is set up for this.
-To build U-Boot as an EFI payload (32-bit or 64-bit EFI can be used), adjust
-an existing config to enable CONFIG_EFI, CONFIG_EFI_STUB and either
-CONFIG_EFI_STUB_32BIT or CONFIG_EFI_STUB_64BIT.
+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.
+For building an EFI application, run:
+ make efi-x86_defconfig
+ make
+
+For building an EFI payload, run:
make qemu-x86_defconfig
- make menuconfig (or make xconfig if you prefer)
- # change the settings as above
make
You will end up with one of these files:
@@ -71,8 +76,9 @@ You will end up with one of these files:
Trying it out
-------------
-Qemu is an emulator and it can emulate an x86 machine. You can run the
-payload with something like this:
+QEMU is an emulator and it can emulate an x86 machine. Please make sure your
+QEMU version is 2.3.0 or above to test this. You can run the payload with
+something like this:
mkdir /tmp/efi
cp /path/to/u-boot*.efi /tmp/efi
@@ -80,7 +86,8 @@ payload with something like this:
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
-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,
such as a USB stick. Then you can type something like this to start it:
@@ -235,3 +242,6 @@ common/cmd_efi.c
Ben Stoltz, Simon Glass
Google, Inc
July 2015
+
+[1] http://www.qemu.org
+[2] http://www.tianocore.org/ovmf/
--
1.8.2.1
More information about the U-Boot
mailing list