[PATCH v2 1/1] travis-ci: provide env__efi_fit_tftp_file

Heinrich Schuchardt xypron.glpk at gmx.de
Mon Dec 30 11:52:07 CET 2019


Provide dictionary env__efi_fit_tftp_file describing the file used for the
UEFI FIT image test.

Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
Tested with
https://gitlab.denx.de/u-boot/custodians/u-boot-efi/pipelines/1714

v2:
	remove quotes around tftp_dir
---
 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..0eb05bb 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 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",
+        "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



More information about the U-Boot mailing list