From ebcbfc7d6de20b094090da3aa3b944cfd8103baa Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sun, 16 Aug 2020 12:27:19 +0200 Subject: doc: update UEFI documentation * UEFI variables can be persisted * describe that the sequence of files loaded before bootefi matters Signed-off-by: Heinrich Schuchardt --- doc/uefi/uefi.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/uefi/uefi.rst b/doc/uefi/uefi.rst index a72e729cc82..728f7bf4e0a 100644 --- a/doc/uefi/uefi.rst +++ b/doc/uefi/uefi.rst @@ -59,6 +59,10 @@ Below you find the output of an example session starting GRUB:: 120832 bytes read in 7 ms (16.5 MiB/s) => bootefi ${kernel_addr_r} ${fdt_addr_r} +The bootefi command uses the device, the file name, and the file size +(environment variable 'filesize') of the most recently loaded file when setting +up the binary for execution. So the UEFI binary should be loaded last. + The environment variable 'bootargs' is passed as load options in the UEFI system table. The Linux kernel EFI stub uses the load options as command line arguments. @@ -217,13 +221,13 @@ which has to be enabled via CONFIG_SUPPORT_EMMC_RPMB=y. Executing the boot manager ~~~~~~~~~~~~~~~~~~~~~~~~~~ -The UEFI specification foresees to define boot entries and boot sequence via UEFI -variables. Booting according to these variables is possible via:: +The UEFI specification foresees to define boot entries and boot sequence via +UEFI variables. Booting according to these variables is possible via:: bootefi bootmgr [fdt address] -As of U-Boot v2018.03 UEFI variables are not persisted and cannot be set at -runtime. +As of U-Boot v2020.10 UEFI variables cannot be set at runtime. The U-Boot +command 'efidebug' can be used to set the variables. Executing the built in hello world application ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3 From 2b3fbcb59f4174e455a6285eaddf1426ed3e76c5 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Mon, 24 Aug 2020 08:27:49 +0200 Subject: efi_loader: use ':' as separator for setenv -i setenv -e -i
, can be used to set a UEFI variable from memory. For separating an address and a size we use ':' in most commands. Let's do the same for setenv -e -i. Signed-off-by: Heinrich Schuchardt --- doc/uefi/uefi.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/uefi/uefi.rst b/doc/uefi/uefi.rst index 728f7bf4e0a..07eb3f01b4e 100644 --- a/doc/uefi/uefi.rst +++ b/doc/uefi/uefi.rst @@ -173,11 +173,11 @@ Sign an image with one of the keys in "db" on your host Now in U-Boot install the keys on your board:: fatload mmc 0:1 PK.auth - setenv -e -nv -bs -rt -at -i ,$filesize PK + setenv -e -nv -bs -rt -at -i :$filesize PK fatload mmc 0:1 KEK.auth - setenv -e -nv -bs -rt -at -i ,$filesize KEK + setenv -e -nv -bs -rt -at -i :$filesize KEK fatload mmc 0:1 db.auth - setenv -e -nv -bs -rt -at -i ,$filesize db + setenv -e -nv -bs -rt -at -i :$filesize db Set up boot parameters on your board:: -- cgit v1.2.3