[RESEND PATCH 2/2] splash: get devpart from environment variable
Julien Masson
jmasson at baylibre.com
Wed Oct 12 13:38:54 CEST 2022
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(+)
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;
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
More information about the U-Boot
mailing list