cmd: ximg.c: Add support for getting external data address and length
authorTien Fong Chee <tien.fong.chee@intel.com>
Tue, 12 Feb 2019 12:49:30 +0000 (20:49 +0800)
committerTom Rini <trini@konsulko.com>
Mon, 22 Apr 2019 22:13:22 +0000 (18:13 -0400)
This function supports getting both data address and length for
existing FIT subimage and FIT external data.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
cmd/ximg.c

index 8572a67a0063e224bf5381dd66ddcc61b49836ce..32bfae8b22be6c1c5ee1c1d7d837c10c091280d8 100644 (file)
@@ -159,9 +159,9 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
                        }
                }
 
-               /* get subimage data address and length */
-               if (fit_image_get_data(fit_hdr, noffset,
-                                       &fit_data, &fit_len)) {
+               /* get subimage/external data address and length */
+               if (fit_image_get_data_and_size(fit_hdr, noffset,
+                                              &fit_data, &fit_len)) {
                        puts("Could not find script subimage data\n");
                        return 1;
                }