From c6826b3c1f704b4df4233cf36e26a346fdee91dd Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 26 Mar 2018 15:55:37 +0200 Subject: [PATCH] image: fit: Show firmware configuration property if present 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 --- common/image-fit.c | 4 ++++ common/spl/spl_fit.c | 3 ++- include/image.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/common/image-fit.c b/common/image-fit.c index b785d8a36e6..0b0789dc6e6 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -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; diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index cc07fbc8a02..089f5916e6f 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -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); diff --git a/include/image.h b/include/image.h index a128a623e51..49d73382ac5 100644 --- a/include/image.h +++ b/include/image.h @@ -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 -- 2.47.3