bios/boot/copy_image_from_sdcard_to_ram: use chunks of 32KB to increase speed.

This commit is contained in:
Florent Kermarrec 2020-06-10 08:21:54 +02:00
parent d294e0f1de
commit dae15511a4
1 changed files with 2 additions and 3 deletions

View File

@ -563,10 +563,9 @@ static int copy_image_from_sdcard_to_ram(const char * filename, unsigned int ram
init_progression_bar(f_size(&file)); init_progression_bar(f_size(&file));
offset = 0; offset = 0;
for (;;) { for (;;) {
fr = f_read(&file, (void *) ram_address + offset, 512, &br); fr = f_read(&file, (void *) ram_address + offset, 0x8000, &br);
if (br == 0) break; if (br == 0) break;
offset += br; offset += br;
if (offset%(512*128) == 0)
show_progress(offset); show_progress(offset);
} }
show_progress(offset); show_progress(offset);