Boot: Add dependency check to multi-image boot

This patch adds the capability to check image dependencies in case
of multi-image boot. The dependencies are described with a new type
of TLV in the manifest.

Change-Id: I10ab77ca0b196a1fc9fe51050744f716fd39a574
Signed-off-by: David Vincze <david.vincze@arm.com>
diff --git a/bl2/ext/mcuboot/bootutil/src/image_validate.c b/bl2/ext/mcuboot/bootutil/src/image_validate.c
index 20a89ed..561d1d0 100644
--- a/bl2/ext/mcuboot/bootutil/src/image_validate.c
+++ b/bl2/ext/mcuboot/bootutil/src/image_validate.c
@@ -67,9 +67,9 @@
     /* Hash is computed over image header and image itself. */
     size = hdr->ih_img_size + hdr->ih_hdr_size;
 
-    /* If a security counter TLV is present then the TLV info header and the
-     * security counter are also protected and must be included in the hash
-     * calculation.
+    /* If a security counter TLV and/or a dependency TLV(s) are present then the
+     * TLV info header, the security counter TLV and/or the dependency TLV(s)
+     * are also protected and must be included in the hash calculation.
      */
     if (hdr->ih_protect_tlv_size != 0) {
         size += hdr->ih_protect_tlv_size;