Displaying an image on ARM 9 board

2020-07-17 06:05发布

问题:

I need to display images on an embedded system. The board configuration is as follows:

It is AT91sam9263-EK, with Linux 2.6.20 kernel running on it. Are there any image processing libraries for this board.The processor is ARM926EJ-S.

thank you all

回答1:

If the framebuffer isn't activated in the Linux OS you got I know that it is in the Linux OS provided by Linux4Sam. You can always try if it is activated by issuing the command cat /bin/sh > /dev/fb0; a random pattern should appear on the screen (note that it might be necessary to activate the backlight - if it is turned off you might not see anything at all). You might have to kill the graphical environment that is running on target first.

If all you want to do is to display an image it is possible to do that by opening the framebuffer (/dev/fb0) and write to it (or just cat it); but you have to have an image in the correct format. If I remember correctly the framebuffer in the evaluation board is a RGB555 (i.e. 5 bits for red, 5 bits for green and 5 bits for blue).

If you want to use a GUI library you have to use one that has a framebuffer backend. On a standard Linux system a GUI library assumes that you have X installed but some of them also have framebuffer backends. Qt for instance can be compiled in such a way (but I think you have to modify it to provide the correct color information; it only supports RGB565 out of the box). DirectFB is a simpler solution that provides basic graphic support (but it has support for FreeType giving you good font support). See the links provided above for other examples.



回答2:

First of all, you need to configure framebuffer (fbdev) running on your board. It will act as a layer between your hardware and your GUI app. Here you will find a lot of info about it.

After you are done there is a bunch of libraries/frameworks out there. Few of the most populars are SVGAlib and SDL (requires X).

As usually with cross-platform sources, you will need to recompile those libraries using the toolchain for your board.

UPDATE:

Few more links for you from SO: here, and here.