From a2bc2540c2d004b475b401ccf0b162c2452857bb Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Sat, 29 May 2021 08:10:49 +0200 Subject: Allow to build romstage sources inside the bootblock Having a separate romstage is only desirable: - with advanced setups like vboot or normal/fallback - boot medium is slow at startup (some ARM SOCs) - bootblock is limited in size (Intel APL 32K) When this is not the case there is no need for the extra complexity that romstage brings. Including the romstage sources inside the bootblock substantially reduces the total code footprint. Often the resulting code is 10-20k smaller. This is controlled via a Kconfig option. TESTED: works on qemu x86, arm and aarch64 with and without VBOOT. Change-Id: Id68390edc1ba228b121cca89b80c64a92553e284 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/55068 Reviewed-by: Julius Werner Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/security/vboot/Makefile.inc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/security/vboot/Makefile.inc') diff --git a/src/security/vboot/Makefile.inc b/src/security/vboot/Makefile.inc index f152444044..1b3568a1ec 100644 --- a/src/security/vboot/Makefile.inc +++ b/src/security/vboot/Makefile.inc @@ -43,7 +43,9 @@ $(1)-srcs += $$(VBOOT_LIB_$(1)) endef # vboot-for-stage $(eval $(call vboot-for-stage,bootblock)) +ifeq ($(CONFIG_SEPARATE_ROMSTAGE),y) $(eval $(call vboot-for-stage,romstage)) +endif $(eval $(call vboot-for-stage,ramstage)) $(eval $(call vboot-for-stage,postcar)) @@ -157,7 +159,11 @@ else # CONFIG_VBOOT_SEPARATE_VERSTAGE ifeq ($(CONFIG_VBOOT_STARTS_IN_BOOTBLOCK),y) postinclude-hooks += $$(eval bootblock-srcs += $$(verstage-srcs)) else +ifeq ($(CONFIG_SEPARATE_ROMSTAGE),y) postinclude-hooks += $$(eval romstage-srcs += $$(verstage-srcs)) +else +postinclude-hooks += $$(eval bootblock-srcs += $$(verstage-srcs)) +endif endif endif # CONFIG_VBOOT_SEPARATE_VERSTAGE -- cgit v1.2.3