bundle_firmware: Coalesce BOOTBLOCK and COREBOOT sections for cbf
CL:371279 changed the FMAP source of truth from fmap.dts to
chromeos.fmd. It did an accurate job of translating one format into the
other, but unfortunately it didn't take into account that both FMAPs
aren't exactly the same.
chromeos.fmd splits a separate BOOTBLOCK section out of COREBOOT (which
is important for coreboot itself to correctly place the bootblock in the
image). fmap.dts and cros_bundle_firmware still rely on COREBOOT (which
it calls 'ro-boot' because cros_bundle_firmware likes everything to be
lowercase and different for no particular reason) to be a single,
all-encompassing section that is the only part it carries over from
coreboot.rom to image.bin, though. By having the bootblock in a separate
section, that part of our image ends up filled with zeroes by the time
cros_bundle_firmware is done with it.
While the proper solution would be to kill cros_bundle_firmware with
fire, we need something immediate to unbreak our build system until we
have more time for the real cleanup. This patch hacks up the
FMAP-to-fdtmap translator to coalesce sections called BOOTBLOCK and
COREBOOT into one if they immediately follow each other.
Signed-off-by: Julius Werner <firstname.lastname@example.org>
Tested-by: Patrick Georgi <email@example.com>
Reviewed-by: Aaron Durbin <firstname.lastname@example.org>
1 file changed