[U-Boot] [PATCH] Add splash screen support via loading from flash

Robert Winkler robert.winkler at boundarydevices.com
Mon Jun 3 18:34:39 CEST 2013


Hello Stefano

On Mon, Jun 3, 2013 at 12:44 AM, Stefano Babic <sbabic at denx.de> wrote:
> Hi Robert,
>
>
> On 30/05/2013 23:03, Robert Winkler wrote:
>> Signed-off-by: Robert Winkler <robert.winkler at 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);
>> +}
>> +
>
>
> Which is the advantage instead of using the "preboot" variable setting
> CONFIG_PREBOOT ? It does pretty the same and you can move the whole
> script outside of board code.

The preboot command is run too late.  It looks like it is run in
main_loop but U-Boot looks for the splash image
at the address in the splashimage variable in board_init_r ->
stdio_init -> drv_lcd_init or drv_video_init (depending on
whether you have CONFIG_LCD or CONFIG_VIDEO).

I have a patch ready that will fix the underlying problem with
CONFIG_SPLASH_SCREEN_PREPARE not working
for CONFIG_VIDEO so the nitrogen specific code (in a separate patch of
course) will change to use the provided callback instead of just
calling it in our own board_video_skip, but other than that it'll be
the same as the patch I already submitted.


>
> Best regards,
> Stefano Babic
>
>
> --
> =====================================================================
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
> =====================================================================

Thanks,

Robert Winkler


More information about the U-Boot mailing list