public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Add splash screen support via loading from flash
@ 2013-05-30 21:03 Robert Winkler
  2013-05-30 23:32 ` Wolfgang Denk
  2013-06-03  7:44 ` Stefano Babic
  0 siblings, 2 replies; 14+ messages in thread
From: Robert Winkler @ 2013-05-30 21:03 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com>
---
 board/boundary/nitrogen6x/nitrogen6x.c | 22 ++++++++++++++++++++++
 include/configs/nitrogen6x.h           | 11 ++++++++++-
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 3b228cf..648b877 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -401,6 +401,24 @@ int board_eth_init(bd_t *bis)
 	return 0;
 }
 
+
+void splash_screen_prepare(void)
+{
+	char *env_loadsplash;
+
+	if (!getenv("splashimage") || !getenv("splashsize"))
+		return;
+
+	env_loadsplash = getenv("loadsplash");
+	if (!env_loadsplash) {
+		printf("Environment variable loadsplash not found!\n");
+		return;
+	}
+
+	if (run_command_list(env_loadsplash, -1, 0))
+		printf("failed to run loadsplash %s\n\n", env_loadsplash);
+}
+
 static void setup_buttons(void)
 {
 	imx_iomux_v3_setup_multiple_pads(button_pads,
@@ -661,6 +679,10 @@ int board_video_skip(void)
 		printf("unsupported panel %s\n", panel);
 		ret = -EINVAL;
 	}
+
+	if (!ret)
+		splash_screen_prepare();
+
 	return (0 != ret);
 }
 
diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index 2c904d3..011666f 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -38,7 +38,7 @@
 #define CONFIG_REVISION_TAG
 
 /* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(10 * 1024 * 1024)
+#define CONFIG_SYS_MALLOC_LEN		(12 * 1024 * 1024)
 
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_MISC_INIT_R
@@ -151,6 +151,13 @@
 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_SPLASH_SCREEN
+#define CONFIG_SPLASH_SCREEN_ALIGN
+
+ #define CONFIG_VIDEO_BMP_GZIP
+#ifdef CONFIG_VIDEO_BMP_GZIP
+#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (6 * 1024 * 1024)
+#endif
+
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_IPUV3_CLK 260000000
@@ -211,5 +218,7 @@
 		"echo details at http://boundarydevices.com/6q_bootscript ; " \
 		"setenv stdout serial\0" \
+	"loadsplash=if sf probe ; then " \
+		"sf read ${splashimage} c2000 ${splashsize} ; fi\0" \
 	"upgradeu=for dtype in " CONFIG_DRIVE_TYPES \
 		"; do " \
 		"for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
-- 
1.8.2.3

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-06-04 15:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-30 21:03 [U-Boot] [PATCH] Add splash screen support via loading from flash Robert Winkler
2013-05-30 23:32 ` Wolfgang Denk
2013-05-31  0:01   ` Robert Winkler
2013-05-31  7:49     ` Wolfgang Denk
2013-05-31 17:50       ` Robert Winkler
2013-06-03  7:44 ` Stefano Babic
2013-06-03 16:34   ` Robert Winkler
2013-06-04 13:44     ` Stefano Babic
2013-06-04 13:55       ` Eric Nelson
2013-06-04 14:15         ` Stefano Babic
2013-06-04 14:30           ` Eric Nelson
2013-06-04 14:57             ` Robert Winkler
2013-06-04 15:08               ` Stefano Babic
2013-06-04 15:05             ` Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox