From: Florent Kermarrec Date: Tue, 9 Jun 2020 18:00:32 +0000 (+0200) Subject: bios/boot: use progress bar in copy_image_from_sdcard_to_ram. X-Git-Tag: 24jan2021_ls180~204 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fe9b42facf9d20e2d636d60eef2d570baf998903;p=litex.git bios/boot: use progress bar in copy_image_from_sdcard_to_ram. --- diff --git a/litex/soc/software/bios/boot.c b/litex/soc/software/bios/boot.c index 3ea1d953..786039f0 100644 --- a/litex/soc/software/bios/boot.c +++ b/litex/soc/software/bios/boot.c @@ -547,11 +547,16 @@ static int copy_image_from_sdcard_to_ram(const char * filename, unsigned int ram if (fr == FR_OK){ printf("Copying %d bytes from %s to 0x%08x...\n", f_size(&file), filename, ram_address); offset = 0; + init_progression_bar(f_size(&file)); for (;;) { fr = f_read(&file, (void *) ram_address + offset, 512, &br); if (br == 0) break; offset += br; + if (offset%(512*128) == 0) + show_progress(offset); } + show_progress(offset); + printf("\n"); } else { printf("%s file not found.\n", filename); return 0;