mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 07:31:15 +00:00
splash: get devpart from environment variable
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@baylibre.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
a638d9a47c
commit
7fcb30c0e0
1 changed files with 5 additions and 0 deletions
|
@ -448,6 +448,7 @@ int splash_source_load(struct splash_location *locations, uint size)
|
|||
{
|
||||
struct splash_location *splash_location;
|
||||
char *env_splashimage_value;
|
||||
char *devpart;
|
||||
u32 bmp_load_addr;
|
||||
|
||||
env_splashimage_value = env_get("splashimage");
|
||||
|
@ -464,6 +465,10 @@ int splash_source_load(struct splash_location *locations, uint size)
|
|||
if (!splash_location)
|
||||
return -EINVAL;
|
||||
|
||||
devpart = env_get("splashdevpart");
|
||||
if (devpart)
|
||||
splash_location->devpart = devpart;
|
||||
|
||||
if (splash_location->flags == SPLASH_STORAGE_RAW)
|
||||
return splash_load_raw(splash_location, bmp_load_addr);
|
||||
else if (splash_location->flags == SPLASH_STORAGE_FS)
|
||||
|
|
Loading…
Reference in a new issue