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.

TEST=Built Kevin.

Change-Id: I290d220d59077f46dc04351087bc79a7feae0b77
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/382631
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
1 file changed