From: Melin Tomas Date: Wed, 6 Feb 2019 09:08:06 +0000 Subject: [U-Boot] [PATCH v2 1/2] splash: Use splashfile instead of location->name In-Reply-To: <1549380573-5065-2-git-send-email-mark.jonas@de.bosch.com> References: <1549380573-5065-1-git-send-email-mark.jonas@de.bosch.com> <1549380573-5065-2-git-send-email-mark.jonas@de.bosch.com> Message-ID: <5d81b766-e913-2002-ea3f-04b156060fb2@vaisala.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 2/5/19 5:29 PM, Mark Jonas wrote: > From: Leo Ruan > > > common/splash_source.c | 10 ++++++++-- > doc/README.splashprepare | 9 ++++++--- > 2 files changed, 14 insertions(+), 5 deletions(-) > > diff --git a/common/splash_source.c b/common/splash_source.c > index 62763b9..e1e73db 100644 > --- a/common/splash_source.c > +++ b/common/splash_source.c > @@ -303,6 +303,7 @@ static int splash_load_fit(struct splash_location *location, u32 bmp_load_addr) > { > int res; > int node_offset; > + const char *splash_file; > int splash_offset; > int splash_size; > struct image_header *img_header; > @@ -335,10 +336,15 @@ static int splash_load_fit(struct splash_location *location, u32 bmp_load_addr) > return -EINVAL; > } > > - node_offset = fit_image_get_node(fit_header, location->name); > + /* Get the splash image node */ > + splash_file = env_get("splashfile"); > + if (!splash_file) > + splash_file = SPLASH_SOURCE_DEFAULT_FILE_NAME; > + > + node_offset = fit_image_get_node(fit_header, splash_file); It looks like this will break boards relying on existing logic with location->name (3 boards upstream). Could fallback here instead be "location->name" as before, keeping compability with the current implementation? I.e. + if (!splash_file) + splash_file = location->name; BR, Tomas