loadb.rst 1.6 KB

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