cmd: fatload: command doesn't update $filesize after next calls
Johannes Krottmayer
krotti83 at proton.me
Tue Apr 21 00:46:50 CEST 2026
Hello,
This thread can be discarded. Have misunderstood the command
'fatload' fatally.
'fatload' works as accepted. Have used a non-official U-Boot
description from the command...
Sorry, for wasting your time.
On 4/20/26 3:20 PM, Johannes Krottmayer wrote:
> I have forgotten:
>
> Also the content of the loaded file seems to be the
> same data from the previous call.
>
> On 4/20/26 3:15 PM, Johannes Krottmayer wrote:
>> 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.
>
More information about the U-Boot
mailing list