mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-18 06:58:54 +00:00
doc: loadx man-page
Provide a man-page for the loadx command. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
e48f29d7ca
commit
a2c0e3595a
2 changed files with 78 additions and 0 deletions
77
doc/usage/cmd/loadx.rst
Normal file
77
doc/usage/cmd/loadx.rst
Normal file
|
@ -0,0 +1,77 @@
|
|||
.. SPDX-License-Identifier: GPL-2.0+:
|
||||
|
||||
loadx command
|
||||
=============
|
||||
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
::
|
||||
|
||||
loadx [addr [baud]]
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
The loadx command is used to transfer a file to the device via the serial line
|
||||
using the XMODEM protocol.
|
||||
|
||||
The number of transferred bytes is saved in environment variable filesize.
|
||||
|
||||
addr
|
||||
load address, defaults to environment variable loadaddr or if loadaddr is
|
||||
not set to configuration variable CONFIG_SYS_LOAD_ADDR
|
||||
|
||||
baud
|
||||
baud rate for the ymodem transmission. After the transmission the baud
|
||||
rate is reset to the original value.
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
In the example below the terminal emulation program picocom was used to
|
||||
transfer a file to the device.
|
||||
|
||||
.. code-block::
|
||||
|
||||
picocom --send-cmd 'sx -b vv' --baud 115200 /dev/ttyUSB0
|
||||
|
||||
After entering the loadx command the key sequence <CTRL-A><CTRL-S> is used to
|
||||
let picocom prompt for the file name. Picocom invokes the program sx for the
|
||||
file transfer.
|
||||
|
||||
::
|
||||
|
||||
=> loadx 60800000 115200
|
||||
## Ready for binary (xmodem) download to 0x60800000 at 115200 bps...
|
||||
C
|
||||
*** file: helloworld.efi
|
||||
$ sx -b vv helloworld.efi
|
||||
sx: cannot open vv: No such file or directory
|
||||
Sending helloworld.efi, 24 blocks: Give your local XMODEM receive command now.
|
||||
Xmodem sectors/kbytes sent: 0/ 0kRetry 0: NAK on sector
|
||||
Bytes Sent: 3072 BPS:1147
|
||||
|
||||
Transfer incomplete
|
||||
|
||||
*** exit status: 1 ***
|
||||
## Total Size = 0x00000c00 = 3072 Bytes
|
||||
## Start Addr = 0x60800000
|
||||
=>
|
||||
|
||||
The transfer can be cancelled by pressing 3 times <CTRL+C> after two seconds
|
||||
of inactivity on terminal.
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
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.
|
|
@ -65,6 +65,7 @@ Shell commands
|
|||
cmd/load
|
||||
cmd/loadb
|
||||
cmd/loadm
|
||||
cmd/loadx
|
||||
cmd/loady
|
||||
cmd/mbr
|
||||
cmd/md
|
||||
|
|
Loading…
Add table
Reference in a new issue