From: bin4ry <0xbin4ry@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] SPL: Reading large files with file_fat_read()
Date: Tue, 01 Oct 2013 17:06:38 +0200 [thread overview]
Message-ID: <524AE4FE.5030905@gmail.com> (raw)
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
reply other threads:[~2013-10-01 15:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=524AE4FE.5030905@gmail.com \
--to=0xbin4ry@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox