efi_loader: Depend on BLK
authorTom Rini <trini@konsulko.com>
Wed, 15 Jan 2025 01:22:10 +0000 (19:22 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 21 Jan 2025 01:26:54 +0000 (19:26 -0600)
In reworking the BLK usage in Kconfig, I found there's a few issues with
EFI_LOADER=y and BLK=n. In general, we can easily say that
lib/efi_loader/efi_file.c also should only be built with CONFIG_BLK.
That however leaves the bootmgr code, eficonfig code and then parts of
efi_device_path.c, efi_boottime.c and efi_setup.c which functionally
depend on BLK. While these calls can be if'd out, I'm unsure if the
result is usable. So rather than leave that buildable and imply that it
is, I'm leaving that combination non-buildable and commenting that
EFI_LOADER depends on BLK in the Kconfig currently.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
lib/efi_loader/Kconfig

index c46ffe3..798dced 100644 (file)
@@ -8,13 +8,14 @@ config EFI_LOADER
                        SYS_CPU = armv7   || \
                        SYS_CPU = armv8)  || \
                X86 || RISCV || SANDBOX)
+       # We have not fully removed the requirement for some block device
+       depends on BLK
        # We need EFI_STUB_64BIT to be set on x86_64 with EFI_STUB
        depends on !EFI_STUB || !X86_64 || EFI_STUB_64BIT
        # We need EFI_STUB_32BIT to be set on x86_32 with EFI_STUB
        depends on !EFI_STUB || !X86 || X86_64 || EFI_STUB_32BIT
        depends on !EFI_APP
        default y if !ARM || SYS_CPU = armv7 || SYS_CPU = armv8
-       select BLK
        select CHARSET
        # We need to send DM events, dynamically, in the EFI block driver
        select DM_EVENT