The intended goal of this article is to provide the user with enough information so they can display an image onto a screen of their choosing. How to re-build frame buffer testing application.
Base knowledge
http://trac.gateworks.com/wiki/OpenEmbedded/Video_Out
Frame buffer test application
- rebuild fb-test-app
Command in git:
git init
git clone https://github.com/prpplague/fb-test-app.git
step 2: Change makefile
vi Makefile //open Makefile by vim editor :set nu //show line number
replace from line 6 to line 12 by folow code:
CC=arm-linux-gnueabi-gcc CFLAGS=-02 -Wall
Save change command
:wq
step 3: Rebuid
Type “make” command
step 4: Copy execute file to target system by filezilla or something like that
step 5: Remote target by root account, change mode of execute file (what copied from host)
su chmod +x fb-test
step 6: Test app
Check mode of fb
cat /sys/class/graphics/fb2/*cat /sys/class/graphics/fb2/modescat /sys/class/graphics/fb2/mode
//Set "mode value" from modes list to mode
echo "mode value" > /sys/class/graphics/fb2/mode
//unblank screen
echo 0>/sys/class/graphics/fb2/blank
//export
export DISPLAY=:2
//Run program
./fb-test -f 0 -r //fullfill fb0 by red colour
./fb-test -f 1 -b //fullfill fb1 by blue colour
step 7: Validation: copy frame buffer (raw pixel to view).
mkdir /home/thaidao/img cp /dev/fb0 /home/thaidao/img cp /dev/fb1 /home/thaidao/img
step 8: Copy raw pixel from target to host by filezilla or ..
step 9: Go to rawpixels.net to check pixel raw copied from target board.(Must be configure picture properties)
Thanks, this was helpful. :)
ReplyDelete