"Das U-Boot" Source Tree
at master 77 lines 1.8 kB view raw
1.. SPDX-License-Identifier: GPL-2.0+: 2 3.. index:: 4 single: loady (command) 5 6loady command 7============= 8 9Synopsis 10-------- 11 12:: 13 14 loady [addr [baud]] 15 16Description 17----------- 18 19The loady command is used to transfer a file to the device via the serial line 20using the YMODEM 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 ymodem 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 was used to 36transfer a file to the device. 37 38After entering the loady command the key sequence <CTRL-A><CTRL-S> is used to 39let picocom prompt for the file name. Picocom invokes the program sz for the 40file transfer. 41 42:: 43 44 => loady 80064000 115200 45 ## Ready for binary (ymodem) download to 0x80064000 at 115200 bps... 46 C 47 *** file: BOOTRISCV64.EFI 48 $ sz -b -vv BOOTRISCV64.EFI 49 Sending: BOOTRISCV64.EFI 50 Bytes Sent: 398976 BPS:7883 51 Sending: 52 Ymodem sectors/kbytes sent: 0/ 0k 53 Transfer complete 54 55 *** exit status: 0 *** 56 /1(CAN) packets, 4 retries 57 ## Total Size = 0x0006165f = 398943 Bytes 58 => echo ${filesize} 59 6165f 60 => 61 62Transfer can be cancelled by pressing 3 times <CTRL+C> after two seconds 63of inactivity on terminal. 64 65Configuration 66------------- 67 68The command is only available if CONFIG_CMD_LOADB=y. 69 70Initial timeout in seconds while waiting for transfer is configured by 71config option CMD_LOADXY_TIMEOUT or by env variable $loadxy_timeout. 72Setting it to 0 means infinite timeout. 73 74Return value 75------------ 76 77The return value $? is 0 (true) on success, 1 (false) otherwise.