aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-03-31 22:35:34 -0400
committerTom Rini <trini@konsulko.com>2022-03-31 22:35:34 -0400
commit5aa5a9b0d249923d966ea08c58354f86a23a882a (patch)
tree707274d1402e53f85c302cca7b7654efe72cbcc2
parentf432eb6d8a9d8a9382f6e7f0096fb4ee4672b8e8 (diff)
parentb6370aca3709ef23a9e8fe556beaa2e4b4e089c3 (diff)
downloadu-boot-WIP/31Mar2022.zip
u-boot-WIP/31Mar2022.tar.gz
u-boot-WIP/31Mar2022.tar.bz2
Merge tag 'efi-2022-04-rc6' of https://source.denx.de/u-boot/custodians/u-boot-efiWIP/31Mar2022
Pull request for efi-2022-04-rc6 Documentation: * Move VxWorks and Plan 9 to HTML documentation * Move all command man-pages to a separate directory Test: * Fix pylint errors UEFI * Fix build flags for initrddump.efi QEMU * Remove unused function to get RNG device
-rw-r--r--board/emulation/qemu-arm/qemu-arm.c42
-rw-r--r--doc/usage/cmd/acpi.rst (renamed from doc/usage/acpi.rst)0
-rw-r--r--doc/usage/cmd/addrmap.rst (renamed from doc/usage/addrmap.rst)0
-rw-r--r--doc/usage/cmd/askenv.rst (renamed from doc/usage/askenv.rst)0
-rw-r--r--doc/usage/cmd/base.rst (renamed from doc/usage/base.rst)0
-rw-r--r--doc/usage/cmd/bootefi.rst (renamed from doc/usage/bootefi.rst)0
-rw-r--r--doc/usage/cmd/booti.rst (renamed from doc/usage/booti.rst)0
-rw-r--r--doc/usage/cmd/bootmenu.rst (renamed from doc/usage/bootmenu.rst)0
-rw-r--r--doc/usage/cmd/button.rst (renamed from doc/usage/button.rst)0
-rw-r--r--doc/usage/cmd/cbsysinfo.rst (renamed from doc/usage/x86/cbsysinfo.rst)0
-rw-r--r--doc/usage/cmd/conitrace.rst (renamed from doc/usage/conitrace.rst)0
-rw-r--r--doc/usage/cmd/echo.rst (renamed from doc/usage/echo.rst)0
-rw-r--r--doc/usage/cmd/exception.rst (renamed from doc/usage/exception.rst)0
-rw-r--r--doc/usage/cmd/exit.rst (renamed from doc/usage/exit.rst)0
-rw-r--r--doc/usage/cmd/extension.rst (renamed from doc/usage/extension.rst)4
-rw-r--r--doc/usage/cmd/false.rst (renamed from doc/usage/false.rst)0
-rw-r--r--doc/usage/cmd/fatinfo.rst (renamed from doc/usage/fatinfo.rst)0
-rw-r--r--doc/usage/cmd/fatload.rst (renamed from doc/usage/fatload.rst)0
-rw-r--r--doc/usage/cmd/for.rst (renamed from doc/usage/for.rst)0
-rw-r--r--doc/usage/cmd/load.rst (renamed from doc/usage/load.rst)0
-rw-r--r--doc/usage/cmd/loady.rst (renamed from doc/usage/loady.rst)0
-rw-r--r--doc/usage/cmd/mbr.rst (renamed from doc/usage/mbr.rst)0
-rw-r--r--doc/usage/cmd/md.rst (renamed from doc/usage/md.rst)2
-rw-r--r--doc/usage/cmd/mmc.rst (renamed from doc/usage/mmc.rst)36
-rw-r--r--doc/usage/cmd/pinmux.rst (renamed from doc/usage/pinmux.rst)0
-rw-r--r--doc/usage/cmd/pstore.rst (renamed from doc/usage/pstore.rst)0
-rw-r--r--doc/usage/cmd/qfw.rst (renamed from doc/usage/qfw.rst)0
-rw-r--r--doc/usage/cmd/reset.rst (renamed from doc/usage/reset.rst)0
-rw-r--r--doc/usage/cmd/sbi.rst (renamed from doc/usage/sbi.rst)0
-rw-r--r--doc/usage/cmd/scp03.rst (renamed from doc/usage/scp03.rst)0
-rw-r--r--doc/usage/cmd/setexpr.rst (renamed from doc/usage/setexpr.rst)0
-rw-r--r--doc/usage/cmd/sf.rst (renamed from doc/usage/sf.rst)0
-rw-r--r--doc/usage/cmd/size.rst (renamed from doc/usage/size.rst)0
-rw-r--r--doc/usage/cmd/true.rst (renamed from doc/usage/true.rst)0
-rw-r--r--doc/usage/cmd/ums.rst (renamed from doc/usage/ums.rst)0
-rw-r--r--doc/usage/cmd/wdt.rst (renamed from doc/usage/wdt.rst)0
-rw-r--r--doc/usage/index.rst79
-rw-r--r--doc/usage/os/plan9.rst (renamed from doc/README.plan9)12
-rw-r--r--doc/usage/os/vxworks.rst (renamed from doc/README.vxworks)31
-rw-r--r--lib/efi_loader/Makefile2
-rw-r--r--test/py/tests/test_efi_bootmgr/conftest.py14
-rw-r--r--test/py/tests/test_efi_bootmgr/test_efi_bootmgr.py13
-rw-r--r--test/py/tests/test_efi_fit.py31
43 files changed, 129 insertions, 137 deletions
diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c
index 16d5a97..c9e886e 100644
--- a/board/emulation/qemu-arm/qemu-arm.c
+++ b/board/emulation/qemu-arm/qemu-arm.c
@@ -107,48 +107,6 @@ void enable_caches(void)
dcache_enable();
}
-#if defined(CONFIG_EFI_RNG_PROTOCOL)
-#include <efi_loader.h>
-#include <efi_rng.h>
-
-#include <dm/device-internal.h>
-
-efi_status_t platform_get_rng_device(struct udevice **dev)
-{
- int ret;
- efi_status_t status = EFI_DEVICE_ERROR;
- struct udevice *bus, *devp;
-
- for (uclass_first_device(UCLASS_VIRTIO, &bus); bus;
- uclass_next_device(&bus)) {
- for (device_find_first_child(bus, &devp); devp;
- device_find_next_child(&devp)) {
- if (device_get_uclass_id(devp) == UCLASS_RNG) {
- *dev = devp;
- status = EFI_SUCCESS;
- break;
- }
- }
- }
-
- if (status != EFI_SUCCESS) {
- debug("No rng device found\n");
- return EFI_DEVICE_ERROR;
- }
-
- if (*dev) {
- ret = device_probe(*dev);
- if (ret)
- return EFI_DEVICE_ERROR;
- } else {
- debug("Couldn't get child device\n");
- return EFI_DEVICE_ERROR;
- }
-
- return EFI_SUCCESS;
-}
-#endif /* CONFIG_EFI_RNG_PROTOCOL */
-
#ifdef CONFIG_ARM64
#define __W "w"
#else
diff --git a/doc/usage/acpi.rst b/doc/usage/cmd/acpi.rst
index 14bafc8..14bafc8 100644
--- a/doc/usage/acpi.rst
+++ b/doc/usage/cmd/acpi.rst
diff --git a/doc/usage/addrmap.rst b/doc/usage/cmd/addrmap.rst
index 472fd54..472fd54 100644
--- a/doc/usage/addrmap.rst
+++ b/doc/usage/cmd/addrmap.rst
diff --git a/doc/usage/askenv.rst b/doc/usage/cmd/askenv.rst
index 5c4ca35..5c4ca35 100644
--- a/doc/usage/askenv.rst
+++ b/doc/usage/cmd/askenv.rst
diff --git a/doc/usage/base.rst b/doc/usage/cmd/base.rst
index db9cd4d..db9cd4d 100644
--- a/doc/usage/base.rst
+++ b/doc/usage/cmd/base.rst
diff --git a/doc/usage/bootefi.rst b/doc/usage/cmd/bootefi.rst
index 282f22a..282f22a 100644
--- a/doc/usage/bootefi.rst
+++ b/doc/usage/cmd/bootefi.rst
diff --git a/doc/usage/booti.rst b/doc/usage/cmd/booti.rst
index d631fb5..d631fb5 100644
--- a/doc/usage/booti.rst
+++ b/doc/usage/cmd/booti.rst
diff --git a/doc/usage/bootmenu.rst b/doc/usage/cmd/bootmenu.rst
index 1f094ad..1f094ad 100644
--- a/doc/usage/bootmenu.rst
+++ b/doc/usage/cmd/bootmenu.rst
diff --git a/doc/usage/button.rst b/doc/usage/cmd/button.rst
index ea41762..ea41762 100644
--- a/doc/usage/button.rst
+++ b/doc/usage/cmd/button.rst
diff --git a/doc/usage/x86/cbsysinfo.rst b/doc/usage/cmd/cbsysinfo.rst
index 8c03a85..8c03a85 100644
--- a/doc/usage/x86/cbsysinfo.rst
+++ b/doc/usage/cmd/cbsysinfo.rst
diff --git a/doc/usage/conitrace.rst b/doc/usage/cmd/conitrace.rst
index d9916c8..d9916c8 100644
--- a/doc/usage/conitrace.rst
+++ b/doc/usage/cmd/conitrace.rst
diff --git a/doc/usage/echo.rst b/doc/usage/cmd/echo.rst
index 861abdf..861abdf 100644
--- a/doc/usage/echo.rst
+++ b/doc/usage/cmd/echo.rst
diff --git a/doc/usage/exception.rst b/doc/usage/cmd/exception.rst
index 27df88b..27df88b 100644
--- a/doc/usage/exception.rst
+++ b/doc/usage/cmd/exception.rst
diff --git a/doc/usage/exit.rst b/doc/usage/cmd/exit.rst
index 769223c..769223c 100644
--- a/doc/usage/exit.rst
+++ b/doc/usage/cmd/exit.rst
diff --git a/doc/usage/extension.rst b/doc/usage/cmd/extension.rst
index 2b88398..6366cf5 100644
--- a/doc/usage/extension.rst
+++ b/doc/usage/cmd/extension.rst
@@ -1,8 +1,8 @@
.. SPDX-License-Identifier: GPL-2.0+
.. Copyright 2021, Kory Maincent <kory.maincent@bootlin.com>
-U-Boot extension board usage (CONFIG_EXTENSION)
-===============================================
+extension command
+=================
Synopsis
--------
diff --git a/doc/usage/false.rst b/doc/usage/cmd/false.rst
index a17fe86..a17fe86 100644
--- a/doc/usage/false.rst
+++ b/doc/usage/cmd/false.rst
diff --git a/doc/usage/fatinfo.rst b/doc/usage/cmd/fatinfo.rst
index af2eba4..af2eba4 100644
--- a/doc/usage/fatinfo.rst
+++ b/doc/usage/cmd/fatinfo.rst
diff --git a/doc/usage/fatload.rst b/doc/usage/cmd/fatload.rst
index 93acb27..93acb27 100644
--- a/doc/usage/fatload.rst
+++ b/doc/usage/cmd/fatload.rst
diff --git a/doc/usage/for.rst b/doc/usage/cmd/for.rst
index f9e5049..f9e5049 100644
--- a/doc/usage/for.rst
+++ b/doc/usage/cmd/for.rst
diff --git a/doc/usage/load.rst b/doc/usage/cmd/load.rst
index 1efee77..1efee77 100644
--- a/doc/usage/load.rst
+++ b/doc/usage/cmd/load.rst
diff --git a/doc/usage/loady.rst b/doc/usage/cmd/loady.rst
index 2819cc7..2819cc7 100644
--- a/doc/usage/loady.rst
+++ b/doc/usage/cmd/loady.rst
diff --git a/doc/usage/mbr.rst b/doc/usage/cmd/mbr.rst
index bddf2f6..bddf2f6 100644
--- a/doc/usage/mbr.rst
+++ b/doc/usage/cmd/mbr.rst
diff --git a/doc/usage/md.rst b/doc/usage/cmd/md.rst
index 4c1073e..7e9944e 100644
--- a/doc/usage/md.rst
+++ b/doc/usage/cmd/md.rst
@@ -102,5 +102,3 @@ Return value
------------
The return value $? is always 0 (true).
-
-
diff --git a/doc/usage/mmc.rst b/doc/usage/cmd/mmc.rst
index 02b5d7b..55e3f9c 100644
--- a/doc/usage/mmc.rst
+++ b/doc/usage/cmd/mmc.rst
@@ -85,22 +85,26 @@ The 'mmc dev' command shows or set current mmc device.
mode
speed mode to set.
- CONFIG_MMC_SPEED_MODE_SET should be enabled. The required speed mode is
- passed as the index from the following list.
-
- 0 - MMC_LEGACY
- 1 - MMC_HS
- 2 - SD_HS
- 3 - MMC_HS_52
- 4 - MMC_DDR_52
- 5 - UHS_SDR12
- 6 - UHS_SDR25
- 7 - UHS_SDR50
- 8 - UHS_DDR50
- 9 - UHS_SDR104
- 10 - MMC_HS_200
- 11 - MMC_HS_400
- 12 - MMC_HS_400_ES
+ CONFIG_MMC_SPEED_MODE_SET should be enabled. The requested speed mode is
+ passed as a decimal number according to the following table:
+
+ ========== ==========================
+ Speed mode Description
+ ========== ==========================
+ 0 MMC legacy
+ 1 MMC High Speed (26MHz)
+ 2 SD High Speed (50MHz)
+ 3 MMC High Speed (52MHz)
+ 4 MMC DDR52 (52MHz)
+ 5 UHS SDR12 (25MHz)
+ 6 UHS SDR25 (50MHz)
+ 7 UHS SDR50 (100MHz)
+ 8 UHS DDR50 (50MHz)
+ 9 UHS SDR104 (208MHz)
+ 10 HS200 (200MHz)
+ 11 HS400 (200MHz)
+ 12 HS400ES (200MHz)
+ ========== ==========================
A speed mode can be set only if it has already been enabled in the device tree
diff --git a/doc/usage/pinmux.rst b/doc/usage/cmd/pinmux.rst
index 9f4392c..9f4392c 100644
--- a/doc/usage/pinmux.rst
+++ b/doc/usage/cmd/pinmux.rst
diff --git a/doc/usage/pstore.rst b/doc/usage/cmd/pstore.rst
index 1c83745..1c83745 100644
--- a/doc/usage/pstore.rst
+++ b/doc/usage/cmd/pstore.rst
diff --git a/doc/usage/qfw.rst b/doc/usage/cmd/qfw.rst
index b3704b9..b3704b9 100644
--- a/doc/usage/qfw.rst
+++ b/doc/usage/cmd/qfw.rst
diff --git a/doc/usage/reset.rst b/doc/usage/cmd/reset.rst
index 384d5d6..384d5d6 100644
--- a/doc/usage/reset.rst
+++ b/doc/usage/cmd/reset.rst
diff --git a/doc/usage/sbi.rst b/doc/usage/cmd/sbi.rst
index 96d8861..96d8861 100644
--- a/doc/usage/sbi.rst
+++ b/doc/usage/cmd/sbi.rst
diff --git a/doc/usage/scp03.rst b/doc/usage/cmd/scp03.rst
index 7ff87ed..7ff87ed 100644
--- a/doc/usage/scp03.rst
+++ b/doc/usage/cmd/scp03.rst
diff --git a/doc/usage/setexpr.rst b/doc/usage/cmd/setexpr.rst
index 2e511b1..2e511b1 100644
--- a/doc/usage/setexpr.rst
+++ b/doc/usage/cmd/setexpr.rst
diff --git a/doc/usage/sf.rst b/doc/usage/cmd/sf.rst
index 71bd1be..71bd1be 100644
--- a/doc/usage/sf.rst
+++ b/doc/usage/cmd/sf.rst
diff --git a/doc/usage/size.rst b/doc/usage/cmd/size.rst
index f0c35e4..f0c35e4 100644
--- a/doc/usage/size.rst
+++ b/doc/usage/cmd/size.rst
diff --git a/doc/usage/true.rst b/doc/usage/cmd/true.rst
index f9ef71b..f9ef71b 100644
--- a/doc/usage/true.rst
+++ b/doc/usage/cmd/true.rst
diff --git a/doc/usage/ums.rst b/doc/usage/cmd/ums.rst
index 3cde5fa..3cde5fa 100644
--- a/doc/usage/ums.rst
+++ b/doc/usage/cmd/ums.rst
diff --git a/doc/usage/wdt.rst b/doc/usage/cmd/wdt.rst
index 8d80433..8d80433 100644
--- a/doc/usage/wdt.rst
+++ b/doc/usage/cmd/wdt.rst
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index 630a6cb..8a54d9c 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -18,38 +18,47 @@ Shell commands
.. toctree::
:maxdepth: 1
- acpi
- addrmap
- askenv
- base
- bootefi
- booti
- bootmenu
- button
- x86/cbsysinfo
- conitrace
- echo
- exception
- extension
- exit
- false
- fatinfo
- fatload
- for
- load
- loady
- mbr
- md
- mmc
- pinmux
- pstore
- qfw
- reset
- sbi
- sf
- scp03
- setexpr
- size
- true
- ums
- wdt
+ cmd/acpi
+ cmd/addrmap
+ cmd/askenv
+ cmd/base
+ cmd/bootefi
+ cmd/booti
+ cmd/bootmenu
+ cmd/button
+ cmd/cbsysinfo
+ cmd/conitrace
+ cmd/echo
+ cmd/exception
+ cmd/extension
+ cmd/exit
+ cmd/false
+ cmd/fatinfo
+ cmd/fatload
+ cmd/for
+ cmd/load
+ cmd/loady
+ cmd/mbr
+ cmd/md
+ cmd/mmc
+ cmd/pinmux
+ cmd/pstore
+ cmd/qfw
+ cmd/reset
+ cmd/sbi
+ cmd/sf
+ cmd/scp03
+ cmd/setexpr
+ cmd/size
+ cmd/true
+ cmd/ums
+ cmd/wdt
+
+Booting OS
+----------
+
+.. toctree::
+ :maxdepth: 1
+
+ os/plan9
+ os/vxworks
diff --git a/doc/README.plan9 b/doc/usage/os/plan9.rst
index 2d3d0e0..f91712c 100644
--- a/doc/README.plan9
+++ b/doc/usage/os/plan9.rst
@@ -1,3 +1,10 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. Steven Stallion
+.. June 2013
+
+Plan 9
+======
+
Plan 9 from Bell Labs kernel images require additional setup to pass
configuration information to the kernel. An environment variable named
confaddr must be defined with the same value as CONFADDR (see mem.h).
@@ -10,9 +17,6 @@ bootargs environment variable will be copied.
If no command line arguments or bootargs are defined, CONFADDR is left
uninitialized to permit manual configuration. For example, PC-style
-configuration could be simulated by issuing a fatload in bootcmd:
+configuration could be simulated by issuing a fatload in bootcmd::
# setenv bootcmd fatload mmc 0 $confaddr plan9.ini; ...; bootm
-
-Steven Stallion
-June 2013
diff --git a/doc/README.vxworks b/doc/usage/os/vxworks.rst
index 12a0d74..0fe33d2 100644
--- a/doc/README.vxworks
+++ b/doc/usage/os/vxworks.rst
@@ -1,11 +1,10 @@
-# SPDX-License-Identifier: GPL-2.0+
-#
-# Copyright (C) 2013, Miao Yan <miao.yan@windriver.com>
-# Copyright (C) 2015-2018, Bin Meng <bmeng.cn@gmail.com>
-# Copyright (C) 2019, Lihua Zhao <lihua.zhao@windriver.com>
+.. SPDX-License-Identifier: GPL-2.0+
+.. Copyright (C) 2013, Miao Yan <miao.yan@windriver.com>
+.. Copyright (C) 2015-2018, Bin Meng <bmeng.cn@gmail.com>
+.. Copyright (C) 2019, Lihua Zhao <lihua.zhao@windriver.com>
-VxWorks Support
-===============
+VxWorks
+=======
This document describes the information about U-Boot loading VxWorks kernel.
@@ -14,13 +13,13 @@ Status
U-Boot supports loading VxWorks kernels via 'bootvx' and 'bootm' commands.
For booting old kernels (6.9.x) on PowerPC and ARM, and all kernel versions
on other architectures, 'bootvx' shall be used. For booting VxWorks 7 kernels
-on PowerPC and ARM, 'bootm' shall be used.
+on PowerPC/ARM/RISC-V, 'bootm' shall be used.
With CONFIG_EFI_LOADER option, it's possible to chain load a VxWorks x86 kernel
via the UEFI boot loader application for VxWorks loaded by 'bootefi' command.
-VxWorks 7 on PowerPC and ARM
----------------------------
+VxWorks 7 on PowerPC/ARM/RISC-V
+-------------------------------
From VxWorks 7, VxWorks starts adopting device tree as its hardware description
mechanism (for PowerPC and ARM), thus requiring boot interface changes.
This section will describe the new interface.
@@ -37,17 +36,26 @@ is cleared. The calling convention is described below:
For PowerPC, the calling convention of the new VxWorks entry point conforms to
the ePAPR standard, which is shown below (see ePAPR for more details):
+.. code-block:: c
+
void (*kernel_entry)(fdt_addr, 0, 0, EPAPR_MAGIC, boot_IMA, 0, 0)
For ARM, the calling convention is shown below:
+.. code-block:: c
+
void (*kernel_entry)(void *fdt_addr)
When using the Linux compatible standard DTB, the calling convention of VxWorks
entry point is exactly the same as the Linux kernel.
+For RISC-V, there is no legacy bootm flow as VxWorks always uses the same boot
+interface as the Linux kernel, with the calling convention below::
+
+ void (*kernel_entry)(unsigned long hartid, void *fdt_addr)
+
When booting a VxWorks 7 kernel (uImage format), the parameters passed to bootm
-is like below:
+is like below::
bootm <kernel image address> - <device tree address>
@@ -108,6 +116,7 @@ BIOS of the graphics card first.
CONFIG_FRAMEBUFFER_SET_VESA_MODE need remain set but care must be taken
at which VESA mode is to be set. The supported pixel format is 32-bit
RGBA, hence the available VESA mode can only be one of the following:
+
* FRAMEBUFFER_VESA_MODE_10F
* FRAMEBUFFER_VESA_MODE_112
* FRAMEBUFFER_VESA_MODE_115
diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile
index befed71..034d26c 100644
--- a/lib/efi_loader/Makefile
+++ b/lib/efi_loader/Makefile
@@ -16,7 +16,7 @@ CFLAGS_helloworld.o := $(CFLAGS_EFI) -Os -ffreestanding
CFLAGS_REMOVE_helloworld.o := $(CFLAGS_NON_EFI)
CFLAGS_dtbdump.o := $(CFLAGS_EFI) -Os -ffreestanding
CFLAGS_REMOVE_dtbdump.o := $(CFLAGS_NON_EFI)
-CFLAGS_initrddump_exit.o := $(CFLAGS_EFI) -Os -ffreestanding
+CFLAGS_initrddump.o := $(CFLAGS_EFI) -Os -ffreestanding
CFLAGS_REMOVE_initrddump.o := $(CFLAGS_NON_EFI)
ifneq ($(CONFIG_CMD_BOOTEFI_HELLO_COMPILE),)
diff --git a/test/py/tests/test_efi_bootmgr/conftest.py b/test/py/tests/test_efi_bootmgr/conftest.py
index 69008fd..a0a754a 100644
--- a/test/py/tests/test_efi_bootmgr/conftest.py
+++ b/test/py/tests/test_efi_bootmgr/conftest.py
@@ -4,9 +4,9 @@
"""
import os
-import pytest
import shutil
-from subprocess import call, check_call
+from subprocess import check_call
+import pytest
@pytest.fixture(scope='session')
def efi_bootmgr_data(u_boot_config):
@@ -14,7 +14,7 @@ def efi_bootmgr_data(u_boot_config):
tests
Args:
- u_boot_config: U-boot configuration.
+ u_boot_config -- U-boot configuration.
Return:
A path to disk image to be used for testing
@@ -34,9 +34,7 @@ def efi_bootmgr_data(u_boot_config):
shutil.copyfile(u_boot_config.build_dir + '/lib/efi_loader/initrddump.efi',
mnt_point + '/initrddump.efi')
- check_call('virt-make-fs --partition=gpt --size=+1M --type=vfat {} {}'
- .format(mnt_point, image_path), shell=True)
-
- print(image_path)
+ check_call(f'virt-make-fs --partition=gpt --size=+1M --type=vfat {mnt_point} {image_path}',
+ shell=True)
- yield image_path
+ return image_path
diff --git a/test/py/tests/test_efi_bootmgr/test_efi_bootmgr.py b/test/py/tests/test_efi_bootmgr/test_efi_bootmgr.py
index f87e0a2..75a6e7c 100644
--- a/test/py/tests/test_efi_bootmgr/test_efi_bootmgr.py
+++ b/test/py/tests/test_efi_bootmgr/test_efi_bootmgr.py
@@ -1,4 +1,6 @@
# SPDX-License-Identifier: GPL-2.0+
+""" Unit test for UEFI bootmanager
+"""
import pytest
@@ -6,7 +8,16 @@ import pytest
@pytest.mark.buildconfigspec('cmd_efidebug')
@pytest.mark.buildconfigspec('cmd_bootefi_bootmgr')
def test_efi_bootmgr(u_boot_console, efi_bootmgr_data):
- u_boot_console.run_command(cmd = 'host bind 0 {}'.format(efi_bootmgr_data))
+ """ Unit test for UEFI bootmanager
+ The efidebug command is used to set up UEFI load options.
+ The bootefi bootmgr loads initrddump.efi as a payload.
+ The crc32 of the loaded initrd.img is checked
+
+ Args:
+ u_boot_console -- U-Boot console
+ efi_bootmgr_data -- Path to the disk image used for testing.
+ """
+ u_boot_console.run_command(cmd = f'host bind 0 {efi_bootmgr_data}')
u_boot_console.run_command(cmd = 'efidebug boot add ' \
'-b 0001 label-1 host 0:1 initrddump.efi ' \
diff --git a/test/py/tests/test_efi_fit.py b/test/py/tests/test_efi_fit.py
index 068a35a..92d071f 100644
--- a/test/py/tests/test_efi_fit.py
+++ b/test/py/tests/test_efi_fit.py
@@ -203,7 +203,7 @@ def test_efi_fit_launch(u_boot_console):
"""Compute the path of a given (temporary) file.
Args:
- file_name: The name of a file within U-Boot build dir.
+ file_name -- The name of a file within U-Boot build dir.
Return:
The computed file path.
"""
@@ -217,8 +217,8 @@ def test_efi_fit_launch(u_boot_console):
build dir and, optionally, compresses the file using gzip.
Args:
- fname: The target file name within U-Boot build dir.
- comp: Flag to enable gzip compression.
+ fname -- The target file name within U-Boot build dir.
+ comp -- Flag to enable gzip compression.
Return:
The path of the created file.
"""
@@ -238,8 +238,8 @@ def test_efi_fit_launch(u_boot_console):
Creates a DTS file and compiles it to a DTB.
Args:
- fdt_type: The type of the FDT, i.e. internal, user.
- comp: Flag to enable gzip compression.
+ fdt_type -- The type of the FDT, i.e. internal, user.
+ comp -- Flag to enable gzip compression.
Return:
The path of the created file.
"""
@@ -252,7 +252,7 @@ def test_efi_fit_launch(u_boot_console):
# Generate a test FDT file.
dts = make_fpath('test-efi-fit-%s.dts' % fdt_type)
- with open(dts, 'w') as file:
+ with open(dts, 'w', encoding='ascii') as file:
file.write(FDT_DATA % fdt_params)
# Build the test FDT.
@@ -268,7 +268,7 @@ def test_efi_fit_launch(u_boot_console):
Runs 'mkimage' to create a FIT image within U-Boot build dir.
Args:
- comp: Enable gzip compression for the EFI binary and FDT blob.
+ comp -- Enable gzip compression for the EFI binary and FDT blob.
Return:
The path of the created file.
"""
@@ -285,7 +285,7 @@ def test_efi_fit_launch(u_boot_console):
# Generate a test ITS file.
its_path = make_fpath('test-efi-fit-helloworld.its')
- with open(its_path, 'w') as file:
+ with open(its_path, 'w', encoding='ascii') as file:
file.write(ITS_DATA % its_params)
# Build the test ITS.
@@ -298,8 +298,9 @@ def test_efi_fit_launch(u_boot_console):
"""Load the FIT image using the 'host load' command and return its address.
Args:
- fit: Dictionary describing the FIT image to load, see env__efi_fit_test_file
- in the comment at the beginning of this file.
+ fit -- Dictionary describing the FIT image to load, see
+ env__efi_fit_test_file in the comment at the beginning of
+ this file.
Return:
The address where the file has been loaded.
"""
@@ -325,8 +326,8 @@ def test_efi_fit_launch(u_boot_console):
CRC32 are validated.
Args:
- fit: Dictionary describing the FIT image to load, see env__efi_fit_tftp_file
- in the comment at the beginning of this file.
+ fit -- Dictionary describing the FIT image to load, see env__efi_fit_tftp_file
+ in the comment at the beginning of this file.
Return:
The address where the file has been loaded.
"""
@@ -377,9 +378,9 @@ def test_efi_fit_launch(u_boot_console):
Eventually the 'Hello, world' message is expected in the U-Boot console.
Args:
- enable_fdt: Flag to enable using the FDT blob inside FIT image.
- enable_comp: Flag to enable GZIP compression on EFI and FDT
- generated content.
+ enable_fdt -- Flag to enable using the FDT blob inside FIT image.
+ enable_comp -- Flag to enable GZIP compression on EFI and FDT
+ generated content.
"""
with cons.log.section('FDT=%s;COMP=%s' % (enable_fdt, enable_comp)):