All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Graute <oliver.graute@kococonnector.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Error reading cluster" from fs/fat/fat.c
Date: Mon, 26 Aug 2019 07:39:55 +0000	[thread overview]
Message-ID: <20190826073742.GA18928@optiplex> (raw)
In-Reply-To: <20190822094448.GA15730@optiplex>

On 22/08/19, Oliver Graute wrote:
> Hello list,
> 
> I have a annoying problem with u-boot 2019.07. I try to boot a Linux
> Image from a fat16 partition on a SD-Card. But I got the "Error reading
> cluster" Message from fs/fat/fat.c
> 
> => boot
> switch to partitions #0, OK
> mmc2 is current device
> Error reading cluster
> ** Unable to read file Image **
> 
> => mmc part
> Partition Map for MMC device 2  --   Partition Type: DOS
> Part    Start Sector    Num Sectors     UUID            Type
>   1     16384           266240          d38187c8-01     06
>   2     282624          7491584         d38187c8-02     83
> 
> After some debugging I end up in blk_dread() from drivers/block/blk-uclass.c
> 
> blks_read = ops->read(dev, start, blkcnt, buffer);
> 
> here I got blks_read=0 which seems is the cause for the "Error reading cluster"
> later in get_cluster().

After some more digging I found out that this error is related to the
file size. I can fatload files up to 16MB but no files with 24MB like the
Kernel Image. Is there some limitation somewhere?


U-Boot 2019.07-00001-g1c0a4f90ca-dirty (Aug 26 2019 - 08:36:06 +0200)

CPU:   NXP i.MX8QM RevB A53 at 1200 MHz

Model: Advantech iMX8QM Qseven series
Board: ROM-7720-A1 4GB
Build: SCFW 65afe5f6
Boot:  SD2
DRAM:  3.9 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 2
Loading Environment from MMC... *** Warning - bad CRC, using default environment

In:    serial at 5a060000
Out:   serial at 5a060000
Err:   serial at 5a060000
Net:   eth0: ethernet at 5b040000Could not get PHY for FEC1: addr 1
, eth-1: ethernet at 5b050000
Hit any key to stop autoboot:  0
=> fatls mmc 2:1
            dtbs/
 24838656   Image
 10671566   Image.gz
 18734584   initramfs-linux-fallback.img
  7263143   initramfs-linux.img
    19136   imx8qm-rom7720-a1.dtb
   102464   hdmitxfw.bin
  1048576   1mb.txt
  2097152   2MB.txt
   524288   512kb.txt
   786432   768kb.txt
 16777216   16MB.txt
 25165824   24MB.txt
  4194304   4MB.txt
  8388608   8MB.txt

14 file(s), 1 dir(s)

=> fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} 512kb.txt
524288 bytes read in 33 ms (15.2 MiB/s)
=> fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} 768kb.txt
786432 bytes read in 43 ms (17.4 MiB/s)
=> fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} 1mb.txt
1048576 bytes read in 58 ms (17.2 MiB/s)
=> fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} 2mb.txt
2097152 bytes read in 98 ms (20.4 MiB/s)
=> fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} 4mb.txt
4194304 bytes read in 190 ms (21.1 MiB/s)
=> fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} 8mb.txt
8388608 bytes read in 365 ms (21.9 MiB/s)
=> fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} 16mb.txt
16777216 bytes read in 724 ms (22.1 MiB/s)
=> fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} 24mb.txt
Error reading cluster 3
** Unable to read file 24mb.txt **
=>


Best regards,

Oliver

  reply	other threads:[~2019-08-26  7:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22  9:47 [U-Boot] Error reading cluster" from fs/fat/fat.c Oliver Graute
2019-08-26  7:39 ` Oliver Graute [this message]
2019-08-28 11:04   ` Oliver Graute

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=20190826073742.GA18928@optiplex \
    --to=oliver.graute@kococonnector.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.