bundle_firmware: Allow manipulating CBFS more freely

Allow adding a "cbfs-files" sub-node to cbfs-style
rw-[ab]-boot regions in depthcharge's fmap.dts, containing
properties denoting each file that should be modified in CBFS.

The format is

cbfs-files {
  property-name = "add* -n CBFS-name cbfstool-options"
}

The order of the first three arguments (add* -n name) is required.
If the file already exists in CBFS, it is deleted first.
The property name isn't used for anything and can be chosen arbitrarily
but should be unique. The obvious use as CBFS file name (which should
also be unique) isn't possible because we need / to work in file names.

The passed string can be understood as a full version of a command
line starting with
  $ cbfstool coreboot.rom add{,-stage,...} -n ...
(and also selects the right CBFS to work on)

BUG=chromium:445938
TEST=add a cbfs-files node as described, see bundle_firmware add the
file (or fail it that isn't successful)
CQ-DEPEND=CL:312210

Change-Id: I33159012ecd0132c3e8f6ea9da9489fb7859a230
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/308091
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
1 file changed