Reputation: 308
I'm trying to use U-Boot to copy a big (2 GiB) image from the network to the SD card. This image is a filesystem; hence I'm using the mmc subsystem.
I created many chunks of this image, 64 MiB each, so the process goes like this:
The problem is that writing to the sd card is really slow. It takes several minutes for a chunk of 4 MiB. I have tried with different sizes and it is all the same -- pretty slow.
I'm using a Raspberry Pi 2 and Samsung micro SD cards (class 10).
The command I use for writing is like:
mmc write 0x1600000 0xFF000 0x02
For me, this means, taking from the memory address 0x1600000
, read 0x02
blocks of 512 bytes
and write them to the sd card starting at block 0xFF000
Am I using the wrong command? Is there a way to speed up the process? The U-Boot driver for is slow?
Note: Yesterday night I copied an image of 1.3 GiB. It took 16 hours.
Editing: Git repository git://git.denx.de/u-boot.git
commit ae765f3a8243faa39d4a32ba2baede638e40c768
Compilation:
make rpi_2_defconfig
make all
Upvotes: 1
Views: 1262
Reputation: 2173
As of this writing, the current release of U-Boot (v2016.03) has the dcache disabled on RPi 2. So things are in fact just slow. Also there are currently patches being reviewed which would enable the dcache and speed this up. There's expected to be at least one more version of these patches due to a problem with the LCD one but more testers are welcome and encouraged. You can get the current series (v2) here:
https://patchwork.ozlabs.org/project/uboot/list/?submitter=1212&state=7&q=v2&delegate=3651
and note that the patch that is 0/5 is the fix for the LCD issue and thus why I'm expected a clean v3 to be submitted.
I am hopeful that the changes will be able to be merged for the v2016.05 release.
Upvotes: 3