blob: 0464b1f41ce68667752a97fc9de30ce7b15bbd7f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
.. SPDX-License-Identifier: GPL-2.0+:
loadb command
=============
Synopsis
--------
::
loadb [addr [baud]]
Description
-----------
The loadb command is used to transfer a file to the device via the serial line
using the Kermit 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 Kermit transmission. After the transmission the baud
rate is reset to the original value.
Example
-------
In the example below the terminal emulation program picocom and G-Kermit
serve to transfer a file to a device.
.. code-block:: bash
picocom --baud 115200 --send-cmd "gkermit -iXvs" /dev/ttyUSB0
After entering the loadb command the key sequence <CTRL-A><CTRL-S> is used to
let picocom prompt for the file name. Picocom invokes G-Kermit for the file
transfer.
::
=> loadb 60800000 115200
## Ready for binary (kermit) download to 0x60800000 at 115200 bps...
*** file: helloworld.efi
$ gkermit -iXvs helloworld.efi
G-Kermit 2.01, The Kermit Project, 2021-11-15
Escape back to your local Kermit and give a RECEIVE command.
KERMIT READY TO SEND...
|
*** exit status: 0 ***
## Total Size = 0x00000c00 = 3072 Bytes
## Start Addr = 0x60800000
=>
The transfer can be cancelled by pressing <CTRL+C>.
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.
|