cmd: fatload: command doesn't update $filesize after next calls
Johannes Krottmayer
krotti83 at proton.me
Mon Apr 20 15:15:23 CEST 2026
Hello,
I'm figured out an issue with the command 'fatload':
Here the file list with the command 'fatls':
---
StarFive # fatls mmc 1:3
3048997 firmware.itb
149225 u-boot-spl.bin.normal.out
3184 depp.efi
12318 hello.efi
44122 jh7110-starfive-visionfive-2-v1.3b-8G.dtb
5 file(s), 0 dir(s)
---
As you can see the files have different sizes.
First invoke of the command 'fatload' saves the correct size in
the variable $filesize:
---
StarFive # fatload mmc 1:3 $loadaddr u-boot-spl.bin.normal.out $filesize
149225 bytes read in 9 ms (15.8 MiB/s)
StarFive # echo $filesize
246e9
---
When trying to load a new file with 'fatload', the variable $filesize
still contains the old size from the previous call:
---
StarFive # fatload mmc 1:3 $loadaddr firmware.itb $filesize
149225 bytes read in 9 ms (15.8 MiB/s)
StarFive # echo $filesize
246e9
StarFive #
---
Has somebody noticed the same issue? Noticed in U-Boot version at least
v2025.10 and v2026.05.
Kind regards,
Johannes K.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: publickey - krotti83 at proton.me - 0x1A5D6E0E.asc
Type: application/pgp-keys
Size: 888 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260420/666ecb49/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 322 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260420/666ecb49/attachment.sig>
More information about the U-Boot
mailing list