Copying files to mmc device from bootmenu

967 Views Asked by At

I want to copy files to mmc device over the network using TFTP.

I know that we can switch to the mmc device using "mmc dev" command at U-boot prompt. After switching to the mmc device, I need to copy the files to the mmc device over the network using tftp from U-bot prompt.

1

There are 1 best solutions below

2
On

You cannot directly copy from MMC to TFTP.

Go through these step instead:

Setup network:

setenv autoload no
dhcp

Load the file to memory:

load mmc 0:1 $loadaddr /test.txt

The load command set environment variable filesize.

TFTP put:

tftpput $loadaddr $filesize 192.168.1.3:/upload/test.txt

Of course you should adjust the server IP address and the file paths.

In your U-Boot configuration you need:

CONFIG_CMD_DHCP=y
CONFIG_CMD_TFTPPUT=y