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 03-29-2013, 04:42 AM   #1
brianinmaine
Evangelist
brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.
 
brianinmaine's Avatar
 
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
help set up development environment?

I think I have what it takes to start trying to compile a few programs. I have Debian Testing, I just made a debian image and was able to chroot into it and apt-get update. I found some information about cross-compiling?? but I don't understand the basic steps to end up with a package for a different arch (compiling for armel instead of i386).

I found a cool program(s) that has a lot of games that *might* work with some effort on a kindle:
http://gtkboard.sourceforge.net/indexold.html

edit: this package is already in the debian arm repo! I will install it to one of my images and try it, but I would still like to know how this is done? what would I normally pass to the compile script?

I have the package uncompressed uncompressed on my hostpc ready to configure && make, but I'm just not sure of a commandline? what do I have to pass to the compiler?

Would it be easier overall to just do a full debian arm install in a qemu image? I could have all the development tools there..??

What do the mighty wizards on here do?

Last edited by brianinmaine; 03-29-2013 at 05:18 AM.
brianinmaine is offline   Reply With Quote
Old 03-29-2013, 07:10 AM   #2
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
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
I exported that one twice already.
if you just want to run in it a Xephyr then I already bundled it.

http://drpbox.knetconnect.com/KeK/ <-- Get tools here.
2012.03 generally builds for the higher devices but can build for all with some flags and love
2007q3 for the lower and higher ones. I personally try to build with the 2007q3 for all devices if I can as it means sure-fire support, but its an old Toolchain and some newer codebases may not like it.

You then need to pimp your toolchain a bit. say we are using the 2007q3 and you are just targetting the "under 4's" 2, DX, 3.

Grab the zip. unzip in /opt

Grab all the libs out of your kindle and dump them in /opt/arm-2007q3/arm-none-linux-gnueabi/lib

DO NOT DROP the c libs in there... it will break the toolchain...

Now "headers"... I personally cheat and just build a full buildroot then go grab my headers out of there and drop them in... /opt/arm-2007q3/arm-none-linux-gnueabi/include

Since I have a bunch of toolchains I then source whatever path I need for the toolchain like:
Quote:
. /path2007q3
(note the space after the dot)

where the file contains: me@dev ~ $ cat /path2007q3
Code:
export PATH=/opt/arm-2007q3/bin:$PATH
you can do this however you want... I like that way.

I also then source my flags for the device similarly: . /flagsk5 or . /flagsk3

To be honest Niluje provides a more complete example that this is based on on his Screensavers thread.

Let's look what is in one:

me@dev ~ $ cat /flagsk5
Quote:
export ARCH_FLAGS="-march=armv7-a -mtune=cortex-a8 -mfpu=vfpv3-d16"
export CFLAGS="-mfloat-abi=softfp -flto -O2 -ffast-math ${ARCH_FLAGS} -pipe -fomit-frame-pointer"
and the other one...

me@dev ~ $ cat /flagsk3
Quote:
export ARCH_FLAGS="-march=armv6j -mtune=arm1136jf-s -mfpu=vfp"
export CFLAGS="-U_FORTIFY_SOURCE -fno-stack-protector -O2 -fno-finite-math-only -ffast-math ${ARCH_FLAGS} -pipe -fomit-frame-pointer -fPIC"
#ARM_NO_UNALIGNED_ACCESS="-mno-unaligned-access" <-- Dx
export CXXFLAGS="-fno-stack-protector -fno-use-cxa-atexit"
export CPPFLAGS="-U_FORTIFY_SOURCE"
Those are by no means exhaustive options. If you want to be super compliant check out Nilujes work.

I have no idea if I missed anything...

Assuming a perfect world you would then

me@dev ~ $ CC=arm-none-linux-gnueabi-gcc CROSS_COMPILE=arm-none-linux-gnueabi- ./configure --build=i686-pc-linux-gnu --host=arm-none-linux-gnueabi prefix=/mnt/us/extensions/myAwesomeNewApp

make

make install


and see how you go...

Hope that helps somewhat.
Attached Thumbnails
Click image for larger version

Name:	Selection_289.png
Views:	329
Size:	11.3 KB
ID:	103636   Click image for larger version

Name:	Selection_290.png
Views:	351
Size:	53.1 KB
ID:	103637  

Last edited by twobob; 03-29-2013 at 07:12 AM.
twobob is offline   Reply With Quote
Advert
Old 03-29-2013, 07:31 AM   #3
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
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
Utterly untested

Just grabbed out.

you would run it like

Xephyr :1 -title "L:A_N:application_ID:xephyr_O:R_PC:N" -screen 800x600 -cc 4 -dpi 155 &
then
cd /mnt/us/extensions/gtkboard/bin; LD_LIBRARY_PATH=../lib:$LD_LIBRARY_PATH DISPLAY=:1 ./gtkboard

I guess.


EDIT:

Ah...

Quote:
(gtkboard:6220): GdkPixbuf-WARNING **: Error loading XPM image loader: Unable to load image-loading module: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so: /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-xpm.so: cannot open shared object file: No such file or directory
gtkboard: board.c:664: board_init: Assertion `pieces[i]' failed.
Aborted
Your first job... research fixing that in your version (baf has examples kicking around)
But you have a few libs and such to play with now


EDIT EDIT: Made it that bit easier and included the files...

Launch script you think?
Attached Files
File Type: zip gtkboard.zip (2.16 MB, 278 views)
File Type: zip gdk-pixbuf-2.0.zip (106.0 KB, 235 views)

Last edited by twobob; 03-29-2013 at 08:00 AM.
twobob is offline   Reply With Quote
Old 03-29-2013, 10:35 AM   #4
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Cross-toolchains for Debian Testing could be installed from emdebian.org repository.
eureka is offline   Reply With Quote
Old 03-29-2013, 11:36 AM   #5
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
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
Yeah you can dev on the device if you like.

I have a debian all setup for that with nothing but the Toolchain installed...
I just swap the debian.ext3 onto the device that I need at the time... Takes about 6 minutes... about 13? over ssh

I keeps about 5 at the moment... One for games, one for programming, one for office and chat etc etc...
twobob is offline   Reply With Quote
Advert
Old 03-30-2013, 08:02 PM   #6
brianinmaine
Evangelist
brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.brianinmaine ought to be getting tired of karma fortunes by now.
 
brianinmaine's Avatar
 
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
thank you all so much! so much to learn, so little time. i've got the next week off from work, maybe i can get a few minutes to play!

twobob - are you trying to make this too easy for me?
i'd love to get a checkers game working and i think this one has a version in it.

thanks again!
brianinmaine is offline   Reply With Quote
Old 01-19-2014, 07:38 AM   #7
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Necroposting, baby

Did anybody noted that Amazon's source code archive for KT 5.3.7 (Kindle_src_5.3.7_2004410010.tar.gz) contains build_linaro-gcc_4.5.4.tar.gz with instructions about how to build GCC toolchain (basically, just run Makefile which will download and compile binutils and Linaro GCC)?

Build process is pretty straightforward. I've built it and described found building quirks at Kindle_Touch_Hacking#GCC_cross-toolchain.

While in general the same toolchain (as was used for building KT's rootfs) isn't strictly required for building stuff, I believe C++ programs are sensitive to version of C++ standard library and its headers and there is no official way of building/getting this library/headers without building whole GCC also. So this toolchain will provide perfectly matched (to KT's environment) set of C++ headers, which could be helpful.

Last edited by eureka; 01-22-2014 at 09:23 AM. Reason: update wiki link
eureka is offline   Reply With Quote
Old 01-19-2014, 08:23 AM   #8
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Amazon must be making up their own numbers.

Linaro project never released a 4.5.4 gcc.
https://launchpad.net/gcc-linaro/4.5/

The most recently released 4.5 is based on: GCC 4.5.3+svn184976
Back in March, 2012.
https://launchpad.net/gcc-linaro/+milestone/4.5-2012.03

- - - -

But in answer to your question - yes, some people noticed.
knc1 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up a development environment ... BWinmill Kobo Developer's Corner 27 06-16-2014 08:21 AM
OS X 10.8 (Mountain Lion) Development Environment GRiker Development 4 07-26-2012 07:29 AM
Problem with creating the development environment rozen Calibre 6 05-29-2011 11:38 PM
setup development environment JeffElkins Calibre 21 10-22-2008 03:25 PM
Setting up development environment tompe OpenInkpot 9 08-27-2008 02:26 PM


All times are GMT -4. The time now is 03:13 AM.


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