diff mbox

[U-Boot] splash: Introduce default_splash_locations

Message ID 1467402496-15043-1-git-send-email-abrodkin@synopsys.com
State Superseded
Delegated to: Anatolij Gustschin
Headers show

Commit Message

Alexey Brodkin July 1, 2016, 7:48 p.m. UTC
This change introduces default_splash_locations which
simplifies splash recovery from the first partition of
USB/MMC/SATA drive.

Given usual mapping of the first partition of external media for
basic boot stuff like uImage/zImaage, .dtb etc it looks quite
obvious option to put there splash.bmp as well.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Robert Winkler <robert.winkler@boundarydevices.com>
---
 common/splash.c | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

Comments

Anatolij Gustschin July 25, 2016, 9:04 p.m. UTC | #1
On Fri,  1 Jul 2016 22:48:16 +0300
Alexey Brodkin Alexey.Brodkin@synopsys.com wrote:

> This change introduces default_splash_locations which
> simplifies splash recovery from the first partition of
> USB/MMC/SATA drive.
> 
> Given usual mapping of the first partition of external media for
> basic boot stuff like uImage/zImaage, .dtb etc it looks quite
> obvious option to put there splash.bmp as well.
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Nikita Kiryanov <nikita@compulab.co.il>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
> Cc: Anatolij Gustschin <agust@denx.de>
> Cc: Robert Winkler <robert.winkler@boundarydevices.com>
> ---
>  common/splash.c | 30 +++++++++++++++++++++++++++++-
>  1 file changed, 29 insertions(+), 1 deletion(-)

applied to u-boot-video/master, thanks!

Anatolij
Anatolij Gustschin July 26, 2016, 6:55 a.m. UTC | #2
On Mon, 25 Jul 2016 23:04:34 +0200
Anatolij Gustschin agust@denx.de wrote:

> applied to u-boot-video/master, 

removed as it breaks building sandbox. Patch v2 is out now.

--
Anatolij
diff mbox

Patch

diff --git a/common/splash.c b/common/splash.c
index 561d35b..89af437 100644
--- a/common/splash.c
+++ b/common/splash.c
@@ -24,9 +24,37 @@ 
 #include <splash.h>
 #include <lcd.h>
 
+static struct splash_location default_splash_locations[] = {
+	{
+		.name = "sf",
+		.storage = SPLASH_STORAGE_SF,
+		.flags = SPLASH_STORAGE_RAW,
+		.offset = 0x0,
+	},
+	{
+		.name = "mmc_fs",
+		.storage = SPLASH_STORAGE_MMC,
+		.flags = SPLASH_STORAGE_FS,
+		.devpart = "0:1",
+	},
+	{
+		.name = "usb_fs",
+		.storage = SPLASH_STORAGE_USB,
+		.flags = SPLASH_STORAGE_FS,
+		.devpart = "0:1",
+	},
+	{
+		.name = "sata_fs",
+		.storage = SPLASH_STORAGE_SATA,
+		.flags = SPLASH_STORAGE_FS,
+		.devpart = "0:1",
+	},
+};
+
 __weak int splash_screen_prepare(void)
 {
-	return 0;
+	return splash_source_load(default_splash_locations,
+				  ARRAY_SIZE(default_splash_locations));
 }
 
 #ifdef CONFIG_SPLASH_SCREEN_ALIGN