[PATHv11 15/43] test_efi_loader.py: use $filesize var

neil.armstrong at linaro.org neil.armstrong at linaro.org
Tue Nov 28 12:05:26 CET 2023


On 27/11/2023 19:18, Tom Rini wrote:
> On Mon, Nov 27, 2023 at 06:56:58PM +0600, Maxim Uvarov wrote:
> 
>> bootefi code relays in internal variable then to filesize environment.
>> lwip tftp do not update this variable. For not I update test to provide
>> correct size.
>>
>> Signed-off-by: Maxim Uvarov <maxim.uvarov at linaro.org>
> 
> This is a lwip problem then, loading a "file" should update filesize and
> there's use cases, not just tests, which rely on this behavior.
> 

filesize is updated in tftp_close, but what's missing is a call to efi_set_bootdev
when tftp transfer is finished:

https://elixir.bootlin.com/u-boot/latest/source/net/tftp.c#L305 :
	if (IS_ENABLED(CONFIG_CMD_BOOTEFI)) {
		if (!tftp_put_active)
			efi_set_bootdev("Net", "", tftp_filename,
					map_sysmem(tftp_load_addr, 0),
					net_boot_file_size);

Neil


More information about the U-Boot mailing list