diff --git a/boot/common_fit.c b/boot/common_fit.c index a2f9b8d83c3..fd434fe28e1 100644 --- a/boot/common_fit.c +++ b/boot/common_fit.c @@ -46,12 +46,12 @@ int fit_find_config_node(const void *fdt) return -EINVAL; } - dflt_conf_name = fdt_getprop(fdt, conf, "default", &len); + dflt_conf_name = fdt_getprop(fdt, conf, FIT_DEFAULT_PROP, &len); for (node = fdt_first_subnode(fdt, conf); node >= 0; node = fdt_next_subnode(fdt, node)) { - name = fdt_getprop(fdt, node, "description", &len); + name = fdt_getprop(fdt, node, FIT_DESC_PROP, &len); if (!name) { #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT printf("%s: Missing FDT description in DTB\n", diff --git a/boot/image-fit.c b/boot/image-fit.c index f47f37471c0..2d040e38d97 100644 --- a/boot/image-fit.c +++ b/boot/image-fit.c @@ -328,6 +328,17 @@ static void fit_conf_print(const void *fit, int noffset, const char *p) printf("%s\n", uname); } + for (fdt_index = 0; + uname = fdt_stringlist_get(fit, noffset, FIT_COMPAT_PROP, + fdt_index, NULL), uname; + fdt_index++) { + if (fdt_index == 0) + printf("%s Compatible: ", p); + else + printf("%s ", p); + printf("%s\n", uname); + } + uname = fdt_getprop(fit, noffset, FIT_FPGA_PROP, NULL); if (uname) printf("%s FPGA: %s\n", p, uname); @@ -1761,11 +1772,11 @@ int fit_conf_find_compat(const void *fit, const void *fdt) continue; /* If there's a compat property in the config node, use that. */ - if (fdt_getprop(fit, noffset, "compatible", NULL)) { + if (fdt_getprop(fit, noffset, FIT_COMPAT_PROP, NULL)) { fdt = fit; /* search in FIT image */ compat_noffset = noffset; /* search under config node */ } else { /* Otherwise extract it from the kernel FDT. */ - kfdt_name = fdt_getprop(fit, noffset, "fdt", &len); + kfdt_name = fdt_getprop(fit, noffset, FIT_FDT_PROP, &len); if (!kfdt_name) { debug("No fdt property found.\n"); continue; diff --git a/include/image.h b/include/image.h index d543c6cf254..8841dea06c9 100644 --- a/include/image.h +++ b/include/image.h @@ -1106,6 +1106,7 @@ int booti_setup(ulong image, ulong *relocated_addr, ulong *size, #define FIT_PHASE_PROP "phase" #define FIT_TFA_BL31_PROP "tfa-bl31" #define FIT_TEE_PROP "tee" +#define FIT_COMPAT_PROP "compatible" #define FIT_MAX_HASH_LEN HASH_MAX_DIGEST_SIZE diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c index e7e612a4688..3169c3a6dd1 100644 --- a/lib/rsa/rsa-verify.c +++ b/lib/rsa/rsa-verify.c @@ -448,7 +448,7 @@ static int rsa_verify_with_keynode(struct image_sign_info *info, return -EBADF; } - algo = fdt_getprop(blob, node, "algo", NULL); + algo = fdt_getprop(blob, node, FIT_ALGO_PROP, NULL); if (!algo) { debug("%s: Missing 'algo' property\n", __func__); return -EFAULT;