summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Masson <jmasson@baylibre.com>2022-10-17 11:33:22 +0300
committerAnatolij Gustschin <agust@denx.de>2022-10-30 22:01:40 +0300
commit7fcb30c0e023fcdce59eb28a824faac5d527d99d (patch)
treeef3eb2d4f118a1893f7cfa9f866d6454e46acffc
parenta638d9a47c8ebc36ded79726e48b46ededc64e59 (diff)
downloadu-boot-7fcb30c0e023fcdce59eb28a824faac5d527d99d.tar.xz
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>
-rw-r--r--common/splash_source.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/splash_source.c b/common/splash_source.c
index 68c9fa371b..a260137619 100644
--- a/common/splash_source.c
+++ b/common/splash_source.c
@@ -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)