From b4917ed44d049b3aa5eb865c5922e62e9394a51a Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sat, 10 Jan 2026 08:51:56 -0600 Subject: [PATCH] payloads/edk2: rework serial output configuration Make EDK2_DEBUG automatically select CONSOLE_SERIAL, require EDK2_CBMEM_LOGGING to depend on EDK2_RELEASE, and make serial console mutually exclusive with CBMEM logging. Revise the Kconfig text to indicate the option is for the serial console, not serial debug output. This prevents users from selecting options which conflict or will result in a different result than expected. It simplifes the build options into 4 clear choices: - Release build - Release build with cbmem logging - Release build with serial console support - Debug build with serial debugging + serial console support TEST=build/boot google/drobit with above 4 build configurations. Change-Id: I15bbbcfcb2d9d0b1d4c2074f2c33012ec94f6c01 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/90719 Tested-by: build bot (Jenkins) Reviewed-by: Sean Rhodes --- payloads/external/edk2/Kconfig | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/payloads/external/edk2/Kconfig b/payloads/external/edk2/Kconfig index 7bfd486f7a..226e82d434 100644 --- a/payloads/external/edk2/Kconfig +++ b/payloads/external/edk2/Kconfig @@ -128,8 +128,9 @@ choice config EDK2_DEBUG bool "Generate edk2 debug build" + select CONSOLE_SERIAL help - Generate a debug build. + Generate a debug build. Select this if you want to enable serial debugging output. config EDK2_RELEASE bool "Generate edk2 release build" @@ -190,11 +191,12 @@ config EDK2_BOOT_TIMEOUT config EDK2_CBMEM_LOGGING bool "Enable edk2 logging to CBMEM" + depends on EDK2_RELEASE help Select this option if you want to enable edk2 logging to CBMEM. - You may want to increase the default cbmem buffer size when selecting - this option, especially if using a debug (vs release) build. - Selecting this option will increase the payload size in CBFS by 0x10000. + You will want to increase the default cbmem buffer size when selecting + this option, as it will increase logging output significantly. + Selecting this option will increase the payload size in CBFS by ~1MB. config EDK2_CPU_TIMER_LIB bool @@ -262,12 +264,14 @@ config EDK2_SD_MMC_TIMEOUT Most only require 10ms, but certain readers can take 1s. config EDK2_SERIAL_SUPPORT - bool "Support serial output" + bool "Enable serial console" default y if EDK2_DEBUG default n + depends on !EDK2_CBMEM_LOGGING + select CONSOLE_SERIAL help - Enable serial port output in edk2. Serial output limits the performance of edk2's - FrontPage. + Enable serial consule support in edk2. Serial output limits the performance of edk2's + FrontPage. This option does not enable debugging output over serial. For that, use EDK2_DEBUG. config EDK2_SECURE_BOOT_SUPPORT bool "Enable UEFI Secure Boot support"