Hi Julien, On Wed, 12 Oct 2022 at 05:38, Julien Masson <jmas...@baylibre.com> wrote: > > By default several types of splash locations are supported and the > user can select one of them through environment var (splashsource). > > However the devpart is still hardcoded and we cannot change it from > the environment. > > This patch add the support of "splashdevpart" which allow the user to > set the devpart though this environment variable. > > Example: image located in splashscreen partition (MMC as raw) > ``` > splashsource=mmc_raw > splashdevpart=0#splashscreen > ``` > > Signed-off-by: Julien Masson <jmas...@baylibre.com> > --- > common/splash_source.c | 5 +++++ > 1 file changed, 5 insertions(+)
Reviewed-by: Simon Glass <s...@chromium.org> > > diff --git a/common/splash_source.c b/common/splash_source.c > index b4bf6f1336..1f99f44f78 100644 > --- a/common/splash_source.c > +++ b/common/splash_source.c > @@ -451,6 +451,7 @@ int splash_source_load(struct splash_location *locations, > uint size) > { > struct splash_location *splash_location; > char *env_splashimage_value; > + char *env_splashdevpart_value; How about just 'devpar' as it is shorter and easier to read? > u32 bmp_load_addr; > > env_splashimage_value = env_get("splashimage"); > @@ -467,6 +468,10 @@ int splash_source_load(struct splash_location > *locations, uint size) > if (!splash_location) > return -EINVAL; > > + env_splashdevpart_value = env_get("splashdevpart"); > + if (env_splashdevpart_value) > + splash_location->devpart = env_splashdevpart_value; > + > if (splash_location->flags == SPLASH_STORAGE_RAW) > return splash_load_raw(splash_location, bmp_load_addr); > else if (splash_location->flags == SPLASH_STORAGE_FS) > -- > 2.37.3 > Regards, Simon