diff options
| author | Tom Rini <[email protected]> | 2022-09-07 08:39:12 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2022-09-07 08:39:12 -0400 |
| commit | e3fce5e5604472a20fbce78ca12d07712f2dd86d (patch) | |
| tree | d905c39718e772214df0b163f3cf234db4bbda64 /boot | |
| parent | fc2f4085d33cf3e877695e24f63d009134382c48 (diff) | |
| parent | 857e313a3d44618e09fc64816fd5e561e2189ab7 (diff) | |
Merge tag 'fsl-qoriq-2022-9-7' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq
- Pali's patch not in my patchwork, got missed.
- Sean's patch pending for sometime, I just fix conflict when apply
Sean's patch, so pick up.
Diffstat (limited to 'boot')
| -rw-r--r-- | boot/image-fit.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/boot/image-fit.c b/boot/image-fit.c index 21dbd051184..f16eab9df35 100644 --- a/boot/image-fit.c +++ b/boot/image-fit.c @@ -1916,6 +1916,43 @@ int fit_conf_get_prop_node(const void *fit, int noffset, return fit_conf_get_prop_node_index(fit, noffset, prop_name, 0); } +static int fit_get_data_tail(const void *fit, int noffset, + const void **data, size_t *size) +{ + char *desc; + + if (noffset < 0) + return noffset; + + if (!fit_image_verify(fit, noffset)) + return -EINVAL; + + if (fit_image_get_data_and_size(fit, noffset, data, size)) + return -ENOENT; + + if (!fit_get_desc(fit, noffset, &desc)) + printf("%s\n", desc); + + return 0; +} + +int fit_get_data_node(const void *fit, const char *image_uname, + const void **data, size_t *size) +{ + int noffset = fit_image_get_node(fit, image_uname); + + return fit_get_data_tail(fit, noffset, data, size); +} + +int fit_get_data_conf_prop(const void *fit, const char *prop_name, + const void **data, size_t *size) +{ + int noffset = fit_conf_get_node(fit, NULL); + + noffset = fit_conf_get_prop_node(fit, noffset, prop_name); + return fit_get_data_tail(fit, noffset, data, size); +} + static int fit_image_select(const void *fit, int rd_noffset, int verify) { fit_image_print(fit, rd_noffset, " "); |
