spl: fit: add fit config verify support

Do fit config verify if required.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I211f43c07d636ea8cff42cf9133bcab0aa86f8c6
This commit is contained in:
Joseph Chen 2020-03-08 15:09:20 +08:00 committed by Jianhong Chen
parent 3a183b396d
commit 583377c459
2 changed files with 18 additions and 0 deletions

View File

@ -395,6 +395,21 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
return -1;
}
/* verify the configure node by keys, if required */
#ifdef CONFIG_SPL_FIT_SIGNATURE
int conf_noffset;
conf_noffset = fit_conf_get_node(fit, NULL);
if (conf_noffset > 0) {
ret = fit_config_verify(fit, conf_noffset);
if (ret) {
printf("fit verify configure failed, ret=%d\n", ret);
return ret;
}
printf("\n");
}
#endif
/*
* Find the U-Boot image using the following search order:
* - start at 'firmware' (e.g. an ARM Trusted Firmware)

View File

@ -1049,6 +1049,9 @@ int fit_conf_get_node(const void *fit, const char *conf_uname);
int fit_conf_get_prop_node(const void *fit, int noffset,
const char *prop_name);
int fit_conf_get_prop_node_index(const void *fit, int noffset,
const char *prop_name, int index);
void fit_conf_print(const void *fit, int noffset, const char *p);
int fit_check_ramdisk(const void *fit, int os_noffset,