mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-13 00:17:23 +00:00
Pull request efi-2024-04-rc5-2
Documentation: * patman: Properly document the patchwork_url setting * doc: man-page for if * colibri-imx8x, apalis-imx8: update board documentation UEFI: * correct handling of EFI binary return code * don't show usage help if EFI binary fails. * correct error handling for bootefi selftest command -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmX7524ACgkQhO4vgnE3 U0v8hg//fSetKqpliNYMwWZ2YU37U6dVo12tjkAuQl2XDhPpdOu6JbO1DpGD/J7/ sE1Ldi6Ngl5svdE5T0QMhyWxpqWIjwpAUYA8/7MipDNANzr5VgsDAXUp3Keh0NeH UoLQVz1MC9Azij9neahvNQxTYqf62NFeiCLyJH0I2dQ5Cecp2RjhV5Si70ji+TjC Fr47TuA7+dnvcYgVLhGfGKZdac9FTaI/6zJ/sbgL7qDmGTVHJlKvpP9gvg7hIFYR oKih/KtgFXNfkglJ8dF5wGg2urER2kkxAJbjE7Zf+6M8H+sVzQ5N7hnfHMkepWxz hm8R9+PxV+LFVJWRu37vm/wxdbEZr4N0M5OA09qvJNfMwTpt3TMrUP92zsgVtsxc byAtXUocyX6wjdDD8yYHf0DkA//9kcQvx+YBgu0u1jruuUHW4zzuafRDxHsebLR9 LnaZEgcyRtE+SAcGz4blzBYIukDxLR75Dbm7kS1x3F/l3gRKuX97jKuWsr+eCdH0 P4bZvpvkWbOpUi10XF+cXyXoSIL6f1RrFxPyizPBXHHvSgaIWkspZ70O/RLyX28t 3lpJkTak2RFQDfA4UARbuBgGd9d8bTVcZBWlX5yihP1nX17X2WzyuvblmlQffCtV B/RiccOw2KGBidbT6RofbNoer51BW9aijAWjg6enOFRBe1ZNh88= =yiZ0 -----END PGP SIGNATURE----- Merge tag 'efi-2024-04-rc5-2' of https://source.denx.de/u-boot/custodians/u-boot-efi Pull request efi-2024-04-rc5-2 Documentation: * patman: Properly document the patchwork_url setting * doc: man-page for if * colibri-imx8x, apalis-imx8: update board documentation UEFI: * correct handling of EFI binary return code * don't show usage help if EFI binary fails. * correct error handling for bootefi selftest command
This commit is contained in:
commit
5397daaed8
28 changed files with 165 additions and 83 deletions
|
@ -154,9 +154,7 @@ static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc,
|
|||
!strcmp(argv[1], "bootmgr")) {
|
||||
ret = efi_bootmgr_run(fdt);
|
||||
|
||||
if (ret == EFI_INVALID_PARAMETER)
|
||||
return CMD_RET_USAGE;
|
||||
else if (ret)
|
||||
if (ret != EFI_SUCCESS)
|
||||
return CMD_RET_FAILURE;
|
||||
|
||||
return CMD_RET_SUCCESS;
|
||||
|
@ -173,9 +171,7 @@ static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc,
|
|||
}
|
||||
|
||||
ret = efi_install_fdt(fdt);
|
||||
if (ret == EFI_INVALID_PARAMETER)
|
||||
return CMD_RET_USAGE;
|
||||
else if (ret != EFI_SUCCESS)
|
||||
if (ret != EFI_SUCCESS)
|
||||
return CMD_RET_FAILURE;
|
||||
|
||||
return do_efi_selftest();
|
||||
|
@ -218,9 +214,7 @@ static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc,
|
|||
|
||||
ret = efi_binary_run(image_buf, size, fdt);
|
||||
|
||||
if (ret == EFI_INVALID_PARAMETER)
|
||||
return CMD_RET_USAGE;
|
||||
else if (ret)
|
||||
if (ret != EFI_SUCCESS)
|
||||
return CMD_RET_FAILURE;
|
||||
|
||||
return CMD_RET_SUCCESS;
|
||||
|
|
|
@ -20,36 +20,36 @@ Quick Start
|
|||
Get and Build the ARM Trusted Firmware
|
||||
--------------------------------------
|
||||
|
||||
Download the imx-atf repository:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git clone -b lf_v2.6 https://github.com/nxp-imx/imx-atf.git
|
||||
|
||||
Compile it with an aarch64 toolchain:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git clone -b imx_4.14.78_1.0.0_ga https://github.com/nxp-imx/imx-atf
|
||||
$ cd imx-atf/
|
||||
$ make PLAT=imx8qm bl31
|
||||
|
||||
Get scfw_tcm.bin and ahab-container.img
|
||||
---------------------------------------
|
||||
|
||||
Download imx-seco firmware and extract it:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ wget https://github.com/toradex/meta-fsl-bsp-release/blob/toradex-sumo-4.14.78-1.0.0_ga-bringup/imx/meta-bsp/recipes-
|
||||
bsp/imx-sc-firmware/files/mx8qm-apalis-scfw-tcm.bin?raw=true
|
||||
$ mv mx8qm-apalis-scfw-tcm.bin\?raw\=true mx8qm-apalis-scfw-tcm.bin
|
||||
$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.0.bin
|
||||
$ chmod +x firmware-imx-8.0.bin
|
||||
$ ./firmware-imx-8.0.bin
|
||||
$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-seco-5.8.7.bin
|
||||
$ sh imx-seco-5.8.7.bin --auto-accept
|
||||
|
||||
Copy the following binaries to the U-Boot folder:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ cp imx-atf/build/imx8qm/release/bl31.bin .
|
||||
$ cp u-boot/u-boot.bin .
|
||||
|
||||
Copy the following firmware to the U-Boot folder:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ cp firmware-imx-8.0/firmware/seco/ahab-container.img .
|
||||
$ wget https://github.com/toradex/i.MX-System-Controller-Firmware/raw/master/src/scfw_export_mx8qm_b0/build_mx8qm_b0/mx8qm-apalis-scfw-tcm.bin
|
||||
$ cp ../imx-atf/build/imx8qm/release/bl31.bin .
|
||||
$ cp ../imx-seco-5.8.7/firmware/seco/mx8qmb0-ahab-container.img mx8qm-ahab-container.img
|
||||
|
||||
Build U-Boot
|
||||
------------
|
||||
|
@ -64,7 +64,7 @@ Load the U-Boot Binary Using UUU
|
|||
|
||||
Get the latest version of the universal update utility (uuu) aka ``mfgtools 3.0``:
|
||||
|
||||
https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FNXPmicro%2Fmfgtools%2Freleases
|
||||
https://github.com/nxp-imx/mfgtools/releases
|
||||
|
||||
Put the module into USB recovery aka serial downloader mode, connect the USB
|
||||
device to your host and execute ``uuu``:
|
||||
|
|
|
@ -20,26 +20,35 @@ Quick Start
|
|||
Get and Build the ARM Trusted Firmware
|
||||
--------------------------------------
|
||||
|
||||
Download the imx-atf repository:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git clone -b lf_v2.6 https://github.com/nxp-imx/imx-atf.git
|
||||
|
||||
Compile it with an aarch64 toolchain:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git clone -b toradex_imx_5.4.70_2.3.0 http://git.toradex.com/cgit/imx-atf.git/
|
||||
$ make PLAT=imx8qx bl31 -C imx-atf
|
||||
|
||||
Get scfw_tcm.bin and ahab-container.img
|
||||
---------------------------------------
|
||||
|
||||
Download imx-seco firmware and extract it:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ wget https://github.com/toradex/i.MX-System-Controller-Firmware/raw/master/src/scfw_export_mx8qx_b0/build_mx8qx_b0/mx8qx-colibri-scfw-tcm.bin
|
||||
$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-seco-3.8.1.bin
|
||||
$ sh imx-seco-3.8.1.bin --auto-accept
|
||||
$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-seco-5.8.7.bin
|
||||
$ sh imx-seco-5.8.7.bin --auto-accept
|
||||
|
||||
Copy the following firmware to the U-Boot folder:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ cp imx-atf/build/imx8qx/release/bl31.bin .
|
||||
$ cp imx-seco-3.8.1/firmware/seco/mx8qxc0-ahab-container.img mx8qx-ahab-container.img
|
||||
$ wget https://github.com/toradex/i.MX-System-Controller-Firmware/raw/master/src/scfw_export_mx8qx_b0/build_mx8qx_b0/mx8qx-colibri-scfw-tcm.bin
|
||||
$ cp ../imx-atf/build/imx8qx/release/bl31.bin .
|
||||
$ cp ../imx-seco-5.8.7/firmware/seco/mx8qxc0-ahab-container.img mx8qx-ahab-container.img
|
||||
|
||||
Build U-Boot
|
||||
------------
|
||||
|
@ -54,7 +63,7 @@ Load the U-Boot Binary Using UUU
|
|||
|
||||
Get the latest version of the universal update utility (uuu) aka ``mfgtools 3.0``:
|
||||
|
||||
https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fgithub.com%2FNXPmicro%2Fmfgtools%2Freleases
|
||||
https://github.com/nxp-imx/mfgtools/releases
|
||||
|
||||
Put the module into USB recovery aka serial downloader mode, connect the USB
|
||||
device to your host and execute ``uuu``:
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
acpi command
|
||||
============
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
bootdev command
|
||||
===============
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
bootflow command
|
||||
================
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
bootmeth command
|
||||
================
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
cbsysinfo
|
||||
=========
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
cedit command
|
||||
=============
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
cli command
|
||||
===========
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
dm command
|
||||
==========
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
fdt command
|
||||
===========
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
font command
|
||||
============
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
for command
|
||||
===========
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
history command
|
||||
===============
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
host command
|
||||
============
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
72
doc/usage/cmd/if.rst
Normal file
72
doc/usage/cmd/if.rst
Normal file
|
@ -0,0 +1,72 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
.. index::
|
||||
single: if (command)
|
||||
|
||||
if command
|
||||
==========
|
||||
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
if <test statement>
|
||||
then
|
||||
<statements>
|
||||
fi
|
||||
|
||||
if <test statement>
|
||||
then
|
||||
<statements>
|
||||
else
|
||||
<statements>
|
||||
fi
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
The if command is used to conditionally execute statements.
|
||||
|
||||
test statement
|
||||
Any command. The test statement set the $? variable. If the value of
|
||||
$? becomes 0 (true) the statements after the **then** statement will
|
||||
be executed. Otherwise the statements after the **else** statement.
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
The examples shows how the value of a numeric variable can be tested with
|
||||
**itest**.
|
||||
|
||||
::
|
||||
|
||||
=> a=1; if itest $a == 0; then echo true; else echo false; fi
|
||||
false
|
||||
=> a=0; if itest $a == 0; then echo true; else echo false; fi
|
||||
true
|
||||
|
||||
In the following example we try to load an EFI binary via TFTP. If loading
|
||||
succeeds, the binary is executed.
|
||||
|
||||
::
|
||||
|
||||
if tftp $kernel_addr_r shellriscv64.efi; then bootefi $kernel_addr_r; fi
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The value of $? is the return value of the last executed statement.
|
||||
|
||||
::
|
||||
|
||||
=> if true; then true; else true; fi; echo $?
|
||||
0
|
||||
=> if false; then true; else true; fi; echo $?
|
||||
0
|
||||
=> if false; then false; else false; fi; echo $?
|
||||
1
|
||||
=> if true; then false; else false; fi; echo $?
|
||||
1
|
||||
=> if false; then true; fi; echo $?
|
||||
1
|
|
@ -6,8 +6,8 @@
|
|||
md command
|
||||
==========
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
mtrr command
|
||||
============
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
mtrr [list]
|
||||
mtrr set <reg> <type> <start> <size>
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
panic command
|
||||
=============
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
part command
|
||||
============
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
sf command
|
||||
==========
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
sm command
|
||||
==========
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
trace command
|
||||
=============
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
ut command
|
||||
==========
|
||||
|
||||
Synopis
|
||||
-------
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ Shell commands
|
|||
cmd/gpt
|
||||
cmd/history
|
||||
cmd/host
|
||||
cmd/if
|
||||
cmd/imxtract
|
||||
cmd/load
|
||||
cmd/loadb
|
||||
|
|
|
@ -125,7 +125,7 @@ efi_status_t efi_run_image(void *source_buffer, efi_uintn_t source_size)
|
|||
efi_handle_t mem_handle = NULL, handle;
|
||||
struct efi_device_path *file_path = NULL;
|
||||
struct efi_device_path *msg_path;
|
||||
efi_status_t ret, ret2;
|
||||
efi_status_t ret;
|
||||
u16 *load_options;
|
||||
|
||||
if (!bootefi_device_path || !bootefi_image_path) {
|
||||
|
@ -172,11 +172,17 @@ efi_status_t efi_run_image(void *source_buffer, efi_uintn_t source_size)
|
|||
ret = do_bootefi_exec(handle, load_options);
|
||||
|
||||
out:
|
||||
ret2 = efi_uninstall_multiple_protocol_interfaces(mem_handle,
|
||||
&efi_guid_device_path,
|
||||
file_path, NULL);
|
||||
if (mem_handle) {
|
||||
efi_status_t r;
|
||||
|
||||
r = efi_uninstall_multiple_protocol_interfaces(
|
||||
mem_handle, &efi_guid_device_path, file_path, NULL);
|
||||
if (r != EFI_SUCCESS)
|
||||
log_err("Uninstalling protocol interfaces failed\n");
|
||||
}
|
||||
efi_free_pool(file_path);
|
||||
return (ret != EFI_SUCCESS) ? ret : ret2;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -144,7 +144,7 @@ patman.py. For reference, the useful ones (at the moment) shown below
|
|||
process_tags: False
|
||||
verbose: True
|
||||
smtp_server: /path/to/sendmail
|
||||
patchwork_server: https://patchwork.ozlabs.org
|
||||
patchwork_url: https://patchwork.ozlabs.org
|
||||
|
||||
If you want to adjust settings (or aliases) that affect just a single
|
||||
project you can add a section that looks like [project_settings] or
|
||||
|
@ -248,9 +248,9 @@ Series-links: [id | version:id]...
|
|||
|
||||
Series-patchwork-url: url
|
||||
This allows specifying the Patchwork URL for a branch. This overrides
|
||||
both the setting files and the command-line argument. The URL should
|
||||
include the protocol and web site, with no trailing slash, for example
|
||||
'https://patchwork.ozlabs.org/project'
|
||||
both the setting files ("patchwork_url") and the command-line argument.
|
||||
The URL should include the protocol and web site, with no trailing slash,
|
||||
for example 'https://patchwork.ozlabs.org/project'
|
||||
|
||||
Cover-letter:
|
||||
Sets the cover letter contents for the series. The first line
|
||||
|
|
Loading…
Reference in a new issue