Heinrich Schuchardt | e48f29d | 2023-05-16 07:43:01 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+: |
| 2 | |
| 3 | loadb command |
| 4 | ============= |
| 5 | |
| 6 | Synopsis |
| 7 | -------- |
| 8 | |
| 9 | :: |
| 10 | |
| 11 | loadb [addr [baud]] |
| 12 | |
| 13 | Description |
| 14 | ----------- |
| 15 | |
Heinrich Schuchardt | 62ac127 | 2023-06-25 23:22:44 +0200 | [diff] [blame] | 16 | The loadb command is used to transfer a file to the device via the serial line |
Heinrich Schuchardt | e48f29d | 2023-05-16 07:43:01 +0200 | [diff] [blame] | 17 | using the Kermit protocol. |
| 18 | |
| 19 | The number of transferred bytes is saved in environment variable filesize. |
| 20 | |
| 21 | addr |
| 22 | load address, defaults to environment variable loadaddr or if loadaddr is |
| 23 | not set to configuration variable CONFIG_SYS_LOAD_ADDR |
| 24 | |
| 25 | baud |
| 26 | baud rate for the Kermit transmission. After the transmission the baud |
| 27 | rate is reset to the original value. |
| 28 | |
| 29 | Example |
| 30 | ------- |
| 31 | |
| 32 | In the example below the terminal emulation program picocom and G-Kermit |
| 33 | serve to transfer a file to a device. |
| 34 | |
| 35 | .. code-block:: bash |
| 36 | |
| 37 | picocom --baud 115200 --send-cmd "gkermit -iXvs" /dev/ttyUSB0 |
| 38 | |
| 39 | After entering the loadb command the key sequence <CTRL-A><CTRL-S> is used to |
| 40 | let picocom prompt for the file name. Picocom invokes G-Kermit for the file |
| 41 | transfer. |
| 42 | |
| 43 | :: |
| 44 | |
| 45 | => loadb 60800000 115200 |
| 46 | ## Ready for binary (kermit) download to 0x60800000 at 115200 bps... |
| 47 | |
| 48 | *** file: helloworld.efi |
| 49 | $ gkermit -iXvs helloworld.efi |
| 50 | G-Kermit 2.01, The Kermit Project, 2021-11-15 |
| 51 | Escape back to your local Kermit and give a RECEIVE command. |
| 52 | |
| 53 | KERMIT READY TO SEND... |
| 54 | | |
| 55 | *** exit status: 0 *** |
| 56 | ## Total Size = 0x00000c00 = 3072 Bytes |
| 57 | ## Start Addr = 0x60800000 |
| 58 | => |
| 59 | |
| 60 | The transfer can be cancelled by pressing <CTRL+C>. |
| 61 | |
| 62 | Configuration |
| 63 | ------------- |
| 64 | |
| 65 | The command is only available if CONFIG_CMD_LOADB=y. |
| 66 | |
| 67 | Return value |
| 68 | ------------ |
| 69 | |
| 70 | The return value $? is 0 (true) on success, 1 (false) on error. |