From b5962a934a4dae3d84590dc8ef290f5fa8fec34b Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Sat, 8 Jun 2019 12:29:02 +0530 Subject: Rampayload: Able to build coreboot without ramstage This patch removes all possible dependencies in order to build platform with CONFIG_RAMPAYLOAD enable(without ramstage). A. Create coreboot separate stage kconfigs This patch creates seperate stage configs as below 1. HAVE_BOOTBLOCK 2. HAVE_VERSTAGE 3. HAVE_ROMSTAGE 4. HAVE_POSTCAR 5. HAVE_RAMSTAGE B. Also ensures below kconfigs are aligned with correct stage configs 1. COMPRESS_RAMSTAGE and RELOCATABLE_RAMSTAGE are now enable if CONFIG_HAVE_RAMSTAGE is selected. 2. COMPRESS_BOOTBLOCK will enable if CONFIG_HAVE_BOOTBLOCK is set 3. COMPRESS_PRERAM_STAGES will enable if CONFIG_HAVE_VERSTAGE || CONFIG_HAVE_ROMSTAGE is selected. C. Also fix compilation issue with !CONFIG_HAVE_RAMSTAGE On x86 platform: Case 1: ramstage do exist: CONFIG_HAVE_RAMSTAGE=1 >> rmodules_$(ARCH-ramstage-y) will evaluate as rmodules_x86_32 Case 2: ramstage doesn't exist: CONFIG_HAVE_RAMSTAGE=0 >> rmodules_$(ARCH-ramstage-y) will evaluate as rmodules_ This patch fixes Case 2 usecase where platform doesn't select CONFIG_HAVE_RAMSTAGE. Also add option to create sipi_vector.manual based on $(TARGET_STAGE) variable. $(TARGET_STAGE)=ramstage if user selects CONFIG_HAVE_RAMSTAGE $(TARGET_STAGE)=postcar if user selects CONFIG_RAMPAYLOAD Change-Id: I0f7e4174619016c5a54c28bedd52699df417a5b7 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/33142 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/Kconfig | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'src/Kconfig') diff --git a/src/Kconfig b/src/Kconfig index 49f8e6ed92..5d74d671b2 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -129,6 +129,7 @@ config STATIC_OPTION_TABLE config COMPRESS_RAMSTAGE bool "Compress ramstage with LZMA" + depends on HAVE_RAMSTAGE # Default value set at the end of the file help Compress ramstage to save memory in the flash image. Note @@ -137,7 +138,7 @@ config COMPRESS_RAMSTAGE config COMPRESS_PRERAM_STAGES bool "Compress romstage and verstage with LZ4" - depends on !ARCH_X86 + depends on !ARCH_X86 && (HAVE_ROMSTAGE || HAVE_VERSTAGE) # Default value set at the end of the file help Compress romstage and (if it exists) verstage with LZ4 to save flash @@ -148,6 +149,7 @@ config COMPRESS_PRERAM_STAGES config COMPRESS_BOOTBLOCK bool + depends on HAVE_BOOTBLOCK help This option can be used to compress the bootblock with LZ4 and attach a small self-decompression stub to its front. This can drastically @@ -234,6 +236,7 @@ config NO_RELOCATABLE_RAMSTAGE config RELOCATABLE_RAMSTAGE bool + depends on HAVE_RAMSTAGE default !NO_RELOCATABLE_RAMSTAGE select RELOCATABLE_MODULES help @@ -1191,3 +1194,26 @@ config BOOTSPLASH_FILE config CBFS_SIZE default ROM_SIZE + +config HAVE_BOOTBLOCK + bool + default y + +config HAVE_VERSTAGE + bool + depends on VBOOT_SEPARATE_VERSTAGE + default y + +config HAVE_ROMSTAGE + bool + default y + +config HAVE_POSTCAR + bool + depends on POSTCAR_STAGE + default y + +config HAVE_RAMSTAGE + bool + default n if RAMPAYLOAD + default y -- cgit v1.2.3