Stefano On Tue, Jun 4, 2013 at 7:30 AM, Eric Nelson <[email protected]> wrote: > Hi Stefano, > > > On 06/04/2013 07:15 AM, Stefano Babic wrote: >> >> Hi Eric, >> >> On 04/06/2013 15:55, Eric Nelson wrote: >>> >>> Hi Stefano, >>> >>> On 06/04/2013 06:44 AM, Stefano Babic wrote: >>>> >>>> Hi Robert, >>>> >>>> On 03/06/2013 18:34, Robert Winkler wrote: >>>> >>>>>> 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). >>>> >>>> >>>> You are describing a bug - then it should be fixed globally, not only >>>> for this board. >>>> >>> >>> What's the bug? >>> - preboot being called too late, or >> >> >> preboot is not called too late. The behavior is correct and wanted, as >> the name says, and the variable is evaluated during the main loop before >> booting. My suggestion comes because it is possible to implement a >> splashscreen (even if the name can be misleading..), setting preboot to >> something like "nand read <address> <offset>;bmp display <address>". >> In your case (with a bmp image), it could be: >> "preboot=if sf probe ; then " \ >> "sf read ${splashimage} c2000 ${splashsize} ; bmp display >> ${splashimage}; fi\0" >> >> The behavior is exactly as the subject in the patch, the delay is from >> power-on until main loop is called. It can be on some boards acceptable, >> sometimes not. >> > > Gotcha. This method doesn't involve splash_screen_prepare() though. > > It also will blink the display since the splash screen will paint > after the the compiled-in logo case. > > http://git.denx.de/u-boot.git/?p=u-boot.git;a=blob;f=common/lcd.c#l1085 > > >>> - splash_screen_prepare() being called too early >>> >>> It seems that having splash_screen_prepare() called early >>> makes sense, because stdout could be set to include VGA >>> and having access to stdout is very useful in preboot >>> commands. >> >> >> You mention that it does not work, and then I assume that it is a bug, >> because an image should be displayed. But again, if it does not work, >> the issue is related to the video subsystem and should be fixed there >> and not in board code - this is my point. >> Yes, as Eric mentioned I submitted a patch yesterday which fixes splash screen prepare not working with CONFIG_VIDEO and will submit a separate patch to add the function to nitrogen6x.c once that goes through.
The only difference is that we won't call it in board_video_skip in nitrogen6x.c, it'll be called in drv_video_init similar to the way it is called in lcd_logo from drv_lcd_init. Another thing that Eric pointed out that is a difference between PREBOOT and SPLASH_SCREEN_PREPARE is the former will always run but the latter will only run if there's a display which is preferable. If I had submitted the fix first instead of just working around the bug I would probably have saved some confusion. Sorry about that. > > This works with Robert's latest patch, which implements > splash_screen_prepare() for boards that use cfb_console. > > It just wasn't implemented there. > > Regards, > > > Eric > _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

