From: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 1/1] travis-ci: provide env__efi_fit_tftp_file
Date: Mon, 30 Dec 2019 12:30:24 +0200 [thread overview]
Message-ID: <20191230103024.GA32350@BV030612LT> (raw)
In-Reply-To: <20191229174640.36962-1-xypron.glpk@gmx.de>
On Sun, Dec 29, 2019 at 06:46:40PM +0100, Heinrich Schuchardt wrote:
> Provide dictionary env__efi_fit_tftp_file describing the file used for the
> UEFI FIT image test.
>
> Cf. "test/py: Create a test for launching UEFI binaries from FIT images"
> https://lists.denx.de/pipermail/u-boot/2019-December/394516.html
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
> py/travis-ci/travis_tftp.py | 20 +++++++++++++++++++
> py/travis-ci/u_boot_boardenv_qemu_arm64_na.py | 1 +
> py/travis-ci/u_boot_boardenv_qemu_arm_na.py | 1 +
> .../u_boot_boardenv_qemu_x86_64_na.py | 2 ++
> py/travis-ci/u_boot_boardenv_qemu_x86_na.py | 2 ++
> .../u_boot_boardenv_vexpress_ca15_tc2_qemu.py | 1 +
> .../u_boot_boardenv_vexpress_ca9x4_qemu.py | 1 +
> 7 files changed, 28 insertions(+)
>
> diff --git a/py/travis-ci/travis_tftp.py b/py/travis-ci/travis_tftp.py
> index 4ea5c06..2ab7740 100644
> --- a/py/travis-ci/travis_tftp.py
> +++ b/py/travis-ci/travis_tftp.py
> @@ -1,6 +1,26 @@
> import os
> import binascii
>
> +def efifit2env(addr=None):
> + """Create dictionary describing file for UEFI 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",
> + "dn": "tftp_dir",
The quotes around tftp_dir should be removed to allow variable
evaluation:
"dn": tftp_dir,
> + }
> + if addr is not None:
> + ret['addr'] = addr
> +
> + return ret
> +
> def file2env(file_name, addr=None):
> """Create dictionary describing file
>
> diff --git a/py/travis-ci/u_boot_boardenv_qemu_arm64_na.py b/py/travis-ci/u_boot_boardenv_qemu_arm64_na.py
> index 2986115..98ce873 100644
> --- a/py/travis-ci/u_boot_boardenv_qemu_arm64_na.py
> +++ b/py/travis-ci/u_boot_boardenv_qemu_arm64_na.py
> @@ -6,3 +6,4 @@ env__net_dhcp_server = True
> env__net_tftp_readable_file = travis_tftp.file2env('u-boot.bin', 0x40400000)
> env__efi_loader_helloworld_file = travis_tftp.file2env('lib/efi_loader/helloworld.efi', 0x40400000)
> env__efi_loader_grub_file = travis_tftp.file2env('grub_arm64.efi', 0x40400000)
> +env__efi_fit_tftp_file = travis_tftp.efifit2env(0x40400000)
> diff --git a/py/travis-ci/u_boot_boardenv_qemu_arm_na.py b/py/travis-ci/u_boot_boardenv_qemu_arm_na.py
> index 391e3c4..3dbedde 100644
> --- a/py/travis-ci/u_boot_boardenv_qemu_arm_na.py
> +++ b/py/travis-ci/u_boot_boardenv_qemu_arm_na.py
> @@ -6,3 +6,4 @@ env__net_dhcp_server = True
> env__net_tftp_readable_file = travis_tftp.file2env('u-boot.bin', 0x40400000)
> env__efi_loader_helloworld_file = travis_tftp.file2env('lib/efi_loader/helloworld.efi', 0x40400000)
> env__efi_loader_grub_file = travis_tftp.file2env('grub_arm.efi', 0x40400000)
> +env__efi_fit_tftp_file = travis_tftp.efifit2env(0x40400000)
> diff --git a/py/travis-ci/u_boot_boardenv_qemu_x86_64_na.py b/py/travis-ci/u_boot_boardenv_qemu_x86_64_na.py
> index 6f7c593..2fe72c8 100644
> --- a/py/travis-ci/u_boot_boardenv_qemu_x86_64_na.py
> +++ b/py/travis-ci/u_boot_boardenv_qemu_x86_64_na.py
> @@ -8,3 +8,5 @@ env__efi_loader_helloworld_file = travis_tftp.file2env('lib/efi_loader/helloworl
>
> env__efi_loader_check_smbios = True
> env__efi_loader_grub_file = travis_tftp.file2env('grub_x64.efi')
> +
> +env__efi_fit_tftp_file = travis_tftp.efifit2env()
> diff --git a/py/travis-ci/u_boot_boardenv_qemu_x86_na.py b/py/travis-ci/u_boot_boardenv_qemu_x86_na.py
> index 70dc0ae..62cc279 100644
> --- a/py/travis-ci/u_boot_boardenv_qemu_x86_na.py
> +++ b/py/travis-ci/u_boot_boardenv_qemu_x86_na.py
> @@ -8,3 +8,5 @@ env__efi_loader_helloworld_file = travis_tftp.file2env('lib/efi_loader/helloworl
>
> env__efi_loader_check_smbios = True
> env__efi_loader_grub_file = travis_tftp.file2env('grub_x86.efi')
> +
> +env__efi_fit_tftp_file = travis_tftp.efifit2env()
> diff --git a/py/travis-ci/u_boot_boardenv_vexpress_ca15_tc2_qemu.py b/py/travis-ci/u_boot_boardenv_vexpress_ca15_tc2_qemu.py
> index 7437ae6..75f287c 100644
> --- a/py/travis-ci/u_boot_boardenv_vexpress_ca15_tc2_qemu.py
> +++ b/py/travis-ci/u_boot_boardenv_vexpress_ca15_tc2_qemu.py
> @@ -5,3 +5,4 @@ env__net_dhcp_server = True
> env__net_tftp_readable_file = travis_tftp.file2env('u-boot')
> env__efi_loader_helloworld_file = travis_tftp.file2env('lib/efi_loader/helloworld.efi')
> env__efi_loader_grub_file = travis_tftp.file2env('grub_arm.efi')
> +env__efi_fit_tftp_file = travis_tftp.efifit2env()
> diff --git a/py/travis-ci/u_boot_boardenv_vexpress_ca9x4_qemu.py b/py/travis-ci/u_boot_boardenv_vexpress_ca9x4_qemu.py
> index 7437ae6..75f287c 100644
> --- a/py/travis-ci/u_boot_boardenv_vexpress_ca9x4_qemu.py
> +++ b/py/travis-ci/u_boot_boardenv_vexpress_ca9x4_qemu.py
> @@ -5,3 +5,4 @@ env__net_dhcp_server = True
> env__net_tftp_readable_file = travis_tftp.file2env('u-boot')
> env__efi_loader_helloworld_file = travis_tftp.file2env('lib/efi_loader/helloworld.efi')
> env__efi_loader_grub_file = travis_tftp.file2env('grub_arm.efi')
> +env__efi_fit_tftp_file = travis_tftp.efifit2env()
> --
> 2.24.1
>
next prev parent reply other threads:[~2019-12-30 10:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-29 17:46 [PATCH 1/1] travis-ci: provide env__efi_fit_tftp_file Heinrich Schuchardt
2019-12-30 10:30 ` Cristian Ciocaltea [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-01-07 17:06 Heinrich Schuchardt
2020-01-08 1:16 ` Stephen Warren
2020-02-21 19:35 ` Heinrich Schuchardt
2020-02-21 19:48 ` Stephen Warren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191230103024.GA32350@BV030612LT \
--to=cristian.ciocaltea@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox