public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] SPL: Reading large files with file_fat_read()
@ 2013-10-01 15:06 bin4ry
  0 siblings, 0 replies; only message in thread
From: bin4ry @ 2013-10-01 15:06 UTC (permalink / raw)
  To: u-boot

Hi,

I need to read a file in spl.c, which is about 675 bytes. I used the
following code:

static unsigned char helperData[675] = {0x00};
s32 err;
uint8_t i = 0;

printf("\n[D] - Reading Helper Data\r\n\n");
err = file_fat_read(filename, helperData, length);
    if(err > 0){
        printf("[D] - Received Helper Data (%d bytes):\n", err);
        for(i = 0; i < err; i++){
            if((i%9==0)&&i>0)    printf("\n");
            printf("0x%02x ", helperData[i]);
        }
    }else{
        printf("[E] - Error reading Helper Data file %s from MMC\n",
filename);
    }
    puts("");

However, during boot time it stucks while reading the file. It only outputs:

reading foo.bar

It works with smaller files fine. Do I need to implement changes to
do_fat_read() in fat.c or what could be the problem?

Best regards,
-b

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-10-01 15:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-01 15:06 [U-Boot] SPL: Reading large files with file_fat_read() bin4ry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox