mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-05-04 12:21:03 +02:00
Merge tag 'efi-2026-01-rc1-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2026-01-rc1-2 CI: * https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/28024 Documentation: * develop: virtio: Fix qemu example (true/false -> on/off) * separate read and write command documentation * usage: Add general rule for `$?` * askenv: Reword and remove return value * seama: Reword return value section * usage: Use glob for all commands * Fix typos and formatting UEFI: * console: support editable input fields
This commit is contained in:
commit
9094482ca7
@ -1780,7 +1780,7 @@ menu "Image support"
|
||||
config IMAGE_PRE_LOAD
|
||||
bool "Image pre-load support"
|
||||
help
|
||||
Enable an image pre-load stage in the SPL.
|
||||
Enable an image pre-load stage.
|
||||
This pre-load stage allows to do some manipulation
|
||||
or check (for example signature check) on an image
|
||||
before launching it.
|
||||
@ -1812,7 +1812,7 @@ config IMAGE_PRE_LOAD_SIG
|
||||
u-boot.
|
||||
|
||||
config SPL_IMAGE_PRE_LOAD_SIG
|
||||
bool "Image pre-load signature support witin SPL"
|
||||
bool "Image pre-load signature support within SPL"
|
||||
depends on SPL_IMAGE_PRE_LOAD && IMAGE_PRE_LOAD_SIG
|
||||
select SPL_FIT_SIGNATURE
|
||||
select SPL_RSA
|
||||
|
||||
@ -1662,7 +1662,7 @@ int fit_check_format(const void *fit, ulong size)
|
||||
|
||||
if (CONFIG_IS_ENABLED(FIT_FULL_CHECK)) {
|
||||
/*
|
||||
* If we are not given the size, make do wtih calculating it.
|
||||
* If we are not given the size, make do with calculating it.
|
||||
* This is not as secure, so we should consider a flag to
|
||||
* control this.
|
||||
*/
|
||||
|
||||
@ -974,6 +974,8 @@ static efi_status_t handle_user_input(u16 *buf, int buf_size,
|
||||
if (!tmp)
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
|
||||
/* Populate tmp so user can edit existing string */
|
||||
u16_strcpy(tmp, buf);
|
||||
ret = efi_console_get_u16_string(cin, tmp, buf_size, NULL, 4, cursor_col);
|
||||
if (ret == EFI_SUCCESS)
|
||||
u16_strcpy(buf, tmp);
|
||||
|
||||
@ -288,7 +288,7 @@ The full devicetree is available to U-Boot proper, but normally only a subset
|
||||
Using several DTBs in the SPL (SPL_MULTI_DTB_FIT Kconfig option)
|
||||
----------------------------------------------------------------
|
||||
In some rare cases it is desirable to let SPL be able to select one DTB among
|
||||
many. This usually not very useful as the DTB for the SPL is small and usually
|
||||
many. This is usually not very useful as the DTB for the SPL is small and usually
|
||||
fits several platforms. However the DTB sometimes include information that do
|
||||
work on several platforms (like IO tuning parameters).
|
||||
In this case it is possible to use SPL_MULTI_DTB_FIT Kconfig option. This option
|
||||
|
||||
@ -45,7 +45,7 @@ An additional problem with the device tree in U-Boot is that it is read-only,
|
||||
and the current mechanisms don't allow easy manipulation of the device tree
|
||||
after the driver model has been initialized. While migrating to a live device
|
||||
tree (at least after the relocation) would greatly simplify the solution of
|
||||
this problem, it is a non-negligible task to implement it, an a interim
|
||||
this problem, it is a non-negligible task to implement it, an ad interim
|
||||
solution is needed to address the problem at least in the medium-term.
|
||||
|
||||
Hence, we propose a solution to this problem by offering a board-specific
|
||||
|
||||
@ -118,9 +118,9 @@ By default QEMU creates VirtIO legacy devices by default. To create non-legacy
|
||||
|
||||
$ qemu-system-i386 -nographic -bios u-boot.rom \
|
||||
-netdev tap,ifname=tap0,id=net0 \
|
||||
-device virtio-net-pci,netdev=net0,disable-legacy=true,disable-modern=false \
|
||||
-device virtio-net-pci,netdev=net0,disable-legacy=on,disable-modern=off \
|
||||
-drive if=none,file=test.img,format=raw,id=hd0 \
|
||||
-device virtio-blk-pci,drive=hd0,disable-legacy=true,disable-modern=false
|
||||
-device virtio-blk-pci,drive=hd0,disable-legacy=on,disable-modern=off
|
||||
|
||||
A 'virtio' command is provided in U-Boot shell.
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ run. Type this::
|
||||
|
||||
make tcheck
|
||||
|
||||
You can also run a selection tests in parallel with::
|
||||
You can also run a selection of tests in parallel with::
|
||||
|
||||
make pcheck
|
||||
|
||||
@ -39,7 +39,7 @@ are run. See :doc:`pytest/usage` for more information.
|
||||
Sandbox
|
||||
-------
|
||||
U-Boot can be built as a user-space application (e.g. for Linux). This
|
||||
allows test to be executed without needing target hardware. The 'sandbox'
|
||||
allows tests to be executed without needing target hardware. The 'sandbox'
|
||||
target provides this feature and it is widely used in tests.
|
||||
|
||||
See :doc:`tests_sandbox` for more information.
|
||||
|
||||
@ -354,7 +354,7 @@ Writing Out Trace Data
|
||||
----------------------
|
||||
|
||||
Once the trace data is in an output buffer in memory there are various ways
|
||||
to transmit it to the host. Notably you can use tftput to send the data
|
||||
to transmit it to the host. Notably you can use tftpput to send the data
|
||||
over a network link::
|
||||
|
||||
fakegocmd=trace pause; usb start; set autoload n; bootp;
|
||||
|
||||
@ -208,7 +208,7 @@ option and the format of their configuration are listed in
|
||||
.TQ
|
||||
.BI \-\-secondary\-config " secondary-configuration"
|
||||
Some image types support a second set of configuration data. The image types
|
||||
which support secondary configuration and the formap of their configuration are
|
||||
which support secondary configuration and the format of their configuration are
|
||||
listed in
|
||||
.BR CONFIGURATION .
|
||||
.
|
||||
@ -396,7 +396,7 @@ when used together with -K and/or -k options.
|
||||
.BI \-\-key\-dest " key-destination"
|
||||
Specifies a compiled device tree binary file (typically .dtb) to write
|
||||
public key information into. When a private key is used to sign an image,
|
||||
the corresponding public key is written into this file for for run-time
|
||||
the corresponding public key is written into this file for run-time
|
||||
verification. Typically the file here is the device tree binary used by
|
||||
CONFIG_OF_CONTROL in U-Boot.
|
||||
.
|
||||
|
||||
@ -90,8 +90,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The command is available if CONFIG_CMD_ARMFFA=y and CONFIG_ARM_FFA_TRANSPORT=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true) on success, 1 (false) on failure.
|
||||
|
||||
@ -42,9 +42,8 @@ Value of a environment variable env1 without message and size parameters:
|
||||
|
||||
::
|
||||
|
||||
=> askenv env1;echo $?
|
||||
=> askenv env1
|
||||
Please enter 'env1': val1
|
||||
0
|
||||
=> printenv env1
|
||||
env1=val1
|
||||
|
||||
@ -52,9 +51,8 @@ Value of a environment variable env2 with message and size parameters:
|
||||
|
||||
::
|
||||
|
||||
=> askenv env2 Please type-in a value for env2: 10;echo $?
|
||||
=> askenv env2 Please type-in a value for env2: 10
|
||||
Please type-in a value for env2: 1234567890123
|
||||
0
|
||||
=> printenv env2
|
||||
env2=1234567890
|
||||
|
||||
@ -62,31 +60,12 @@ Value of a environment variable env3 with size parameter only:
|
||||
|
||||
::
|
||||
|
||||
=> askenv env3 10;echo $?
|
||||
=> askenv env3 10
|
||||
Please enter 'env3': val3
|
||||
0
|
||||
=> printenv env3
|
||||
env3=val3
|
||||
|
||||
Return Value of askenv command, when used without any other arguments:
|
||||
|
||||
::
|
||||
|
||||
=> askenv;echo $?
|
||||
askenv - get environment variables from stdin
|
||||
|
||||
Usage:
|
||||
askenv name [message] [size]
|
||||
- display 'message' and get environment variable 'name' from stdin (max 'size' chars)
|
||||
1
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
The askenv command is only available if CMD_ASKENV=y
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is set to 0 (true).
|
||||
If no other arguments are specified (along with askenv), it is set to 1 (false).
|
||||
|
||||
@ -115,8 +115,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The bdinfo command is available if CONFIG_CMD_BDI=y.
|
||||
|
||||
Return code
|
||||
-----------
|
||||
|
||||
The return code $? is 0 (true).
|
||||
|
||||
@ -99,8 +99,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The bind command is only available if CONFIG_CMD_BIND=y.
|
||||
|
||||
Return code
|
||||
-----------
|
||||
|
||||
The return code $? is 0 (true) on success and 1 (false) on failure.
|
||||
|
||||
@ -69,9 +69,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The blkcache command is only available if CONFIG_CMD_BLOCK_CACHE=y.
|
||||
|
||||
Return code
|
||||
-----------
|
||||
|
||||
If the command succeeds, the return code $? is set 0 (true). In case of an
|
||||
error the return code is set to 1 (false).
|
||||
|
||||
@ -45,8 +45,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The cat command is only available if CONFIG_CMD_CAT=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is set to 0 (true) if the file is readable, otherwise it returns a non-zero error code.
|
||||
|
||||
@ -70,8 +70,3 @@ compiled::
|
||||
modern
|
||||
=> cli set old
|
||||
Want to set current parser to old, but its code was not compiled!
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? indicates whether the command succeeded.
|
||||
|
||||
@ -22,8 +22,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The cls command is only available if CONFIG_CMD_CLS=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true) on success and 1 (false) on failure.
|
||||
|
||||
@ -79,9 +79,3 @@ Configuration
|
||||
The cp command is available if CONFIG_CMD_MEMORY=y. Support for 64 bit words
|
||||
(cp.q) is only available on 64-bit targets. Copying to flash depends on
|
||||
CONFIG_MTD_NOR_FLASH=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is set to 0 (true) if the command was successfully,
|
||||
1 (false) otherwise.
|
||||
|
||||
@ -93,9 +93,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The cpu command is available if CONFIG_CMD_CPU=y.
|
||||
|
||||
Return code
|
||||
-----------
|
||||
|
||||
The return value $? is set to 0 (true) if the command is successful,
|
||||
1 (false) otherwise.
|
||||
|
||||
@ -25,11 +25,6 @@ Configuration
|
||||
|
||||
The cpuid command is only available on x86.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true).
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
|
||||
@ -47,9 +47,3 @@ Configuration
|
||||
|
||||
The dmareset command is only available if CONFIG_CMD_C5_PL330_DMA=y in
|
||||
"Shell scripting commands".
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
If the command succeeds, the return value $? is set to 0 (true).
|
||||
If an error occurs, the return value $? is set to 1 (false).
|
||||
|
||||
@ -64,9 +64,3 @@ Configuration
|
||||
|
||||
The ebtupdate command is only available if CONFIG_CMD_EBTUPDATE=y and
|
||||
only on Tegra 2 and Tegra 3 configurations.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is set to 0 (true) if everything went successfully. If an
|
||||
error occurs, the return value $? is set to 1 (false).
|
||||
|
||||
@ -46,9 +46,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The fatinfo command is only available if CONFIG_CMD_FAT=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is set to 0 (true) if the partition is a FAT partition.
|
||||
Otherwise it is set to 1 (false).
|
||||
|
||||
@ -66,8 +66,3 @@ address and expand it to 0xf000 in size::
|
||||
Working FDT set to 10000
|
||||
=> md 10000 4
|
||||
00010000: edfe0dd0 00f00000 78000000 7c270000 ...........x..'|
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? indicates whether the command succeeded.
|
||||
|
||||
@ -54,9 +54,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The command is only available if CONFIG_CONSOLE_TRUETYPE=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true) if the command completes.
|
||||
The return value is 1 (false) if the command fails.
|
||||
|
||||
@ -168,9 +168,3 @@ Configuration
|
||||
|
||||
The fuse commands are available if CONFIG_CMD_FUSE=y.
|
||||
The fuse writebuff command is available if CONFIG_CMD_FUSE_WRITEBUFF=y.
|
||||
|
||||
Return code
|
||||
-----------
|
||||
|
||||
The return value $? is set to 0 (true) if the command is successful,
|
||||
1 (false) otherwise.
|
||||
|
||||
@ -127,9 +127,3 @@ Configuration
|
||||
|
||||
The *gpio* command is only available if CONFIG_CMD_GPIO=y.
|
||||
The *gpio read* command is only available if CONFIG_CMD_GPIO_READ=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
If the command succeds the return value $? is set to 0. If an error occurs, the
|
||||
return value $? is set to 1.
|
||||
|
||||
@ -111,9 +111,3 @@ Unbind a device::
|
||||
=> host info
|
||||
dev blocks label path
|
||||
1 2048 fat 1MB.fat32.img
|
||||
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? indicates whether the command succeeded.
|
||||
|
||||
@ -129,12 +129,6 @@ Configuration
|
||||
|
||||
The ``i3c`` command is only available if CONFIG_CMD_I3C=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
If the command succeeds, the return value ``$?`` is set to 0. If an error
|
||||
occurs, the return value ``$?`` is set to 1.
|
||||
|
||||
Note
|
||||
----
|
||||
|
||||
|
||||
@ -76,9 +76,3 @@ Configuration
|
||||
The imxtract command is only available if CONFIG_CMD_XIMG=y. Support for FIT
|
||||
images requires CONFIG_FIT=y. Support for legacy U-Boot images requires
|
||||
CONFIG_LEGACY_IMAGE_FORMAT=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
On success the return value $? of the command is 0 (true). On failure the
|
||||
return value is 1 (false).
|
||||
|
||||
@ -66,8 +66,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The command is only available if CONFIG_CMD_LOADB=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true) on success, 1 (false) on error.
|
||||
|
||||
@ -43,10 +43,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The command is only available if CONFIG_CMD_LOADM=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is set 0 (true) if the loading is succefull, and
|
||||
is set to 1 (false) in case of error.
|
||||
|
||||
|
||||
@ -92,8 +92,3 @@ Configuration
|
||||
|
||||
The command is only available if CONFIG_CMD_LOADS=y. The parameter to set the
|
||||
baud rate is only available if CONFIG_SYS_LOADS_BAUD_CHANGE=y
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true) on success, 1 (false) otherwise.
|
||||
|
||||
@ -73,8 +73,3 @@ The command is only available if CONFIG_CMD_LOADB=y.
|
||||
Initial timeout in seconds while waiting for transfer is configured by
|
||||
config option CMD_LOADXY_TIMEOUT or by env variable $loadxy_timeout.
|
||||
Setting it to 0 means infinite timeout.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true) on success, 1 (false) otherwise.
|
||||
|
||||
@ -70,8 +70,3 @@ The command is only available if CONFIG_CMD_LOADB=y.
|
||||
Initial timeout in seconds while waiting for transfer is configured by
|
||||
config option CMD_LOADXY_TIMEOUT or by env variable $loadxy_timeout.
|
||||
Setting it to 0 means infinite timeout.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true) on success, 1 (false) otherwise.
|
||||
|
||||
@ -38,11 +38,6 @@ Configuration
|
||||
|
||||
The msr command is only available on x86.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true).
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
|
||||
@ -62,8 +62,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The mtest command is enabled by CONFIG_CMD_MEMTEST=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true) if the command succeeds, 1 (false) otherwise.
|
||||
|
||||
@ -63,8 +63,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The optee command is enabled by CONFIG_OPTEE=y and CONFIG_CMD_OPTEE=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true) if the command succeeds, 1 (false) otherwise.
|
||||
|
||||
@ -223,9 +223,3 @@ This shows looking at a device with multiple partition tables::
|
||||
type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
|
||||
guid: a0891d7e-b930-4513-94da-f629dbd637b2
|
||||
=>
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is set to 0 (true) if the command succededd. If an
|
||||
error occurs, the return value $? is set to 1 (false).
|
||||
|
||||
@ -48,9 +48,3 @@ Note that complex prompts require proper quoting:
|
||||
|
||||
Usage:
|
||||
pause [prompt] - Wait until users presses any key. [prompt] can be used to customize the message.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is always set to 0 (true), unless invoked in an invalid
|
||||
manner.
|
||||
|
||||
@ -90,9 +90,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The pinmux command is only available if CONFIG_CMD_PINMUX=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is set to 0 (true) if the command succeded and to 1 (false)
|
||||
otherwise.
|
||||
|
||||
@ -83,9 +83,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The ``pwm`` command is only available if CONFIG_CMD_PWM=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
If the command succeeds, the return value ``$?`` is set to 0. If an error occurs, the
|
||||
return value ``$?`` is set to 1.
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0-or-later:
|
||||
.. SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
read and write commands
|
||||
=======================
|
||||
.. index::
|
||||
single: read (command)
|
||||
|
||||
read command
|
||||
============
|
||||
|
||||
Synopsis
|
||||
--------
|
||||
@ -9,14 +12,12 @@ Synopsis
|
||||
::
|
||||
|
||||
read <interface> <dev[:part|#partname]> <addr> <blk#> <cnt>
|
||||
write <interface> <dev[:part|#partname]> <addr> <blk#> <cnt>
|
||||
|
||||
The read and write commands can be used for raw access to data in
|
||||
block devices (or partitions therein), i.e. without going through a
|
||||
file system.
|
||||
Description
|
||||
-----------
|
||||
|
||||
read
|
||||
----
|
||||
The read command can be used for raw reading data from a block device
|
||||
(or a partition therein), i.e. without going through a file system.
|
||||
|
||||
The block device is specified using the <interface> (e.g. "mmc") and
|
||||
<dev> parameters. If the block device has a partition table, one can
|
||||
@ -25,20 +26,24 @@ partition name (using the #partname syntax). The command then reads
|
||||
the <cnt> blocks of data starting at block number <blk#> of the given
|
||||
device/partition to the memory address <addr>.
|
||||
|
||||
write
|
||||
-----
|
||||
|
||||
The write command is completely equivalent to the read command, except
|
||||
of course that the transfer direction is reversed.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Read 2 MiB from partition 3 of mmc device 2 to $loadaddr
|
||||
read mmc 2.3 $loadaddr 0 0x1000
|
||||
|
||||
# Read 16 MiB from the partition named 'kernel' of mmc device 1 to $loadaddr
|
||||
read mmc 1#kernel $loadaddr 0 0x8000
|
||||
|
||||
# Write to the third sector of the partition named 'bootdata' of mmc device 0
|
||||
write mmc 0#bootdata $loadaddr 2 1
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
The read command is only available if CONFIG_CMD_READ=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The command sets the return value $? to 0 (true) on success or to 1 (false) in
|
||||
case of an error.
|
||||
|
||||
@ -84,8 +84,3 @@ Configuration
|
||||
|
||||
The command is only available if CONFIG_CMD_SAVES=y. The parameter to set the
|
||||
baud rate is only available if CONFIG_SYS_LOADS_BAUD_CHANGE=y
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true) on success, 1 (false) otherwise.
|
||||
|
||||
@ -119,11 +119,4 @@ Configuration
|
||||
The scmi command is only available if CONFIG_CMD_SCMI=y.
|
||||
Default n because this command is mainly for debug purpose.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value ($?) is set to 0 if the operation succeeded,
|
||||
1 if the operation failed or -1 if the operation failed due to
|
||||
a syntax error.
|
||||
|
||||
.. _`SCMI specification`: https://developer.arm.com/documentation/den0056/e/?lang=en
|
||||
|
||||
@ -56,8 +56,5 @@ The command is available if CONFIG_CMD_SEAMA=y.
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is set 0 (true) if the loading is succefull, and
|
||||
is set to 1 (false) in case of error.
|
||||
|
||||
The environment variable $seama_image_size is set to the size of the
|
||||
loaded SEAMA image.
|
||||
Along with the general rules for setting $?, the environment variable
|
||||
$seama_image_size is set to the size of the loaded SEAMA image.
|
||||
|
||||
@ -147,10 +147,3 @@ Configuration
|
||||
* The *setexpr gsub* and *setexpr sub* sub-commands are only available
|
||||
if CONFIG_REGEX=y. For an overview of the supported regex syntax,
|
||||
see :doc:`test`.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is set to 0 (true) if the operation was successful.
|
||||
|
||||
If an error occurs, the return value $? is set to 1 (false).
|
||||
|
||||
@ -35,9 +35,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The size command is only available if CONFIG_CMD_FS_GENERIC=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is set to 0 (true) if the command succeded and to 1 (false)
|
||||
otherwise.
|
||||
|
||||
@ -86,8 +86,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The command is only available if CONFIG_CMD_SMBIOS=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true) on success, 1 (false) otherwise.
|
||||
|
||||
@ -56,8 +56,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The sound command is enabled by CONFIG_CMD_SOUND=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true) if the command succeeds, 1 (false) otherwise.
|
||||
|
||||
@ -188,9 +188,3 @@ The FIT image file format requires CONFIG_FIT=y.#
|
||||
The legacy U-Boot image file format requires CONFIG_LEGACY_IMAGE_FORMAT=y.
|
||||
On hardened systems support for the legacy U-Boot image format should be
|
||||
disabled as these images cannot be signed and verified.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
If the scripts is executed successfully, the return value $? is 0 (true).
|
||||
Otherwise it is 1 (false).
|
||||
|
||||
@ -45,9 +45,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The *temperature* command is only available if CONFIG_CMD_TEMPERATURE=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is set to 0 (true) if the command succeeded and to 1 (false)
|
||||
otherwise.
|
||||
|
||||
@ -79,8 +79,3 @@ after which an ACK response is required. The window size defaults to 1.
|
||||
|
||||
If CONFIG_TFTP_TSIZE=y, the progress bar is limited to 50 '#' characters.
|
||||
Otherwise an '#' is written per UDP package which may decrease performance.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true) on success and 1 (false) otherwise.
|
||||
|
||||
@ -91,8 +91,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The unbind command is only available if CONFIG_CMD_BIND=y.
|
||||
|
||||
Return code
|
||||
-----------
|
||||
|
||||
The return code $? is 0 (true) on success and 1 (false) on failure.
|
||||
|
||||
@ -73,8 +73,3 @@ Configuration
|
||||
-------------
|
||||
|
||||
The command is only available if CONFIG_CMD_WDT=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 if the command succeeds, 1 upon failure.
|
||||
|
||||
@ -184,8 +184,3 @@ CONFIG_WGET_CACERT=y (for the wget cacert command).
|
||||
TCP Selective Acknowledgments in the legacy network stack can be enabled via
|
||||
CONFIG_PROT_TCP_SACK=y. This will improve the download speed. Selective
|
||||
Acknowledgments are enabled by default with lwIP.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The return value $? is 0 (true) on success and 1 (false) otherwise.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
.. SPDX-License-Identifier: GPL-2.0-or-later:
|
||||
.. SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
.. index::
|
||||
single: write (command)
|
||||
@ -6,4 +6,41 @@
|
||||
write command
|
||||
=============
|
||||
|
||||
See :doc:`read`.
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
write <interface> <dev[:part|#partname]> <addr> <blk#> <cnt>
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
The write command can be used for raw writing data to a block device
|
||||
(or partition therein), i.e. without going through a file system.
|
||||
|
||||
The block device is specified using the <interface> (e.g. "mmc") and
|
||||
<dev> parameters. If the block device has a partition table, one can
|
||||
optionally specify a partition number (using the :part syntax) or
|
||||
partition name (using the #partname syntax). The command then reads
|
||||
the <cnt> blocks of data starting at block number <blk#> of the given
|
||||
device/partition to the memory address <addr>.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Write to the third sector of the partition named 'bootdata' of mmc device 0
|
||||
write mmc 0#bootdata $loadaddr 2 1
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
The write command is only available if CONFIG_CMD_WRITE=y.
|
||||
|
||||
Return value
|
||||
------------
|
||||
|
||||
The command sets the return value $? to 0 (true) on success and to 1 (false) in
|
||||
case of an error.
|
||||
|
||||
@ -55,6 +55,12 @@ General rules
|
||||
command will cause "run" to terminate, i. e. the remaining
|
||||
variables are not executed.
|
||||
|
||||
#. The variable ``$?`` will be set as the return value of any command. The
|
||||
possible values are 0 on success or 1 on any error e. g. invalid syntax or
|
||||
failure of the command. Any exceptions to this are documented by the
|
||||
specific command, e.g. the :doc:`for command <cmd/for>` sets ``$?`` based on
|
||||
the last command run within the loop.
|
||||
|
||||
Representing numbers
|
||||
--------------------
|
||||
|
||||
|
||||
@ -213,7 +213,7 @@ updatefile
|
||||
|
||||
autoload
|
||||
if set to "no" (any string beginning with 'n'),
|
||||
"bootp" and "dhcp" will just load perform a lookup of the
|
||||
"bootp" and "dhcp" will just perform a lookup of the
|
||||
configuration from the BOOTP server, but not try to
|
||||
load any image.
|
||||
|
||||
|
||||
@ -473,7 +473,7 @@ you sign::
|
||||
Here we are overriding the normal device tree file with our one, which
|
||||
contains the public key.
|
||||
|
||||
Now you have a special U-Boot image with the public key. It can verify can
|
||||
Now you have a special U-Boot image with the public key. It can verify any
|
||||
kernel that you sign with the private key as in step 5.
|
||||
|
||||
If you like you can take a look at the public key information that mkimage
|
||||
|
||||
@ -19,85 +19,85 @@ Configuration without overlays
|
||||
------------------------------
|
||||
|
||||
Take a hypothetical board named 'foo' where there are different supported
|
||||
revisions, reva and revb. Assume that both board revisions can use add a bar
|
||||
revisions, reva and revb. Assume that both board revisions can add a bar
|
||||
add-on board, while only the revb board can use a baz add-on board.
|
||||
|
||||
Without using overlays the configuration would be as follows for every case::
|
||||
|
||||
/dts-v1/;
|
||||
/ {
|
||||
images {
|
||||
kernel {
|
||||
data = /incbin/("./zImage");
|
||||
type = "kernel";
|
||||
arch = "arm";
|
||||
os = "linux";
|
||||
load = <0x82000000>;
|
||||
entry = <0x82000000>;
|
||||
};
|
||||
fdt-1 {
|
||||
data = /incbin/("./foo-reva.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm";
|
||||
};
|
||||
fdt-2 {
|
||||
data = /incbin/("./foo-revb.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm";
|
||||
};
|
||||
fdt-3 {
|
||||
data = /incbin/("./foo-reva-bar.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm";
|
||||
};
|
||||
fdt-4 {
|
||||
data = /incbin/("./foo-revb-bar.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm";
|
||||
};
|
||||
fdt-5 {
|
||||
data = /incbin/("./foo-revb-baz.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm";
|
||||
};
|
||||
fdt-6 {
|
||||
data = /incbin/("./foo-revb-bar-baz.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm";
|
||||
};
|
||||
};
|
||||
/dts-v1/;
|
||||
/ {
|
||||
images {
|
||||
kernel {
|
||||
data = /incbin/("./zImage");
|
||||
type = "kernel";
|
||||
arch = "arm";
|
||||
os = "linux";
|
||||
load = <0x82000000>;
|
||||
entry = <0x82000000>;
|
||||
};
|
||||
fdt-1 {
|
||||
data = /incbin/("./foo-reva.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm";
|
||||
};
|
||||
fdt-2 {
|
||||
data = /incbin/("./foo-revb.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm";
|
||||
};
|
||||
fdt-3 {
|
||||
data = /incbin/("./foo-reva-bar.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm";
|
||||
};
|
||||
fdt-4 {
|
||||
data = /incbin/("./foo-revb-bar.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm";
|
||||
};
|
||||
fdt-5 {
|
||||
data = /incbin/("./foo-revb-baz.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm";
|
||||
};
|
||||
fdt-6 {
|
||||
data = /incbin/("./foo-revb-bar-baz.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm";
|
||||
};
|
||||
};
|
||||
|
||||
configurations {
|
||||
default = "foo-reva.dtb;
|
||||
foo-reva.dtb {
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-1";
|
||||
};
|
||||
foo-revb.dtb {
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-2";
|
||||
};
|
||||
foo-reva-bar.dtb {
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-3";
|
||||
};
|
||||
foo-revb-bar.dtb {
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-4";
|
||||
};
|
||||
foo-revb-baz.dtb {
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-5";
|
||||
};
|
||||
foo-revb-bar-baz.dtb {
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-6";
|
||||
};
|
||||
};
|
||||
};
|
||||
configurations {
|
||||
default = "foo-reva.dtb";
|
||||
foo-reva.dtb {
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-1";
|
||||
};
|
||||
foo-revb.dtb {
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-2";
|
||||
};
|
||||
foo-reva-bar.dtb {
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-3";
|
||||
};
|
||||
foo-revb-bar.dtb {
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-4";
|
||||
};
|
||||
foo-revb-baz.dtb {
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-5";
|
||||
};
|
||||
foo-revb-bar-baz.dtb {
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-6";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Note the blob needs to be compiled for each case and the combinatorial explosion of
|
||||
configurations. A typical device tree blob is in the low hunderds of kbytes so a
|
||||
configurations. A typical device tree blob is in the low hundreds of kbytes so a
|
||||
multitude of configuration grows the image quite a bit.
|
||||
|
||||
Booting this image is done by using::
|
||||
@ -117,7 +117,7 @@ Configuration using overlays
|
||||
----------------------------
|
||||
|
||||
Device tree overlays can be applied to a base DT and result in the same blob
|
||||
being passed to the booting kernel. This saves on space and avoid the combinatorial
|
||||
being passed to the booting kernel. This saves on space and avoids the combinatorial
|
||||
explosion problem::
|
||||
|
||||
/dts-v1/;
|
||||
@ -164,7 +164,7 @@ explosion problem::
|
||||
};
|
||||
|
||||
configurations {
|
||||
default = "foo-reva.dtb;
|
||||
default = "foo-reva.dtb";
|
||||
foo-reva.dtb {
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-1", "fdt-2";
|
||||
@ -209,9 +209,9 @@ to be writeable.
|
||||
Configuration using overlays and feature selection
|
||||
--------------------------------------------------
|
||||
|
||||
Although the configuration in the previous section works is a bit inflexible
|
||||
since it requires all possible configuration options to be laid out before
|
||||
hand in the FIT image. For the add-on boards the extra config selection method
|
||||
Although the configuration in the previous section works, it is a bit inflexible
|
||||
since it requires all possible configuration options to be laid out beforehand
|
||||
in the FIT image. For the add-on boards the extra config selection method
|
||||
might make sense.
|
||||
|
||||
Note the two bar & baz configuration nodes. To boot a reva board with
|
||||
|
||||
@ -21,124 +21,14 @@ Use U-Boot
|
||||
Shell commands
|
||||
--------------
|
||||
|
||||
For all commands in U-Boot there are some :ref:`usage/cmdline:General rules`
|
||||
that apply.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
cmd/acpi
|
||||
cmd/addrmap
|
||||
cmd/armffa
|
||||
cmd/askenv
|
||||
cmd/base
|
||||
cmd/bdinfo
|
||||
cmd/bind
|
||||
cmd/blkcache
|
||||
cmd/bootd
|
||||
cmd/bootdev
|
||||
cmd/bootefi
|
||||
cmd/bootelf
|
||||
cmd/bootflow
|
||||
cmd/booti
|
||||
cmd/bootm
|
||||
cmd/bootmenu
|
||||
cmd/bootmeth
|
||||
cmd/bootstd
|
||||
cmd/bootz
|
||||
cmd/button
|
||||
cmd/cat
|
||||
cmd/cbcmos
|
||||
cmd/cbsysinfo
|
||||
cmd/cedit
|
||||
cmd/cli
|
||||
cmd/cls
|
||||
cmd/cmp
|
||||
cmd/coninfo
|
||||
cmd/conitrace
|
||||
cmd/cp
|
||||
cmd/cpu
|
||||
cmd/cpuid
|
||||
cmd/cyclic
|
||||
cmd/dmareset
|
||||
cmd/dm
|
||||
cmd/ebtupdate
|
||||
cmd/echo
|
||||
cmd/efi
|
||||
cmd/eficonfig
|
||||
cmd/env
|
||||
cmd/event
|
||||
cmd/exception
|
||||
cmd/exit
|
||||
cmd/extension
|
||||
cmd/false
|
||||
cmd/fatinfo
|
||||
cmd/fatload
|
||||
cmd/fdt
|
||||
cmd/font
|
||||
cmd/for
|
||||
cmd/fuse
|
||||
cmd/fwu_mdata
|
||||
cmd/gpio
|
||||
cmd/gpt
|
||||
cmd/history
|
||||
cmd/host
|
||||
cmd/if
|
||||
cmd/itest
|
||||
cmd/imxtract
|
||||
cmd/i3c
|
||||
cmd/load
|
||||
cmd/loadb
|
||||
cmd/loadm
|
||||
cmd/loads
|
||||
cmd/loadx
|
||||
cmd/loady
|
||||
cmd/meminfo
|
||||
cmd/mbr
|
||||
cmd/md
|
||||
cmd/mmc
|
||||
cmd/msr
|
||||
cmd/mtest
|
||||
cmd/mtrr
|
||||
cmd/mv
|
||||
cmd/optee
|
||||
cmd/panic
|
||||
cmd/part
|
||||
cmd/pause
|
||||
cmd/pinmux
|
||||
cmd/printenv
|
||||
cmd/pstore
|
||||
cmd/pwm
|
||||
cmd/qfw
|
||||
cmd/read
|
||||
cmd/reset
|
||||
cmd/rng
|
||||
cmd/saves
|
||||
cmd/sb
|
||||
cmd/sbi
|
||||
cmd/scmi
|
||||
cmd/scp03
|
||||
cmd/seama
|
||||
cmd/setexpr
|
||||
cmd/sf
|
||||
cmd/size
|
||||
cmd/sleep
|
||||
cmd/sm
|
||||
cmd/smbios
|
||||
cmd/sntp
|
||||
cmd/sound
|
||||
cmd/source
|
||||
cmd/tcpm
|
||||
cmd/temperature
|
||||
cmd/test
|
||||
cmd/tftpput
|
||||
cmd/trace
|
||||
cmd/true
|
||||
cmd/upl
|
||||
cmd/ums
|
||||
cmd/unbind
|
||||
cmd/ut
|
||||
cmd/wdt
|
||||
cmd/wget
|
||||
cmd/write
|
||||
cmd/xxd
|
||||
cmd/*
|
||||
|
||||
Booting OS
|
||||
----------
|
||||
|
||||
@ -25,7 +25,7 @@ struct cmd_tbl;
|
||||
* @addr_img: Address of image to bootm, as passed to
|
||||
* genimg_get_kernel_addr_fit() for processing:
|
||||
*
|
||||
* NULL: Usees default load address, i.e. image_load_addr
|
||||
* NULL: Uses default load address, i.e. image_load_addr
|
||||
* <addr>: Uses hex address
|
||||
*
|
||||
* For FIT:
|
||||
|
||||
@ -654,10 +654,10 @@ int boot_get_fpga(struct bootm_headers *images);
|
||||
* boot_get_ramdisk() is responsible for finding a valid ramdisk image.
|
||||
* Currently supported are the following ramdisk sources:
|
||||
* - multicomponent kernel/ramdisk image,
|
||||
* - commandline provided address of decicated ramdisk image.
|
||||
* - commandline provided address of dedicated ramdisk image.
|
||||
*
|
||||
* returns:
|
||||
* 0, if ramdisk image was found and valid, or skiped
|
||||
* 0, if ramdisk image was found and valid, or skipped
|
||||
* rd_start and rd_end are set to ramdisk start/end addresses if
|
||||
* ramdisk image is found and valid
|
||||
*
|
||||
@ -739,7 +739,7 @@ int boot_get_fdt_fit(struct bootm_headers *images, ulong addr,
|
||||
* @param bootstage_id ID of starting bootstage to use for progress updates.
|
||||
* This will be added to the BOOTSTAGE_SUB values when
|
||||
* calling bootstage_mark()
|
||||
* @param load_op Decribes what to do with the load address
|
||||
* @param load_op Describes what to do with the load address
|
||||
* @param datap Returns address of loaded image
|
||||
* @param lenp Returns length of loaded image
|
||||
* Return: node offset of image, or -ve error code on error:
|
||||
@ -812,7 +812,7 @@ int fit_get_node_from_config(struct bootm_headers *images,
|
||||
* boot_get_fdt() is responsible for finding a valid flat device tree image.
|
||||
* Currently supported are the following FDT sources:
|
||||
* - multicomponent kernel/ramdisk/FDT image,
|
||||
* - commandline provided address of decicated FDT image.
|
||||
* - commandline provided address of dedicated FDT image.
|
||||
*
|
||||
* Return:
|
||||
* 0, if fdt image was found and valid, or skipped
|
||||
|
||||
@ -1384,7 +1384,9 @@ efi_status_t efi_console_get_u16_string(struct efi_simple_text_input_protocol *c
|
||||
int row, int col)
|
||||
{
|
||||
efi_status_t ret;
|
||||
efi_uintn_t len = 0;
|
||||
efi_uintn_t len;
|
||||
efi_uintn_t cursor;
|
||||
efi_uintn_t i;
|
||||
struct efi_input_key key;
|
||||
|
||||
printf(ANSI_CURSOR_POSITION
|
||||
@ -1393,25 +1395,51 @@ efi_status_t efi_console_get_u16_string(struct efi_simple_text_input_protocol *c
|
||||
|
||||
efi_cin_empty_buffer();
|
||||
|
||||
len = u16_strlen(buf);
|
||||
cursor = len;
|
||||
for (;;) {
|
||||
printf(ANSI_CURSOR_POSITION "%ls"
|
||||
ANSI_CLEAR_LINE_TO_END ANSI_CURSOR_POSITION,
|
||||
row, col, buf, row, col + (int)cursor);
|
||||
do {
|
||||
ret = EFI_CALL(cin->read_key_stroke(cin, &key));
|
||||
mdelay(10);
|
||||
} while (ret == EFI_NOT_READY);
|
||||
|
||||
if (key.unicode_char == u'\b') {
|
||||
if (len > 0)
|
||||
buf[--len] = u'\0';
|
||||
|
||||
printf(ANSI_CURSOR_POSITION
|
||||
"%ls"
|
||||
ANSI_CLEAR_LINE_TO_END, row, col, buf);
|
||||
if (cursor > 0) {
|
||||
if (cursor == len) {
|
||||
buf[--cursor] = u'\0';
|
||||
} else {
|
||||
for (i = cursor - 1; i < len; i++)
|
||||
buf[i] = buf[i + 1];
|
||||
cursor--;
|
||||
}
|
||||
len--;
|
||||
}
|
||||
continue;
|
||||
} else if (key.scan_code == 8) { /* delete */
|
||||
for (i = cursor; i <= len; i++)
|
||||
buf[i] = buf[i + 1];
|
||||
len--;
|
||||
continue;
|
||||
} else if (key.unicode_char == u'\r') {
|
||||
buf[len] = u'\0';
|
||||
return EFI_SUCCESS;
|
||||
} else if (key.unicode_char == 0x3 || key.scan_code == 23) {
|
||||
return EFI_ABORTED;
|
||||
} else if (key.scan_code == 3) { /* Right arrow */
|
||||
cursor += (cursor < len) ? 1 : 0;
|
||||
continue;
|
||||
} else if (key.scan_code == 4) { /* Left arrow */
|
||||
cursor -= (cursor > 0) ? 1 : 0;
|
||||
continue;
|
||||
} else if (key.scan_code == 5) { /* Home */
|
||||
cursor = 0;
|
||||
continue;
|
||||
} else if (key.scan_code == 6) { /* End */
|
||||
cursor = len;
|
||||
continue;
|
||||
} else if (key.unicode_char < 0x20) {
|
||||
/* ignore control codes other than Ctrl+C, '\r' and '\b' */
|
||||
continue;
|
||||
@ -1428,8 +1456,17 @@ efi_status_t efi_console_get_u16_string(struct efi_simple_text_input_protocol *c
|
||||
if (len >= (count - 1))
|
||||
continue;
|
||||
|
||||
buf[len] = key.unicode_char;
|
||||
/*
|
||||
* Insert the character into the middle of the buffer, shift the
|
||||
* characters after the cursor along. The check above ensures we
|
||||
* will never overflow the buffer.
|
||||
* If the cursor is at the end of the string then this will
|
||||
* do nothing.
|
||||
*/
|
||||
for (i = len + 1; i > cursor; i--)
|
||||
buf[i] = buf[i - 1];
|
||||
buf[cursor] = key.unicode_char;
|
||||
cursor++;
|
||||
len++;
|
||||
printf(ANSI_CURSOR_POSITION "%ls", row, col, buf);
|
||||
}
|
||||
}
|
||||
|
||||
@ -272,7 +272,7 @@ Then, in practice binman is often used twice:
|
||||
- Once within the U-Boot build system, for development and testing
|
||||
- Again, outside U-Boot to assembly and final production images
|
||||
|
||||
While the same input binaries are used in each case, you will of course you will
|
||||
While the same input binaries are used in each case, you will of course
|
||||
need to create your own binman command line, like that in `cmd_binman` in
|
||||
the Makefile. You may find the -I and --toolpath options useful. The
|
||||
devicetree file is provided to binman in binary form, so there is no need to
|
||||
@ -1184,7 +1184,7 @@ size is written to the node in an 'uncomp-size' property, if -u is used.
|
||||
|
||||
Compression is also supported for sections. In that case the entire section is
|
||||
compressed in one block, including all its contents. This means that accessing
|
||||
an entry from the section required decompressing the entire section. Also, the
|
||||
an entry from the section requires decompressing the entire section. Also, the
|
||||
size of a section indicates the space that it consumes in its parent section
|
||||
(and typically the image). With compression, the section may contain more data,
|
||||
and the uncomp-size property indicates that, as above. The contents of the
|
||||
@ -1224,8 +1224,8 @@ If you are having trouble figuring out what is going on, you can use
|
||||
Templates
|
||||
=========
|
||||
|
||||
Sometimes multiple images need to be created which have all have a common
|
||||
part. For example, a board may generate SPI and eMMC images which both include
|
||||
Sometimes multiple images need to be created which all have a common part.
|
||||
For example, a board may generate SPI and eMMC images which both include
|
||||
a FIT. Since the FIT includes many entries, it is tedious to repeat them twice
|
||||
in the image description.
|
||||
|
||||
@ -1250,7 +1250,7 @@ Templates provide a simple way to handle this::
|
||||
|
||||
/* things specific to SPI follow */
|
||||
footer {
|
||||
];
|
||||
};
|
||||
|
||||
text {
|
||||
text = "SPI image";
|
||||
@ -1263,7 +1263,7 @@ Templates provide a simple way to handle this::
|
||||
|
||||
/* things specific to MMC follow */
|
||||
footer {
|
||||
];
|
||||
};
|
||||
|
||||
text {
|
||||
text = "MMC image";
|
||||
@ -1330,20 +1330,25 @@ Updating an ELF file
|
||||
|
||||
For the EFI app, where U-Boot is loaded from UEFI and runs as an app, there is
|
||||
no way to update the devicetree after U-Boot is built. Normally this works by
|
||||
creating a new u-boot.dtb.out with he updated devicetree, which is automatically
|
||||
creating a new u-boot.dtb.out with the updated devicetree, which is automatically
|
||||
built into the output image. With ELF this is not possible since the ELF is
|
||||
not part of an image, just a stand-along file. We must create an updated ELF
|
||||
not part of an image, just a stand-alone file. We must create an updated ELF
|
||||
file with the new devicetree.
|
||||
|
||||
This is handled by the --update-fdt-in-elf option. It takes four arguments,
|
||||
separated by comma:
|
||||
|
||||
infile - filename of input ELF file, e.g. 'u-boot's
|
||||
outfile - filename of output ELF file, e.g. 'u-boot.out'
|
||||
begin_sym - symbol at the start of the embedded devicetree, e.g.
|
||||
'__dtb_dt_begin'
|
||||
end_sym - symbol at the start of the embedded devicetree, e.g.
|
||||
'__dtb_dt_end'
|
||||
infile:
|
||||
filename of input ELF file, e.g. 'u-boot's
|
||||
|
||||
outfile:
|
||||
filename of output ELF file, e.g. 'u-boot.out'
|
||||
|
||||
begin_sym:
|
||||
symbol at the start of the embedded devicetree, e.g. '__dtb_dt_begin'
|
||||
|
||||
end_sym:
|
||||
symbol at the start of the embedded devicetree, e.g. '__dtb_dt_end'
|
||||
|
||||
When this flag is used, U-Boot does all the normal packaging, but as an
|
||||
additional step, it creates a new ELF file with the new devicetree embedded in
|
||||
@ -1450,7 +1455,7 @@ or just a selection::
|
||||
$ binman extract -i image.bin "*u-boot*" -O outdir
|
||||
|
||||
Some entry types have alternative formats, for example fdtmap which allows
|
||||
extracted just the devicetree binary without the fdtmap header::
|
||||
extracting just the devicetree binary without the fdtmap header::
|
||||
|
||||
$ binman extract -i /tmp/b/odroid-c4/image.bin -f out.dtb -F fdt fdtmap
|
||||
$ fdtdump out.dtb
|
||||
@ -1488,7 +1493,7 @@ that there is an 'fdtmap' entry in the image. For example::
|
||||
$ binman replace -i image.bin section/cbfs/u-boot
|
||||
|
||||
which will write the contents of the file 'u-boot' from the current directory
|
||||
to the that entry, compressing if necessary. If the entry size changes, you must
|
||||
to that entry, compressing if necessary. If the entry size changes, you must
|
||||
add the 'allow-repack' property to the original image before generating it (see
|
||||
above), otherwise you will get an error.
|
||||
|
||||
@ -1517,27 +1522,27 @@ original offset and size properties of each entry, if any were specified, in
|
||||
the 'orig-offset' and 'orig-size' properties. This allows Binman to distinguish
|
||||
between an entry which ended up being packed at an offset (or assigned a size)
|
||||
and an entry which had a particular offset / size requested in the Binman
|
||||
configuration. Where are particular offset / size was requested, this is treated
|
||||
configuration. Where a particular offset / size was requested, this is treated
|
||||
as set in stone, so Binman will ensure it doesn't change. Without this feature,
|
||||
repacking an entry might cause it to disobey the original constraints provided
|
||||
when it was created.
|
||||
|
||||
|
||||
Signing FIT container with private key in an image
|
||||
--------------------------------------------------
|
||||
Signing a FIT container with private key in an image
|
||||
----------------------------------------------------
|
||||
|
||||
You can sign FIT container with private key in your image.
|
||||
You can sign a FIT container with private key in your image.
|
||||
For example::
|
||||
|
||||
$ binman sign -i image.bin -k privatekey -a sha256,rsa4096 fit
|
||||
|
||||
binman will extract FIT container, sign and replace it immediately.
|
||||
binman will extract the FIT container, sign and replace it immediately.
|
||||
|
||||
If you want to sign and replace FIT container in place::
|
||||
If you want to sign and replace a FIT container in place::
|
||||
|
||||
$ binman sign -i image.bin -k privatekey -a sha256,rsa4096 -f fit.fit fit
|
||||
|
||||
which will sign FIT container with private key and replace it immediately
|
||||
which will sign the FIT container with a private key and replace it immediately
|
||||
inside your image.
|
||||
|
||||
.. _`BinmanLogging`:
|
||||
@ -1546,19 +1551,19 @@ Logging
|
||||
-------
|
||||
|
||||
Binman normally operates silently unless there is an error, in which case it
|
||||
just displays the error. The -D/--debug option can be used to create a full
|
||||
just displays the error. The ``-D/--debug`` option can be used to create a full
|
||||
backtrace when errors occur. You can use BINMAN_DEBUG=1 when building to select
|
||||
this.
|
||||
|
||||
Internally binman logs some output while it is running. This can be displayed
|
||||
by increasing the -v/--verbosity from the default of 1:
|
||||
by increasing the ``-v/--verbosity`` from the default of 1:
|
||||
|
||||
0: silent
|
||||
1: warnings only
|
||||
2: notices (important messages)
|
||||
3: info about major operations
|
||||
4: detailed information about each operation
|
||||
5: debug (all output)
|
||||
- 0: silent
|
||||
- 1: warnings only
|
||||
- 2: notices (important messages)
|
||||
- 3: info about major operations
|
||||
- 4: detailed information about each operation
|
||||
- 5: debug (all output)
|
||||
|
||||
You can use BINMAN_VERBOSE=5 (for example) when building to select this.
|
||||
|
||||
@ -1616,19 +1621,19 @@ To fetch tools which are missing, use::
|
||||
|
||||
binman tool --fetch missing
|
||||
|
||||
You can also use `--fetch all` to fetch all tools or `--fetch <tool>` to fetch
|
||||
You can also use ``--fetch all`` to fetch all tools or ``--fetch <tool>`` to fetch
|
||||
a particular tool. Some tools are built from source code, in which case you will
|
||||
need to have at least the `build-essential` and `git` packages installed.
|
||||
|
||||
Tools are fetched into the `~/.binman-tools` directory. This directory is
|
||||
automatically added to the toolpath so there is no need to use `--toolpath` to
|
||||
automatically added to the toolpath so there is no need to use ``--toolpath`` to
|
||||
specify it. If you want to use these tools outside binman, you may want to
|
||||
add this directory to your `PATH`. For example, if you use bash, add this to
|
||||
the end of `.bashrc`::
|
||||
|
||||
PATH="$HOME/.binman-tools:$PATH"
|
||||
|
||||
To select a custom directory, use the `--tooldir` option.
|
||||
To select a custom directory, use the ``--tooldir`` option.
|
||||
|
||||
Bintool Documentation
|
||||
=====================
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user