Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 06-17-2011, 12:45 PM   #1
mark03
Enthusiast
mark03 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jun 2011
Device: Kindle 3 wifi
Cross-compilation question--building directfb

Yesterday I used niluje's excellent cross-compilation guide to set up crosstool-ng and generate a toolchain for my K3. I was able to build a simple printf("hello, world\n") app, copy it to my Kindle, and run it successfully from a shell. Thanks guys!

Now I would like to try some framebuffer test code linked against Amazon's modified directfb. So I need to build, with the xc toolchain, directfb and its library dependencies (like freetype). I have Amazon's 3.2.1 source release. Most of these source distributions are set up to use autoconf configure scripts. If I set the proper environment variables, should autoconf "just work" automatically with my arm-gnueabi toolchain? How hard is it to build these guys so I can link against directfb?

(I could use the raw framebuffer, of course, but the application I have in mind would really benefit from font support. I'd rather not have to create my own typeface rasters!)
mark03 is offline   Reply With Quote
Old 06-17-2011, 01:05 PM   #2
B_Lizzard
Member
B_Lizzard began at the beginning.
 
Posts: 10
Karma: 24
Join Date: Feb 2011
Device: Kindle 3
I use OpenEmbedded for compiling. It's a great environment but it might be a bit too much if you've never used it before.

Start Here for help in setting up OE. Use MACHINE = "bug" and DISTRO = "angstrom-2010.x" in your local.conf, but change the glibc version for Angstrom to version 2.5, which is what the Kindle is running on (change it in openembedded/conf/distro/angstrol-2010.x.conf around line 70).

Good thing with OpenEmbedded is it has a wealth of applications ready for compilation. The Kindle is running on DirectFB 1.2, so make sure you compile applications against directfb-1.2 and not 1.4 in OE.
B_Lizzard is offline   Reply With Quote
Advert
Old 06-17-2011, 02:04 PM   #3
mark03
Enthusiast
mark03 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jun 2011
Device: Kindle 3 wifi
Thanks. I'm accustomed to building packages on my Linux desktop but I've somehow avoided cross-building until now. I even use a native toolchain on my ARM sheevaplug to keep it simple.

I was using crosstool-ng because of some comments in the forums, and the configuration niluje's published here. I like the kernel-style (menuconfig) interface. But if you think OE would be easier to get some of the libraries built, I'll give it a go. So they have their own repository of pacakges preconfigured for OE?
mark03 is offline   Reply With Quote
Old 06-17-2011, 08:35 PM   #4
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@mark03: If you check the rest of the file, most of the stuff I build uses autotools, so once your cross toolchain is in your path, passing --host=arm-kindle-linux-gnueabi to configure (and apprpriate C/CXX/LDFLAGS in your env) should be enough (provided the project is using autootools correctly, and in a cross-compile friendly way, which might not always be the case ;D).

The only thing that might cause some trouble in my config is that I'm running a somewhat way more recent version of glibc/gcc than the Kindle system, and there's a few cases where I had to tweak things a bit to avoid pulling newer symbols (readelf is you friend to check that kind of stuff in your binaries).

You might want to try a cross toolchain based on glibc 2.5 if you encounter too much issues of this kind.

And, yeah, there's a whole bunch of different tools that can be used, some primarily aimed at bootstrapping embedded systems. I'm using crosstool-ng because it's 'simpler', its goal being just to provide a toolchain, not help bootstrap a full system, and I'm somewhat used to do things manually once I have a reliable toolchain setup (being a gentoo user and all ;p).

Last edited by NiLuJe; 06-17-2011 at 08:42 PM.
NiLuJe is offline   Reply With Quote
Old 06-20-2011, 11:59 AM   #5
liuto
Connoisseur
liuto is on a distinguished road
 
Posts: 50
Karma: 70
Join Date: Nov 2010
Device: Kindle DXG / Kindle 3
I use scratchbox, it works just fine.
liuto is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
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
A question about cross-border Kobo shopping kjturner71 Kobo Reader 8 03-08-2011 10:41 PM
New firmware compilation (June 9) ahhahh iRex 38 06-16-2010 04:28 PM
iLiad What if iLiad adopts GTK on DirectFB? ericshliao iRex Developer's Corner 1 01-26-2008 05:36 AM
Compilation of Q&A FGFuzaxx iRex 14 07-17-2006 07:51 AM


All times are GMT -4. The time now is 11:51 PM.


MobileRead.com is a privately owned, operated and funded community.