bundle_firmware: provide cbfshash blob type support

In order to defer to cbfstool to perform hash calculation
over a CBFS region support for a new blob type is needed:

Example of FDT ndoes asking for CBFS hash:
rw-b-boot {
        label = "fw-main-b";
        reg = <0x00700000 0x002dff80>;
        type = "blob cbfs/rw/b-boot";
rw-b-boothash {
        label = "fw-main-b-hash";
        reg = <0x009dff80 0x00000040>;
        type = "blob cbfshash/rw/b-boothash";
        cbfs-node = "cbfs/rw/b-boot";

The 'cbfs-node' property found within a node that contains a
blob type that starts with 'cbfshash' refers to both the name
of the node (strip cbfs/) as well as the blob that that node
exports. This allows the processing logic to wait for the
to-be-hashed node's data to be valid.

Once the node containing the CBFS region has created its blob
'cbfstool hashcbfs' is called to fill in the CBFS hash cacluated
over the region containing the CBFS.

TEST=chromeos-bootimage on glados with cbfshash regions. Booted.

Change-Id: Iccbe9e8e71aabb93cd62080aa59f0e20ef699d2e
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/319570
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
1 file changed