[RFC] [JUST DEMO] commands: implement 'fbputs' command

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Mon Jan 26 00:55:40 PST 2015


> On Jan 26, 2015, at 4:14 PM, Sascha Hauer <s.hauer at pengutronix.de> wrote:
> 
> On Sun, Jan 25, 2015 at 05:21:30PM +0300, Antony Pavlov wrote:
>> Mainline barebox at the moment has no framebuffer
>> console support.
>> The 'fbputs' demo command displays a text string
>> on fb device.
>> 
>> This quick-n-dirty patch demonstates that barebox
>> framebuffer console can be easely realized.
>> 
>> I'm awaiting your comments!
> 
> Unfortunately real console support is not that simple, we would have to
> parse ANSI escape sequences up to some point to make it generally usable.
> 
> Jean Christophe has framebuffer console patches, he'll probably comment
> on this one aswell.
> Personally I would be fine with your simple approach until real console
> support arrives.


Yes I have the framebuffer console support and yes you do need to have the ANSI support
and it’s not that easy

I’m sick those days will take a look later this will when feel better
 
> 
>> +static void drawchar(struct screen *sc, int x, int y, char c)
>> +{
>> +	void *buf;
>> +
>> +	buf = gui_screen_redering_buffer(sc);
>> +
>> +	rgba_blend(&sc->info, chars[(int)c],
>> +		buf, VIDEO_FONT_HEIGHT, VIDEO_FONT_WIDTH,
>> +		VIDEO_FONT_WIDTH * x, VIDEO_FONT_HEIGHT * y, 1);
> 
> Is this performant enough? I would assume the whole character set should
> be prerendered for the actual framebuffer format before printing a
> string.

no so much way too slow

Best Regards,
J.
> 
> Sascha
> 
> 
> -- 
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




More information about the barebox mailing list