Initialize framebuffer in bootloader?

2 messages, 2 authors, 2008-08-25 · open the first message on its own page

Initialize framebuffer in bootloader?

From: Nikita V. Youshchenko <hidden>
Date: 2008-08-24 16:40:34

Hello

In an embedded system I'm involved in, there is a requirement to get some 
graphical information displayed very fast (about a second) after poweron, 
and then keep the picture on screen without blinking etc.

Since it is virtually impossible to boot the kernel and start the 
application that fast, we are thinking about initializing display hardware 
and drawing the picture in bootloader.

There is no major problems in adding required code to U-Boot. What looks 
more difficult s how to smoothly pass display hardware control to linux 
framebuffer driver, such that "nobody will notice". Since main memory is 
used for some hardware-accessed data structures and the frame buffer 
itself, such a trick will likely require some altering of linux memory 
management, etc

Before trying to implement all that, I'd like to ask if anyone has done 
something similar, or maybe could provide some comments or pointers to any 
related information.

Thanks.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Re: Initialize framebuffer in bootloader?

From: Anatolij Gustschin <agust@denx.de>
Date: 2008-08-25 08:55:21

Hello,

Nikita V. Youshchenko wrote:
In an embedded system I'm involved in, there is a requirement to get some 
graphical information displayed very fast (about a second) after poweron, 
and then keep the picture on screen without blinking etc.

Since it is virtually impossible to boot the kernel and start the 
application that fast, we are thinking about initializing display hardware 
and drawing the picture in bootloader.
We do the same in U-Boot on a couple of embedded boards.
There is no major problems in adding required code to U-Boot. What looks 
more difficult s how to smoothly pass display hardware control to linux 
framebuffer driver, such that "nobody will notice". Since main memory is 
used for some hardware-accessed data structures and the frame buffer 
itself, such a trick will likely require some altering of linux memory 
management, etc

Before trying to implement all that, I'd like to ask if anyone has done 
something similar, or maybe could provide some comments or pointers to any 
related information.
What we do in Linux to inherit the state set by the boot loader is
maybe not very similar as we don't have shared frame buffer. We
prevent graphics hardware reinitialization in the frame buffer
driver if a pre_init flag of the driver's parameters structure was
set before graphics controller init:

#if defined(CONFIG_FB_PRE_INIT_FB)
	par->pre_init = 1;
#endif
	...
	if (!par->pre_init) {
		/* do all the hw init */
	}

Additionally we return in driver's set_par() without accessing any
registers if the pre_init flag was previously set and also use
following patch for VT and fbcon code:

http://git.denx.de/?p=linux-2.6-denx.git;a=commitdiff;h=ff84b47bb7ba0dfe99696ed5f7eee7a98174de9a;hp=25cb836dadabf8605cd83f9288493f9088d83c0f

Best Regards,
Anatolij

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help