image: fit: Show information about OS type in firwmare case too
authorMichal Simek <michal.simek@xilinx.com>
Mon, 26 Mar 2018 14:31:27 +0000 (16:31 +0200)
committerTom Rini <trini@konsulko.com>
Sat, 7 Apr 2018 00:45:44 +0000 (20:45 -0400)
SPL ATF implementation requires FIT image with partitions where the one
is Firmware/ATF and another one Firmware/U-Boot. OS field is used for
recording that difference that's why make sense to show values there for
Firmware types.

For example:
 Image 0 (atf)
  Description:  ATF bl31.bin
  Created:      Mon Mar 26 15:58:14 2018
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    51152 Bytes = 49.95 KiB = 0.05 MiB
  Architecture: ARM
  OS:           ARM Trusted Firmware
  Load Address: 0xfffe0000
  Hash algo:    md5
  Hash value:   36a4212bbb698126bf5a248f0f4b5336
 Image 1 (uboot)
  Description:  u-boot.bin
  Created:      Mon Mar 26 15:58:14 2018
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    761216 Bytes = 743.38 KiB = 0.73 MiB
  Architecture: ARM
  OS:           U-Boot
  Load Address: 0x08000000
  Hash algo:    md5
  Hash value:   f22960fe429be72296dc8dc59a47d566

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
common/image-fit.c

index 06b25fefc7da0e18cea05c22f7d0c6ac482c6816..030a3e579f5214fff809b15f398f1314e6153d8c 100644 (file)
@@ -419,7 +419,8 @@ void fit_image_print(const void *fit, int image_noffset, const char *p)
                printf("%s  Architecture: %s\n", p, genimg_get_arch_name(arch));
        }
 
-       if ((type == IH_TYPE_KERNEL) || (type == IH_TYPE_RAMDISK)) {
+       if ((type == IH_TYPE_KERNEL) || (type == IH_TYPE_RAMDISK) ||
+           (type == IH_TYPE_FIRMWARE)) {
                fit_image_get_os(fit, image_noffset, &os);
                printf("%s  OS:           %s\n", p, genimg_get_os_name(os));
        }