]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
image: fit: Show firmware configuration property if present
authorMichal Simek <michal.simek@xilinx.com>
Mon, 26 Mar 2018 13:55:37 +0000 (15:55 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 23 Apr 2018 06:57:39 +0000 (08:57 +0200)
SPL ATF support requires to have firmware property which should be also
listed by mkimage -l when images is created.

The patch is also using this macro in spl_fit to match keyword.

When image is created:
 Default Configuration: 'config'
 Configuration 0 (config)
  Description:  ATF with full u-boot
  Kernel:       unavailable
  Firmware:     atf
  FDT:          dtb

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
common/image-fit.c
common/spl/spl_fit.c
include/image.h

index b785d8a36e6a0483f1cbdf30f73a3fec82d12b01..0b0789dc6e60ed8483e3f4c3c7f9022f01793d3d 100644 (file)
@@ -1598,6 +1598,10 @@ void fit_conf_print(const void *fit, int noffset, const char *p)
        if (uname)
                printf("%s  Init Ramdisk: %s\n", p, uname);
 
+       uname = fdt_getprop(fit, noffset, FIT_FIRMWARE_PROP, NULL);
+       if (uname)
+               printf("%s  Firmware:     %s\n", p, uname);
+
        for (fdt_index = 0;
             uname = fdt_stringlist_get(fit, noffset, FIT_FDT_PROP,
                                        fdt_index, NULL), uname;
index cc07fbc8a02adc332fd4a7b45b574aa0f74b17ad..089f5916e6f16975770c36992a2dfdc10214b7e0 100644 (file)
@@ -383,7 +383,8 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
         *   - fall back to using the first 'loadables' entry
         */
        if (node < 0)
-               node = spl_fit_get_image_node(fit, images, "firmware", 0);
+               node = spl_fit_get_image_node(fit, images, FIT_FIRMWARE_PROP,
+                                             0);
 #ifdef CONFIG_SPL_OS_BOOT
        if (node < 0)
                node = spl_fit_get_image_node(fit, images, FIT_KERNEL_PROP, 0);
index a128a623e51bc0c0a229385804042e1248c20abb..49d73382ac5b1dbf3fc584a8fb54f4564426a380 100644 (file)
@@ -907,6 +907,7 @@ int bootz_setup(ulong image, ulong *start, ulong *end);
 #define FIT_DEFAULT_PROP       "default"
 #define FIT_SETUP_PROP         "setup"
 #define FIT_FPGA_PROP          "fpga"
+#define FIT_FIRMWARE_PROP      "firmware"
 
 #define FIT_MAX_HASH_LEN       HASH_MAX_DIGEST_SIZE