loady.rst 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. .. SPDX-License-Identifier: GPL-2.0+:
  2. loady command
  3. =============
  4. Synopsis
  5. --------
  6. ::
  7. loady [addr [baud]]
  8. Description
  9. -----------
  10. The loady command is used to transfer a file to the device via the serial line
  11. using the YMODEM 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 ymodem 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 was used to
  22. transfer a file to the device.
  23. After entering the loady command the key sequence <CTRL-A><CTRL-S> is used to
  24. let picocom prompt for the file name. Picocom invokes the program sz for the
  25. file transfer.
  26. ::
  27. => loady 80064000 115200
  28. ## Ready for binary (ymodem) download to 0x80064000 at 115200 bps...
  29. C
  30. *** file: BOOTRISCV64.EFI
  31. $ sz -b -vv BOOTRISCV64.EFI
  32. Sending: BOOTRISCV64.EFI
  33. Bytes Sent: 398976 BPS:7883
  34. Sending:
  35. Ymodem sectors/kbytes sent: 0/ 0k
  36. Transfer complete
  37. *** exit status: 0 ***
  38. /1(CAN) packets, 4 retries
  39. ## Total Size = 0x0006165f = 398943 Bytes
  40. => echo ${filesize}
  41. 6165f
  42. =>
  43. Configuration
  44. -------------
  45. The command is only available if CONFIG_CMD_LOADB=y.
  46. Return value
  47. ------------
  48. The return value $? is always 0 (true).