[PATCH v2 1/1] travis-ci: provide env__efi_fit_tftp_file
Heinrich Schuchardt
xypron.glpk at gmx.de
Mon Dec 30 20:05:29 CET 2019
On 12/30/19 5:38 PM, Stephen Warren wrote:
> On 12/30/19 3:52 AM, Heinrich Schuchardt wrote:
>> Provide dictionary env__efi_fit_tftp_file describing the file used for
>> the
>> UEFI FIT image test.
>
>> diff --git a/py/travis-ci/travis_tftp.py b/py/travis-ci/travis_tftp.py
>
>> +def efifit2env(addr=None):
>> + """Create dictionary describing file for EFI fit image test
>> +
>> + @addr: address used for loading the file as int (e.g.
>> 0x40400000)
>> + Return: dictionary describing the file with entries
>> + * fn - filename
>> + * addr - loading address, optional
>> + * dn - tftp directory
>> + """
>> + tftp_dir = os.environ['UBOOT_TRAVIS_BUILD_DIR']
>> +
>> + ret = {
>> + "fn": "test-efi-fit.img",
>
> If this function were to exist, then the filename shouldn't be
> hard-coded; it should be a parameter.
>
Hello Stephen,
thanks for reviewing.
This is the name of a generated file. It does not depend on the board.
>> + "dn": tftp_dir,
>> + }
>> + if addr is not None:
>> + ret['addr'] = addr
>> +
>> + return ret
>
> However, all this function does is create a static dictionary. There's
> no need to introduce a function for this. Instead, simply put the
> dictionary directly into py/travis-ci/u_boot_boardenv_qemu_arm64_na.py
> etc. The only reason that file2env() exists is to automatically
> calculate the crc32 value, which doesn't apply here.
>
I considered putting 6 lines into each board file:
import os
env__efi_fit_tftp_file = {
"addr" = 0x4040000,
"dn" = os.environ['UBOOT_TRAVIS_BUILD_DIR'],
"fn" = "test-efi-fit.img",
}
I assumed it would be better idea to have a single line in the board files.
env__efi_fit_tftp_file = travis_tftp.efifit2env(0x40400000)
Do you really want to increase the code size?
Best regards
Heinrich
More information about the U-Boot
mailing list