diff options
author | Robert Winkler <robert.winkler@boundarydevices.com> | 2013-05-29 13:55:35 -0700 |
---|---|---|
committer | Robert Winkler <robert.winkler@boundarydevices.com> | 2013-06-17 13:46:36 -0700 |
commit | bc55e15ecbbdccbbb42db14df96a7d7b87cfbff6 (patch) | |
tree | cd48bd0cdeb2dd366629b1621aea467281a13d0a | |
parent | 87a9d4d58ae52097d472b4f6afb455ff19ea821c (diff) |
Add splash screen support via loading from flash
Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com>
Conflicts:
board/boundary/nitrogen6x/nitrogen6x.c
include/configs/nitrogen6x.h
-rw-r--r-- | board/boundary/nitrogen6x/nitrogen6x.c | 26 | ||||
-rw-r--r-- | include/configs/nitrogen6x.h | 10 |
2 files changed, 35 insertions, 1 deletions
diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 9ffaa5ecac..e049244726 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -400,6 +400,28 @@ 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 == NULL) { + 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); + } + + return; +} + static void setup_buttons(void) { imx_iomux_v3_setup_multiple_pads(button_pads, @@ -660,6 +682,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 2c904d378d..26c7c3ea47 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,6 +218,7 @@ "echo details at http://boundarydevices.com/6q_bootscript ; " \ "usb start; " \ "setenv stdin serial,usbkbd\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} ;" \ |