Skip to content

Commit 36a2375

Browse files
geertuardbiesheuvel
authored andcommitted
efi: EFI_EARLYCON should depend on EFI
CONFIG_EFI_EARLYCON defaults to yes, and thus is enabled on systems that do not support EFI, or do not have EFI support enabled, but do satisfy the symbol's other dependencies. While drivers/firmware/efi/ won't be entered during the build phase if CONFIG_EFI=n, and drivers/firmware/efi/earlycon.c itself thus won't be built, enabling EFI_EARLYCON does force-enable CONFIG_FONT_SUPPORT and CONFIG_ARCH_USE_MEMREMAP_PROT, and CONFIG_FONT_8x16, which is undesirable. Fix this by making CONFIG_EFI_EARLYCON depend on CONFIG_EFI. This reduces kernel size on headless systems by more than 4 KiB. Fixes: 69c1f39 ("efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation") Signed-off-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Damien Le Moal <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent ff04f3b commit 36a2375

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firmware/efi/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ config EFI_DEV_PATH_PARSER
270270

271271
config EFI_EARLYCON
272272
def_bool y
273-
depends on SERIAL_EARLYCON && !ARM && !IA64
273+
depends on EFI && SERIAL_EARLYCON && !ARM && !IA64
274274
select FONT_SUPPORT
275275
select ARCH_USE_MEMREMAP_PROT
276276

0 commit comments

Comments
 (0)