From dae15511a4837bc59a08ed6f804a53fece768868 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Wed, 10 Jun 2020 08:21:54 +0200 Subject: [PATCH] bios/boot/copy_image_from_sdcard_to_ram: use chunks of 32KB to increase speed. --- litex/soc/software/bios/boot.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/litex/soc/software/bios/boot.c b/litex/soc/software/bios/boot.c index c80dbb60..634a1eb9 100644 --- a/litex/soc/software/bios/boot.c +++ b/litex/soc/software/bios/boot.c @@ -563,11 +563,10 @@ static int copy_image_from_sdcard_to_ram(const char * filename, unsigned int ram init_progression_bar(f_size(&file)); offset = 0; 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; offset += br; - if (offset%(512*128) == 0) - show_progress(offset); + show_progress(offset); } show_progress(offset); printf("\n"); -- 2.30.2