分类: 嵌入式
2013-10-31 11:28:47
Linux Framebuffer is the lowest level (standardized) API for userspace programs to access video capabilities of the system you're running on. It allows you to directly "draw" your graphics in the video memory. Some higher level librairies can be put on top of the Framebuffer for more portability: SDL, Qt/Embedded, GTK, DirectFB, etc...
Note: Framebuffer is already configured (for Sharp LQ043 LCD on APF9328 and for Chimei LW700 on APF27/APF51) in standard/default Armadeus kernel image. APF28 has a boot option to choose the LCD. |
Instructions to configure Linux kernel were moved to Talk:FrameBuffer and are only given as references or if you want to change the default LCD.
$ make menuconfig
Package Selection for the target ... Graphic libraries and applications (graphic/text) ---> ... [*] fbgrab [*] fbtest [*] fbv ... ---> Graphic libraries and applications (graphic/text) ---> fbset/fbv/fbgrab
Note: As explain on LinuxInstall page, to compile fbtest, libnetpbm10-dev must be installed in your host system |
# fbgrab /tmp/snapshot.png
# fbv myimage.png
# echo 0 > /sys/class/graphics/fbcon/cursor_blink
also possible at boot time (with 3.x recent kernels):
BIOS> setenv extrabootargs vt.global_cursor_default=0
# echo 1 > /sys/class/graphics/fbcon/cursor_blink
# echo 1 > /sys/class/graphics/fb0/blank
# echo 0 > /sys/class/graphics/fb0/blank
# echo -e '\033[9;X]' > /dev/tty1 (from serial console)
or
# echo -e '\033[9;X]' (from framebuffer console)
or to set it at each boot, use /etc/inittab:
tty1::sysinit:echo -e '\033[9;X]'
# echo -e '\033[?17;0;0c' > /dev/tty1 (from serial console)
or
# echo -e '\033[?17;0;0c' (from framebuffer console)
# echo -e '\033[?5h' > /dev/tty1
# echo -e '\033[?5l' > /dev/tty1