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