Skip to content

Add support for booting EFI FIT images

Cristian Ciocaltea u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2image: Add IH_OS_EFI for EFI chain-load bootcommon/image-fit.c common/image.c include/image.h+4 -10 replies
2/2bootm: Add a bootm command for type IH_OS_EFIcmd/Kconfig cmd/bootefi.c common/bootm_os.c +1 more+55 -23 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [U-Boot] [PATCH 0/2] Add support for booting EFI FIT images

Currently the only way to run an EFI binary like GRUB2 is via the 'bootefi' command, which cannot be used in a verified boot scenario.

The obvious solution to this limitation is to add support for booting FIT images containing those EFI binaries.

The implementation relies on a new image type - IH_OS_EFI - which can be created by using 'os = "efi"' inside an ITS file:

/ {
    #address-cells = <1>;

    images {
        efi-grub {
            description = "GRUB EFI";
            data = /incbin/("EFI/BOOT/bootarm.efi");
            type = "kernel_noload";
            arch = "arm";
            os = "efi";
            compression = "none";
            load = <0x0>;
            entry = <0x0>;
            hash-1 {
                algo = "sha256";
            };
        };
    };

    configurations {
        default = "config-grub";
        config-grub {
            kernel = "efi-grub";
            signature-1 {
                algo = "sha256,rsa2048";
                sign-images = "kernel";
            };
        };
    };
};

The bootm command has been extended to handle the IH_OS_EFI images. To enable this feature, a new configuration option has been added:
BOOTM_EFI

I tested the solution using the 'qemu_arm' board:

=> load scsi 0:1 ${kernel_addr_r} efi-image.fit
=> bootm ${kernel_addr_r}#config-grub

Cristian Ciocaltea (2):
image: Add IH_OS_EFI for EFI chain-load boot
bootm: Add a bootm command for type IH_OS_EFI

 cmd/Kconfig        |  9 ++++++++-
 cmd/bootefi.c      |  2 +-
 common/bootm_os.c  | 44 ++++++++++++++++++++++++++++++++++++++++++++
 common/image-fit.c |  3 ++-
 common/image.c     |  1 +
 include/bootm.h    |  2 ++
 include/image.h    |  1 +
 7 files changed, 59 insertions(+), 3 deletions(-)
Signature · 1 line
2.17.1