From: Julien Masson <jmasson@baylibre.com>
To: u-boot@lists.denx.de
Cc: Simon Glass <sjg@chromium.org>
Subject: [RESEND PATCH 2/2] splash: get devpart from environment variable
Date: Wed, 12 Oct 2022 13:38:54 +0200 [thread overview]
Message-ID: <877d15clv5.fsf@baylibre.com> (raw)
In-Reply-To: <87a661clvc.fsf@baylibre.com>
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>
---
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
next prev parent reply other threads:[~2022-10-12 11:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 11:38 [RESEND PATCH 0/2] splash: add more options/support Julien Masson
2022-10-12 11:38 ` [RESEND PATCH 1/2] splash: support raw image from MMC Julien Masson
2022-10-12 12:59 ` Simon Glass
2022-10-13 16:08 ` Julien Masson
2022-10-14 15:55 ` Simon Glass
2022-10-12 11:38 ` Julien Masson [this message]
2022-10-12 12:59 ` [RESEND PATCH 2/2] splash: get devpart from environment variable Simon Glass
2022-10-13 15:51 ` Julien Masson
2022-10-14 15:55 ` Simon Glass
2022-10-17 7:50 ` Julien Masson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877d15clv5.fsf@baylibre.com \
--to=jmasson@baylibre.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox