1 .. SPDX-License-Identifier: GPL-2.0+:
11 load <interface> [<dev[:part]> [<addr> [<filename> [bytes [pos]]]]]
16 The load command is used to read a file from a filesystem into memory.
18 The number of transferred bytes is saved in the environment variable filesize.
19 The load address is saved in the environment variable fileaddr.
22 interface for accessing the block device (mmc, sata, scsi, usb, ....)
28 partition number, defaults to 0 (whole device)
31 load address, defaults to environment variable loadaddr or if loadaddr is
32 not set to configuration variable CONFIG_SYS_LOAD_ADDR
35 path to file, defaults to environment variable bootfile
38 maximum number of bytes to load
41 number of bytes to skip
43 part, addr, bytes, pos are hexadecimal numbers.
50 => load mmc 0:1 ${kernel_addr_r} snp.efi
51 149280 bytes read in 11 ms (12.9 MiB/s)
53 => load mmc 0:1 ${kernel_addr_r} snp.efi 1000000
54 149280 bytes read in 9 ms (15.8 MiB/s)
56 => load mmc 0:1 ${kernel_addr_r} snp.efi 1000000 100
57 149024 bytes read in 10 ms (14.2 MiB/s)
59 => load mmc 0:1 ${kernel_addr_r} snp.efi 10
60 16 bytes read in 1 ms (15.6 KiB/s)
66 The load command is only available if CONFIG_CMD_FS_GENERIC=y.
71 The return value $? is set to 0 (true) if the file was successfully loaded
72 even if the number of bytes is less then the specified length.
74 If an error occurs, the return value $? is set to 1 (false).