fit: remove an additional check for FIT images
authorIoana Ciornei <ioana.ciornei@nxp.com>
Thu, 15 Apr 2021 09:01:13 +0000 (12:01 +0300)
committerPriyanka Jain <priyanka.jain@nxp.com>
Tue, 20 Apr 2021 05:36:08 +0000 (11:06 +0530)
This is a partial revert of the following commit from upstream.
commit 79af75f7776f ("fit: Don't allow verification of images with @ nodes")

This workaround is needed because the fit image for the MC firmware
image uses a firmware@1 node which describes the MC image, setup which
is not accepted starting with the commit referenced.

The MC firmware images will also be changed but this commit is also
needed so that we can use this u-boot with older MC firmware images
which cannot be changed.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
common/image-fit.c

index 94501b1..445d5ad 100644 (file)
@@ -1371,19 +1371,10 @@ error:
  */
 int fit_image_verify(const void *fit, int image_noffset)
 {
-       const char *name = fit_get_name(fit, image_noffset, NULL);
        const void      *data;
        size_t          size;
        char            *err_msg = "";
 
-       if (strchr(name, '@')) {
-               /*
-                * We don't support this since libfdt considers names with the
-                * name root but different @ suffix to be equal
-                */
-               err_msg = "Node name contains @";
-               goto err;
-       }
        /* Get image data and data length */
        if (fit_image_get_data_and_size(fit, image_noffset, &data, &size)) {
                err_msg = "Can't get image data/size";