[U-Boot] [PATCH v2 00/18] efi_loader: enable EFI driver provided block device
Simon Glass
sjg at chromium.org
Thu Jan 18 23:00:45 UTC 2018
Hi Heinrich,
On 17 January 2018 at 11:15, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> With this patch series an EFI application or driver can supply
> a block device which in turn can be used to download an image.
>
> E.g. we can load iPXE, connect iSCSI drives, download grub from the
> SAN and afterwards with grub download and run an EFI application.
> Booting Linux from an iSCSI drive was successful on arm64.
>
> v2:
> Add an additional patch to fix ExitBootServices.
> Provide comments for EFI block driver.
> Avoid printing when not in debug mode
> Add product tools/file2include to .gitignore.
> Put the patch with the test for block io after the patch for the
> driver.
>
> Heinrich Schuchardt (18):
> efi_loader: return NULL from device path functions
> efi_loader: address of the simple file system protocol
> efi_loader: correct find simple file system protocol
> efi_loader: print device path when entering efi_load_image
> efi_loader: allocate correct memory type for EFI image
> efi_loader: check tables in helloworld.efi
> efi_loader: fix StartImage bootservice
> efi_loader: efi_disk_register: correctly determine if_type_name
> efi_loader: make efi_block_io_guid a global symbol
> efi_loader: provide a function to create a partition node
> efi_loader: make efi_disk_create_partitions a global symbol
> efi_loader: correct EFI_BLOCK_IO_PROTOCOL definitions
> efi_loader: provide function to get last node of a device path
> efi_loader: provide links between devices EFI handles
> tools: provide a tool to convert a binary file to an include
> efi_driver: EFI block driver
> efi_selftest: provide a test for block io
> efi_loader: fix ExitBootServices
>
> MAINTAINERS | 1 +
> common/board_r.c | 3 +
> drivers/block/blk-uclass.c | 4 +-
> include/blk.h | 1 +
> include/config_fallbacks.h | 1 +
> include/dm/device.h | 4 +
> include/dm/uclass-id.h | 1 +
> include/efi_api.h | 16 +-
> include/efi_driver.h | 30 ++
> include/efi_loader.h | 21 +-
> lib/Makefile | 1 +
> lib/efi_driver/Makefile | 13 +
> lib/efi_driver/efi_block_device.c | 175 ++++++++++++
> lib/efi_driver/efi_uclass.c | 330 ++++++++++++++++++++++
> lib/efi_loader/efi_boottime.c | 42 ++-
> lib/efi_loader/efi_device_path.c | 168 +++++++++---
> lib/efi_loader/efi_disk.c | 137 +++++++---
> lib/efi_loader/efi_image_loader.c | 64 +++--
> lib/efi_loader/helloworld.c | 26 ++
> lib/efi_selftest/Makefile | 4 +
> lib/efi_selftest/efi_selftest_block_device.c | 395 +++++++++++++++++++++++++++
> lib/efi_selftest/efi_selftest_disk_image.h | 69 +++++
> tools/.gitignore | 1 +
> tools/Makefile | 3 +
> tools/file2include.c | 106 +++++++
> 25 files changed, 1493 insertions(+), 123 deletions(-)
> create mode 100644 include/efi_driver.h
> create mode 100644 lib/efi_driver/Makefile
> create mode 100644 lib/efi_driver/efi_block_device.c
> create mode 100644 lib/efi_driver/efi_uclass.c
> create mode 100644 lib/efi_selftest/efi_selftest_block_device.c
> create mode 100644 lib/efi_selftest/efi_selftest_disk_image.h
> create mode 100644 tools/file2include.c
>
> --
> 2.14.2
>
Do you have a git tree with these patches? I get errors when applying them.
Some general comments for discussion, based on my limited understanding.
At present from what I can tell, this looks through the UCLASS_EFI
drivers and instantiates a EFI driver/device for each. But it does not
seem to relate this to the U-Boot driver. It seems in fact to create a
new device. For example efi_bl_bind() calls blk_create_device().
Instead I think there should be a real driver-rmodel device creasted
with UCLASS_EFI. It should be a child of the DM UCLASS_BLK device. The
could work in a similar way to now, except that it can scan DM devices
of a particular UCLASS rather than scanning DM drivers.
Also the patch that creates a tool to generate a binary as a header
file - can we use the same method as we use for other embedding? See
for example how .dtb is done.
Regards,
Simon
More information about the U-Boot
mailing list