![]() |
#1 |
fbdev
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 107
Karma: 70177
Join Date: Jul 2011
Device: kindle
|
kindle directfb tutorial
0) set up scratchbox (http://scratchbox.org/) cs2007q3-glibc2.5-arm6 compiler.
1) ssh into your kindle. (requires usbnetwork) 2) tar the libraries on your kindle. # cd /mnt/us # tar cf libs.tar /usr/lib 3) scp the /mnt/usr/libs.tar into scratchbox. 4) extract the libraries into scratchbox. # cd / # tar xf libs.tar 5) download the attached file and extract it into scratchbox. 6) compile main.c in scratchbox. # gcc main.c -Iusr/include -Iusr/include/directfb -ldirectfb -lfreetype 7) scp a.out onto your kindle. 8) ssh into your kindle and run a.out. tested on a kindle 3g (v3.1). ==fortune cookie== confuscious say: good programmer have bad vision. only see what right in front him. |
![]() |
![]() |
![]() |
#2 |
fbdev
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 107
Karma: 70177
Join Date: Jul 2011
Device: kindle
|
archive
archive
|
![]() |
![]() |
![]() |
#3 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 43
Karma: 1658
Join Date: Jul 2011
Device: b006
|
thankyou. this is exactly what I was looking for.
|
![]() |
![]() |
![]() |
#4 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79
Karma: 2718
Join Date: Aug 2011
Device: Kindle 3G
|
You so clevvvvver.
Tanksyou. |
![]() |
![]() |
![]() |
#5 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 121
Karma: 82565
Join Date: Aug 2010
Location: Maryland, USA
Device: dxg, k3w,k4nt,kpw
|
|
![]() |
![]() |
![]() |
#6 |
Connoisseur
![]() Posts: 50
Karma: 70
Join Date: Nov 2010
Device: Kindle DXG / Kindle 3
|
I cannot find directfb on DXG...
|
![]() |
![]() |
![]() |
#7 |
Enthusiast
![]() Posts: 25
Karma: 10
Join Date: Aug 2012
Device: Kindle Touch 3G + Ads
|
I know this thread is very old but I'm curious how fast/good can directfb runs on kindle touch 5.1.2. I got the following error message. Any idea?
[root@kindle development]# ./a.out ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.2.9 |~~~~~~~~~~~~~~~~~~~~~~~~~~ (c) 2001-2008 The world wide DirectFB Open Source Community (c) 2000-2004 Convergence (integrated media) GmbH ---------------------------------------------------------------- (*) DirectFB/Core: Single Application Core. (2014-06-01 08:26) (!) DirectFB/core/system: No system found! (!) [ 4990: 0.000] --> Caught signal 11 (at 0x10, invalid address) <-- Aborted |
![]() |
![]() |
![]() |
#8 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
When/where/with what did you compile it? (which compiler, compiler command line, linker command line, etc) When/where/with what did you try to run it? Sorry, we can't see over your shoulder from here. |
|
![]() |
![]() |
![]() |
#9 |
Enthusiast
![]() Posts: 25
Karma: 10
Join Date: Aug 2012
Device: Kindle Touch 3G + Ads
|
Thanks for responding. What's -ePEBCAK btw?
Just did it. scratchbox-toolchain-cs2007q3-glibc2.5-arm6. just compile directfb in scratch box and link it with the tutorial attached in here with all the default settting. no magic. scp the executable to kindle touch and run it. |
![]() |
![]() |
![]() |
#10 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
-e http://en.wiktionary.org/wiki/PEBCAK Hmm... Your detailed explanation: "Just did it" My detailed answer: "You broke it" - - - - Come on now - give us a chance to help - Copy the list of actions in the first post, and then edit in your version of each. Mention what you skipped and/or added. (Note: having the default binary name of a.out is not expected in a working, real-life, example.) |
|
![]() |
![]() |
![]() |
#11 |
Enthusiast
![]() Posts: 25
Karma: 10
Join Date: Aug 2012
Device: Kindle Touch 3G + Ads
|
ok .. obviously there is no free lunch. code does not work out of the box.
need to compile the libraries as so and copy everything .. including the directfb-1.2.9 directory to my kindle touch. basically the whole /usr/local/lib directory to kindle. then add the following code into the tutorial code: DirectFBSetOption("module-dir", "./directfb-1.2-9"); // depending on where you copy the files to. unfortunately still not much luck ... the last repaint command gives exception. [root@kindle development]# a.out ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.2.9 |~~~~~~~~~~~~~~~~~~~~~~~~~~ (c) 2001-2008 The world wide DirectFB Open Source Community (c) 2000-2004 Convergence (integrated media) GmbH ---------------------------------------------------------------- (*) DirectFB/Core: Single Application Core. (2014-06-02 09:32) (*) Direct/Thread: Started 'Linux Input' (18375) [INPUT OTHER/OTHER 0/0] <8388608>... (*) DirectFB/Input: WM8962 Beep Generator (1) 0.1 (directfb.org) (*) Direct/Thread: Started 'Linux Input' (18376) [INPUT OTHER/OTHER 0/0] <8388608>... (*) DirectFB/Input: imx-yoshi Headset (2) 0.1 (directfb.org) (*) Direct/Thread: Started 'Linux Input' (18377) [INPUT OTHER/OTHER 0/0] <8388608>... (*) DirectFB/Input: whitney-button (3) 0.1 (directfb.org) (*) Direct/Thread: Started 'Linux Input' (18378) [INPUT OTHER/OTHER 0/0] <8388608>... (*) DirectFB/Input: zforce (4) 0.1 (directfb.org) (!) DirectFB/Keyboard: Could not open() /dev/tty0! --> No such file or directory (!) Direct/Modules: Unable to dlopen `./directfb-1.2-9/gfxdrivers/libdirectfb_davinci.so'! --> libdavinci_c64x.so.0: cannot open shared object file: No such file or directory (*) DirectFB/Graphics: Generic Software Rasterizer 0.6 (directfb.org) (*) DirectFB/Core/WM: Default 0.3 (directfb.org) (*) FBDev/Surface: Allocated 600x800 8 bit LUT8 buffer (index 0) at offset 0 and pitch 608. (*) Direct/Interface: Loaded 'FT2' implementation of 'IDirectFBFont'. (!) [18374: 0.000] --> Caught signal 11 (at 0xffffffff, invalid address) <-- (!!!) *** WARNING [still objects in 'Layer Region Pool'] *** [object.c:241 in fusion_object_pool_destroy()] (!!!) *** WARNING [still objects in 'Layer Context Pool'] *** [object.c:241 in fusion_object_pool_destroy()] (!!!) *** WARNING [still objects in 'Surface Pool'] *** [object.c:241 in fusion_object_pool_destroy()] Aborted [root@kindle development]# |
![]() |
![]() |
![]() |
#12 |
Enthusiast
![]() Posts: 25
Karma: 10
Join Date: Aug 2012
Device: Kindle Touch 3G + Ads
|
instead of using this tutorial ... I tried this simple tutorial ...
http://directfb.org/docs/DirectFB_Tutorials/simple.html it works flawlessly on my kindle touch! guess i will not be using this code anymore. |
![]() |
![]() |
![]() |
#13 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
|
![]() |
![]() |
![]() |
#14 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
meh. dunno what you are trying to do.
but this can totally work. Will dig some stuff up. CAVEAT: The attached thing IS NOT A FULLY POLISHED APP FOR THE k3. The menu wont work - you wont be able to exit easily blah blah blah.... it's just a POC for this person.... feel free to fix it and make it perfect. Code:
[root@kindle root]# ls /var/tmp/root/.directfbrc (nothing) [root@kindle root]# finder directfbrc ( you don't have "finder" btw) /etc/directfbrc [root@kindle root]# cat /etc/directfbrc no-vt linux-input-devices=/dev/input/event0,/dev/input/event1 [root@kindle root]# cp /etc/directfbrc /var/tmp/root/.directfbrc however I fixed this only this morning (somehow) will make a post on it briefly before I collapse. EDIT: Ah.. make this... Code:
system = fbdev fbdev = /dev/fb0 mode = 600x800 scaled = 600x800 depth = 8 pixelformat = LUT8 no-cursor # Disable Cursor no-init-layer = 0 # Disable Layer Initialization no-vt # Disable vt no-vt-switch # Don't allow vt switching (redundant?) but meh . smooth-upscale # Scaling smooth-downscale window-surface-policy = systemonly # Window surface swapping policy: desktop-buffer-mode = backsystem # Desktop buffer mode: linux-input-devices=/dev/input/event0,/dev/input/event1 also you will need a: Code:
echo 1 > /proc/eink_fb/update_display Code:
gboolean refresh_screen (gpointer data) { system("echo 1 > /proc/eink_fb/update_display"); /* Return true so the function will be called again; returning false removes * this timeout function. */ return TRUE; } // and then... in the "main" loop add a: /* Add a timeout to update the screen every 750 milliseconds or so */ gint func_ref = g_timeout_add (750, refresh_screen, vbox); That should work for all simple gtk apps. I simply compiled it with the 2007q3 arm softfloat toolchain. I REPEAT: CAVEAT: The attached thing IS NOT A FULLY POLISHED APP FOR THE k3. The menu wont work - you wont be able to exit easily blah blah blah.... it's just a POC for this person.... feel free to fix it and make it perfect. Last edited by twobob; 06-10-2014 at 10:06 PM. |
![]() |
![]() |
![]() |
#15 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
*A wild twobob appears!*
*It's very effective!* |
![]() |
![]() |
![]() |
Tags |
directfb, eink, freetype, kindle, programming |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting SDL to work on DirectFB | B_Lizzard | Kindle Developer's Corner | 13 | 10-01-2012 12:42 PM |
directfb | fbdev | Kindle Developer's Corner | 5 | 12-16-2011 09:57 PM |
Adapting Comics for the Kindle (Tutorial) | davebaxter | Amazon Kindle | 0 | 07-30-2009 05:52 PM |
Tutorial On Converting to Kindle? | kapblp | Calibre | 8 | 03-27-2009 08:42 AM |
iLiad What if iLiad adopts GTK on DirectFB? | ericshliao | iRex Developer's Corner | 1 | 01-26-2008 05:36 AM |