]> git.sur5r.net Git - u-boot/commitdiff
image: fit: Show firmware configuration property if present
authorMichal Simek <michal.simek@xilinx.com>
Mon, 26 Mar 2018 14:31:26 +0000 (16:31 +0200)
committerTom Rini <trini@konsulko.com>
Sat, 7 Apr 2018 00:45:44 +0000 (20:45 -0400)
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>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
common/image-fit.c
common/spl/spl_fit.c
include/image.h

index 4b0339045421c062ab0976b68eba60145e28ee20..06b25fefc7da0e18cea05c22f7d0c6ac482c6816 100644 (file)
@@ -1610,6 +1610,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 be92ca4b4fd0f0ce04a6e360429d04e420f2c230..9f03e2648a31bb1d51077b48d395cc8c77734952 100644 (file)
@@ -395,7 +395,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 a6f82aebfee024366e3ea11c90d7ed9c8d6c0893..a579c5f509f1243e3775f5c433aac09f5e1e25ef 100644 (file)
@@ -920,6 +920,7 @@ int booti_setup(ulong image, ulong *relocated_addr, ulong *size);
 #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