From mboxrd@z Thu Jan 1 00:00:00 1970 From: bin4ry <0xbin4ry@gmail.com> Date: Tue, 01 Oct 2013 17:06:38 +0200 Subject: [U-Boot] SPL: Reading large files with file_fat_read() Message-ID: <524AE4FE.5030905@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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