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 <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55068
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Arthur Heymans
2021-05-29 08:10:49 +02:00
committed by Felix Held
parent 4ce52f622e
commit a2bc2540c2
46 changed files with 118 additions and 66 deletions

View File

@@ -243,6 +243,14 @@ config COMPRESS_BOOTBLOCK
user-selectable. (There's no real point in offering this to the user
anyway... if it works and saves boot time, you would always want it.)
config SEPARATE_ROMSTAGE
bool "Build a separate romstage"
default y
help
Build a separate romstage that is loaded by bootblock. With this
option disabled the romstage sources are linked inside the bootblock
as a single stage.
config INCLUDE_CONFIG_FILE
bool "Include the coreboot .config file into the ROM image"
# Default value set at the end of the file
@@ -1523,6 +1531,7 @@ config HAVE_VERSTAGE
config HAVE_ROMSTAGE
bool
depends on SEPARATE_ROMSTAGE
default y
config HAVE_RAMSTAGE