[RESEND PATCH 2/2] splash: get devpart from environment variable
Julien Masson
jmasson at baylibre.com
Thu Oct 13 17:51:13 CEST 2022
Hi Simon,
Thanks for the review.
On Thu 13 Oct 2022 at 17:44, Simon Glass <sjg at chromium.org> wrote:
> Hi Julien,
>
> On Wed, 12 Oct 2022 at 05:38, Julien Masson <jmasson at 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 <jmasson at baylibre.com>
>> ---
>> common/splash_source.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>
> Reviewed-by: Simon Glass <sjg at 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?
>
Yes I initially follow the same "syntax" of splashimage var but I agree
it can be shorter, what name would you prefer:
- char *devpart
- char *env_devpart
- char *env_devpart_value
?
>> 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
--
Julien Masson
More information about the U-Boot
mailing list