public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Error reading cluster" from fs/fat/fat.c
@ 2019-08-22  9:47 Oliver Graute
  2019-08-26  7:39 ` Oliver Graute
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Graute @ 2019-08-22  9:47 UTC (permalink / raw)
  To: u-boot

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().

Here a Debug Trace with some variables printed out:

...
get_fatent() FAT16: entry: 0x0000595c = 22876, offset: 0x055c = 1372
get_fatent() FAT16: ret: 0x0000595d, entry: 0x0000595c, offset: 0x055c
get_cluster() gc - clustnum: 16813, startsect: 134800
blkcache_read() miss: start 24e90, count 48513
blk_dread() dev=fd6ebaa0
blk_dread() start=24e90
blk_dread() blkcnt=48513
blk_dread() buffer=80280000
blk_find_device() blk_find_device: if_type=6, devnum=2: usdhc at 5b010000.blk, 6, 0
blk_find_device() blk_find_device: if_type=6, devnum=2: usdhc at 5b030000.blk, 6, 2
blk_dread() blks_read=0
blk_dread() blkcnt=48513
disk_read() ret=0
disk_read() nr_blocks=48513
get_cluster() Error reading data (got -1) 2
get_cluster() ret=-1
get_cluster() idx=48513
Error reading cluster 2
** Unable to read file Image **


Can somebody help me to find the cause of this problem? Is something
with my fat partion or partition table wrong or do I hit a bug?

Best regards,

Oliver

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-08-28 11:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-22  9:47 [U-Boot] Error reading cluster" from fs/fat/fat.c Oliver Graute
2019-08-26  7:39 ` Oliver Graute
2019-08-28 11:04   ` Oliver Graute

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