View Single Post
Old 04-17-2010, 11:31 AM   #1
Xaphiosis
Connoisseur
Xaphiosis doesn't litterXaphiosis doesn't litterXaphiosis doesn't litter
 
Posts: 52
Karma: 216
Join Date: Apr 2010
Device: PRS-T1
Lightbulb Accessing the display via /dev/fb fails silently... [SOLVED]

I do hope someone might be able to help. I got the arm toolchain going from http://www.emdebian.org/tools/crossdev.html so I can kinda compile code to run on the reader.

Background:

So I went and wrote two hello programs, one in asm I found somewhere on the net, and the other in C (I just wrote the usual one). I also wrote an attempt at accessing the framebuffer device (/dev/fb) cobbled together from various places on the net. I then added their execution to porkupan/igorsk's firmware loader script (load_test.600.sh):
Code:
echo "ASM:" >> $W_LOG
/Data/test/hello/hello_asm 2>&1 >> $W_LOG
echo "C:" >> $W_LOG
/Data/test/hello/hello 2>&1 >> $W_LOG
echo "FB:" >> $W_LOG
/Data/test/hello/fb 2>&1 >> $W_LOG
Ok, so hello_asm and hello work fine:
Code:
ASM:
Hello from Asm!
C:
Hello from C!
Problem:

The execution of fb proceeds successfully, here's the output:
Code:
FB:
Attempting to access the framebuffer device
Screen mapped: 600 x 800, 8bpp
Type: 0, linelen: 600, smemlen: 480000
grey: 8, rotate: 0
Sleeping for 1 seconds.
Exiting.
However, nothing happens to the screen! I put the code into a loop which hammered /dev/fb continuously with all possible values, I made the script wait, nothing changed.

I'm attaching the code, but it's vanilla framebuffer access code via mmap, so I don't see why it isn't working, especially when no errors occur :(
Attached Files
File Type: zip hello.zip (10.4 KB, 185 views)

Last edited by Xaphiosis; 04-20-2010 at 03:50 PM. Reason: Solved.
Xaphiosis is offline   Reply With Quote