[U-Boot] [PATCH v2 1/2] splash: Use splashfile instead of location->name

Melin Tomas tomas.melin at vaisala.com
Wed Feb 6 09:08:06 UTC 2019


Hi,

On 2/5/19 5:29 PM, Mark Jonas wrote:
> From: Leo Ruan <tingquan.ruan at cn.bosch.com>
>
>
>   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



More information about the U-Boot mailing list