mbox series

[0/6,v2] Loadfile2 for initrd loading

Message ID 20210313214738.3257922-1-ilias.apalodimas@linaro.org
Headers show
Series Loadfile2 for initrd loading | expand

Message

Ilias Apalodimas March 13, 2021, 9:47 p.m. UTC
Hi!
This is v2 of [1]

Changes since v1:
 - minor coding style fixes from Heinrich
 - changed the DP format. Instead of VenMedia - 0x01 - initrd, we skip
   the 0x01 between VenMedia and the first file. 
 - final device path is stripped in efi_get_dp_from_boot() instead of 
   get_initrd_fp()
 - Fixed comments on documentation

[1] https://lists.denx.de/pipermail/u-boot/2021-March/443399.html

Ilias Apalodimas (6):
  efi_selftest: Remove loadfile2 for initrd selftests
  efi_loader: Add device path related functions for initrd via Boot####
  efi_loader: Introduce helper functions for EFI
  efi_loader: Replace config option for initrd loading
  efidebug: add multiple device path instances on Boot####
  doc: Update uefi documentation for initrd loading options

 cmd/bootefi.c                                 |   3 +
 cmd/efidebug.c                                | 194 ++++++++++++---
 doc/board/emulation/qemu_capsule_update.rst   |   4 +-
 doc/uefi/uefi.rst                             |  23 +-
 include/efi_helper.h                          |  15 ++
 include/efi_loader.h                          |   7 +
 lib/efi_loader/Kconfig                        |  15 +-
 lib/efi_loader/Makefile                       |   1 +
 lib/efi_loader/efi_bootmgr.c                  |  19 +-
 lib/efi_loader/efi_device_path.c              |  99 +++++++-
 lib/efi_loader/efi_helper.c                   | 133 +++++++++++
 lib/efi_loader/efi_load_initrd.c              | 189 +++++++++------
 lib/efi_loader/efi_var_common.c               |  33 +++
 lib/efi_selftest/Makefile                     |   1 -
 lib/efi_selftest/efi_selftest_load_initrd.c   | 221 ------------------
 .../test_efi_capsule/test_capsule_firmware.py |   6 +-
 test/py/tests/test_efi_secboot/test_signed.py |  16 +-
 .../test_efi_secboot/test_signed_intca.py     |   8 +-
 .../tests/test_efi_secboot/test_unsigned.py   |   8 +-
 19 files changed, 618 insertions(+), 377 deletions(-)
 create mode 100644 include/efi_helper.h
 create mode 100644 lib/efi_loader/efi_helper.c
 delete mode 100644 lib/efi_selftest/efi_selftest_load_initrd.c

-- 
2.30.1

Comments

Heinrich Schuchardt March 14, 2021, 8:41 a.m. UTC | #1
On 3/13/21 10:47 PM, Ilias Apalodimas wrote:
> Hi!

> This is v2 of [1]

>

> Changes since v1:

>   - minor coding style fixes from Heinrich

>   - changed the DP format. Instead of VenMedia - 0x01 - initrd, we skip

>     the 0x01 between VenMedia and the first file.

>   - final device path is stripped in efi_get_dp_from_boot() instead of

>     get_initrd_fp()

>   - Fixed comments on documentation

>

> [1] https://lists.denx.de/pipermail/u-boot/2021-March/443399.html

>

> Ilias Apalodimas (6):

>    efi_selftest: Remove loadfile2 for initrd selftests

>    efi_loader: Add device path related functions for initrd via Boot####

>    efi_loader: Introduce helper functions for EFI

>    efi_loader: Replace config option for initrd loading

>    efidebug: add multiple device path instances on Boot####

>    doc: Update uefi documentation for initrd loading options


For testing I used:

./u-boot -T
efidebug boot add \
     -b d00d initrdtest host 0:1 initrddump.efi \
     -i host 0:1 initrd
efidebug boot next d00d
bootefi bootmgr
load
exit
setenv -e BootD00D
poweroff

The same could be done in a Python test.

Best regards

Heinrich