payloads/depthcharge: Add default 64-bit libpayload config

Add CONFIG_LP_DEFCONFIG_OVERRIDE_X64 flag to select default 64-bit
config file in payloads/libpayload/configs directory.

This is used in standalone environment. The existing libpayload
deconfig file is for boards with 32-bit format and deconfig_64
file is added for 64-bit without adding specific
board.[board name] file in libpayload.

BUG=none
TEST=Build with this new flag and check that the libpayload and
depthcharge.elf are built in 64-bit format.

Signed-off-by: Cliff Huang <cliff.huang@intel.com>
Change-Id: Iac07cf9e3c11e49955c69553407be76ef4f8c060
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84107
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kim, Wonkyu <wonkyu.kim@intel.com>
This commit is contained in:
Cliff Huang 2024-08-27 19:56:13 -07:00 committed by Matt DeVillier
commit 8d020508fc
5 changed files with 29 additions and 2 deletions

View file

@ -152,7 +152,8 @@ payloads/external/depthcharge/depthcharge/build/depthcharge.elf depthcharge: $(D
DEPTHCHARGE_STABLE=$(CONFIG_DEPTHCHARGE_STABLE) \
DEPTHCHARGE_REVISION=$(CONFIG_DEPTHCHARGE_REVISION) \
DEPTHCHARGE_REVISION_ID=$(CONFIG_DEPTHCHARGE_REVISION_ID) \
OVERRIDE_DEFCONFIG=$(CONFIG_LP_DEFCONFIG_OVERRIDE)
OVERRIDE_DEFCONFIG=$(CONFIG_LP_DEFCONFIG_OVERRIDE) \
OVERRIDE_DEFCONFIG_64=$(CONFIG_LP_DEFCONFIG_OVERRIDE_X64)
# edk2

View file

@ -62,4 +62,15 @@ config LP_DEFCONFIG_OVERRIDE
instead. This is can be a convenience for development purposes, or
if the defaults in defconfig are sufficient for your system.
config LP_DEFCONFIG_OVERRIDE_X64
bool "Use default 64-bit libpayload config"
depends on !LP_DEFCONFIG_OVERRIDE
help
The Depthcharge makefile looks for a file config.<boardname> in the
libpayload/configs directory. Say Y here to use the file defconfig
for 64-bit format instead. This can be convenient for development for
a new board, or if the defaults in 64-bit defconfig file (i.e.
defconfig_64) are sufficient for your system without creating
board.[name] file.
endif

View file

@ -30,6 +30,9 @@ BOARD:=$(notdir $(CONFIG_MAINBOARD_DIR))
ifeq ($(OVERRIDE_DEFCONFIG),y)
libpayload_config=$(libpayload_dir)/configs/defconfig
DEPTHCHARGE_LIBPAYLOAD_MSG="Depthcharge: Using default defconfig for libpayload"
else ifeq ($(OVERRIDE_DEFCONFIG_64),y)
libpayload_config=$(libpayload_dir)/configs/defconfig_64
DEPTHCHARGE_LIBPAYLOAD_MSG="Depthcharge: Using default defconfig for 64-bit libpayload"
else
libpayload_config=$(libpayload_dir)/configs/config.$(BOARD)
DEPTHCHARGE_LIBPAYLOAD_MSG="Depthcharge: Using $(libpayload_dir)/configs/config.$(BOARD)"

View file

@ -0,0 +1,9 @@
CONFIG_LP_ARCH_X86_64=y
# CONFIG_LP_MULTIBOOT is not set
CONFIG_LP_COREBOOT_VIDEO_CONSOLE=y
CONFIG_LP_USB=y
CONFIG_LP_USB_UHCI=y
CONFIG_LP_USB_OHCI=y
CONFIG_LP_USB_EHCI=y
CONFIG_LP_USB_XHCI=y
CONFIG_LP_HEAP_SIZE=1048576

View file

@ -38,7 +38,10 @@ includes-$(CONFIG_LP_TINYCURSES) += curses.h
ifeq ($(CONFIG_LP_PDCURSES),y)
PDCURSES := PDCurses
INCLUDES += -D_LP64=0 -Icurses/$(PDCURSES) -Icurses/pdcurses-backend -Icurses/menu -Icurses/form
ifneq ($(CONFIG_LP_ARCH_X86_64),y)
INCLUDES += -D_LP64=0
endif
INCLUDES += -Icurses/$(PDCURSES) -Icurses/pdcurses-backend -Icurses/menu -Icurses/form
endif
libcurses-$(CONFIG_LP_PDCURSES) += pdcurses-backend/pdcdisp.c