blob: ffb50b51ad6c25d9701f227265e28650a466068d [file] [log] [blame]
Wadim Egorovbb20f722025-03-05 05:58:29 +01001.. SPDX-License-Identifier: GPL-2.0+
2.. sectionauthor:: Wadim Egorov <w.egorov@phytec.de>
3
4Environment
5-----------
6
7
8Variables Set at Runtime
9~~~~~~~~~~~~~~~~~~~~~~~~
10
11At runtime the `boot` environment variable is set to reflect the source from which the board was booted. This ensures that the correct boot path is followed for further system initialization.
12
13
14Environment Storage Selection
15~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16
17The environment is loaded from a storage location based on the boot device:
18
19* If booted from eMMC or uSD card, the environment is retrieved from FAT or a fixed offset if configured.
20
21* If booted from SPI, the environment is retrieved from SPI flash if enabled.
22
23For all other boot devices, the environment is not stored persistently (ENVL_NOWHERE).
24
25
26Saving the Environment
27~~~~~~~~~~~~~~~~~~~~~~
28
29The `saveenv` command will store the environment on the same device the board was booted from, ensuring consistency between boot sources and stored configurations.
30
31
32Capsule Updates
33---------------
34
35Capsules for each of these binaries are automatically generated as part of the build process and are named `<binary>-capsule.bin`. For example, the capsule for `u-boot.img` is named `uboot-capsule.bin`.
36
37
38
39Performing an Update
40~~~~~~~~~~~~~~~~~~~~
41
42Each board has a dynamically generated GUID. To retrieve it, run:
43
44.. code-block::
45
46 efidebug capsule esrt
47
48To update the firmware, follow these steps on the board. Ensure the capsule binaries are available on a uSD card.
49
50.. code-block:: bash
51
52 load mmc 1:1 $loadaddr tiboot3-capsule.bin
53 efidebug capsule update $loadaddr
54
55 load mmc 1:1 $loadaddr tispl-capsule.bin
56 efidebug capsule update $loadaddr
57
58 load mmc 1:1 $loadaddr uboot-capsule.bin
59 efidebug capsule update $loadaddr
60
61These commands load the capsule binaries into memory and trigger the EFI capsule update process.
62
63
64Important Notes
65~~~~~~~~~~~~~~~
66
67The updates are applied to the boot device from which the board is currently running. For eMMC, updates are always applied to the first boot partition. Capsule updates can be performed on eMMC, OSPI NOR, or a uSD card, depending on the boot device. For any additional configuration or troubleshooting, refer to :ref:`uefi_capsule_update_ref`.