Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-26-2011, 09:52 PM   #1
mpetersen3
Enthusiast
mpetersen3 began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Nov 2011
Device: Kindle
X-Compiling with Kindle

I found the x-compile shell history and tried to replicate the settings there, without changing anything not mentioned (ie. if included already in my default ct-ng config I left the feature enabled), but the ct-ng exited with an error. Could anyone share a .config file for ct-ng that works? and possibly explain the process and the patch files a bit more?
Thanks,
Matt
mpetersen3 is offline   Reply With Quote
Old 12-27-2011, 05:43 AM   #2
vdp
Enthusiast
vdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watch
 
Posts: 39
Karma: 10842
Join Date: Aug 2010
Device: Kindle DXG
I am not sure what are the pros/cons of using the different toolchains and I am by no means an expert in this embedded stuff, but I found the CodeSourcery's compilers to be very simple to setup and use. You can download from here. The flags that should be used when compiling for DX and K3 are "-mcpu=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp".
vdp is offline   Reply With Quote
 
Advertisement
Old 12-27-2011, 10:49 AM   #3
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Some kindles have a floating point processor, so could use different flags.
geekmaster is offline   Reply With Quote
Old 12-27-2011, 11:19 PM   #4
mpetersen3
Enthusiast
mpetersen3 began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Nov 2011
Device: Kindle
I would prefer to learn how to do it through ct-ng because it is foss
mpetersen3 is offline   Reply With Quote
Old 12-28-2011, 02:46 AM   #5
vdp
Enthusiast
vdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watch
 
Posts: 39
Karma: 10842
Join Date: Aug 2010
Device: Kindle DXG
Quote:
Originally Posted by geekmaster View Post
Some kindles have a floating point processor, so could use different flags.
Yep, Kindle DXG has hardware FP and AFAIK the flags from my post above make use of it. Perhaps you were confused by the 'softfp' part, but it references just to the calling convention (more info here).

@mpetersen3
Just for the record, CS toolchain is just a prepackaged GCC (so OSS too). Think Ubuntu vs "Linux From Scratch".
vdp is offline   Reply With Quote
Old 12-28-2011, 11:22 PM   #6
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: 5,258
Karma: 5220787
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O
I'm using a Gentoo system, so I'm using patches/work-arounds based on the Portage ebuilds, plus the few patches included in the archive for Kindle/x-tc related hacks/workarounds. And I went the 'hard' way of using a recent gcc/glibc combo instead of the exact same (old) TC as on the Kindle, so there's a few hoops to jump through to avoid ABI mismatches.

That explains the relative mess compared to the usual (./configure && make) .

AFAIK, unless you're missing a full development environment on your host, you shouldn't have any issue with ct-ng itself. What seems to be the problem, exactly? (check/post the log).

Last edited by NiLuJe; 12-28-2011 at 11:24 PM.
NiLuJe is offline   Reply With Quote
Old 12-30-2011, 01:08 PM   #7
mpetersen3
Enthusiast
mpetersen3 began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Nov 2011
Device: Kindle
It looks like it was unable to curl for the linaro tarball, I have gone ahead and manually downloaded and added the linaro tarball to the .build/tarballs/ folder and hopefully it will find it on re-run and skip downloading it. Will let you know in a bit.
mpetersen3 is offline   Reply With Quote
Old 12-30-2011, 03:42 PM   #8
mpetersen3
Enthusiast
mpetersen3 began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Nov 2011
Device: Kindle
So after re-running it I am getting a "Build failed in step 'Extracting and patching toolchain components'" error, more specifically it looks like it is "make[1]: *** [configure-gcc] Error 1". I am going to attach the log file shortly

Edit: Here is a link for the log file
http://www.crocko.com/2A49758F222046...E100/build.log

Last edited by mpetersen3; 12-30-2011 at 04:25 PM.
mpetersen3 is offline   Reply With Quote
Old 01-02-2012, 06:14 PM   #9
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: 5,258
Karma: 5220787
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O
@mpetersen3:

Quote:
[ALL ] Unknown CPU used in --with-cpu=arm1146jf-s
It's arm1136jf-s .
NiLuJe is offline   Reply With Quote
Old 01-03-2012, 11:59 PM   #10
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: 5,258
Karma: 5220787
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O
@vdp:

FYI, the settings I'm using with ct-ng defaults to the 'hard' float-abi (if gcc -Q -v is to be trusted, which it should ^^), and that seems to work ok (so far? The ARM attributes seems to be missing from the K3 binaries, so I can't say for sure which ABI the K3 system was built for. On the other hand, the hard float ABI seems to have been properly introduced only somewhere around GCC 4.5, so I'm a bit confused. Also, not sure it matters that much on an armv6 chip. But, yeah, the K4 *looks* like it's using softfp.) .

So, err, I'll go with 'it seems to work fine for now', and we'll see if I manage to break stuff in new & interesting ways when I get my hands on a Kindle running on a Cortex! .

Last edited by NiLuJe; 01-04-2012 at 01:02 AM.
NiLuJe is offline   Reply With Quote
Old 01-04-2012, 05:22 AM   #11
vdp
Enthusiast
vdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watchvdp is clearly one to watch
 
Posts: 39
Karma: 10842
Join Date: Aug 2010
Device: Kindle DXG
@NiLuJe
As I said, this embedded/ARM stuff is new to me, but good to know about these alternative settings anyway.
Moreover one purpose that forums like this one serve is to be a sort of knowledge base, so it's good when such info is recorded in relevant threads.
vdp is offline   Reply With Quote
Old 01-06-2012, 01:52 AM   #12
mpetersen3
Enthusiast
mpetersen3 began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Nov 2011
Device: Kindle
Quote:
Originally Posted by NiLuJe View Post
@mpetersen3:



It's arm1136jf-s .
I noticed this a few days ago but life has been hectic and i havent had too much time. I am building it now fingers crossed.

On an OT note, is anyone an expert in android phones/ cell networks, i am having an issue with an Samsung galaxy s i9000t that i have unlocked on Att where it gets really spotty coverage.
mpetersen3 is offline   Reply With Quote
Old 01-06-2012, 02:01 AM   #13
mpetersen3
Enthusiast
mpetersen3 began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Nov 2011
Device: Kindle
Below is the issue I am having with the cpu correctly set (I used 'grep "1146" ./config* ' in the build dir where i invoked "ct-ng build"

[mpetersen@mpetersen-sam ct-ngKindle]$ ct-ng build
[INFO ] Performing some trivial sanity checks
[INFO ] Build started 20120106.004357
[INFO ] Building environment variables
[INFO ] ================================================== ===============
[INFO ] Retrieving needed toolchain components' tarballs
[INFO ] Retrieving needed toolchain components' tarballs: done in 0.12s (at 00:10)
[INFO ] ================================================== ===============
[INFO ] Extracting, patching and installing companion tools
[INFO ] Extracting, patching and installing companion tools: done in 17.97s (at 00:28)
[INFO ] ================================================== ===============
[INFO ] Extracting and patching toolchain components
[INFO ] Extracting and patching toolchain components: done in 9.20s (at 00:37)
[INFO ] ================================================== ===============
[INFO ] Installing GMP
[INFO ] Installing GMP: done in 37.62s (at 01:15)
[INFO ] ================================================== ===============
[INFO ] Installing MPFR
[INFO ] Installing MPFR: done in 15.29s (at 01:30)
[INFO ] ================================================== ===============
[INFO ] Installing PPL
[INFO ] Installing PPL: done in 135.73s (at 03:46)
[INFO ] ================================================== ===============
[INFO ] Installing CLooG/ppl
[INFO ] Installing CLooG/ppl: done in 5.15s (at 03:51)
[INFO ] ================================================== ===============
[INFO ] Installing MPC
[INFO ] Installing MPC: done in 6.95s (at 03:58)
[INFO ] ================================================== ===============
[INFO ] Installing binutils
[INFO ] Installing binutils: done in 44.29s (at 04:42)
[INFO ] ================================================== ===============
[INFO ] Installing static core C compiler
[ERROR] make[1]: *** [configure-gcc] Error 1
[ERROR]
[ERROR] >>
[ERROR] >> Error happened in: main[scripts/crosstool-NG.sh]
[ERROR] >>
[ERROR] >> For more info on this error, look at the file: 'build.log'
[ERROR] >> There is a list of known issues, some with workarounds, in:
[ERROR] >> '/usr/share/doc/ct-ng-1.13.2/B - Known issues.txt'
[ERROR]
[ERROR] Build failed in step 'Extracting and patching toolchain components'
[ERROR]
[ERROR] (elapsed: 5:17.57)
[05:18] / make: *** [build] Error 2
mpetersen3 is offline   Reply With Quote
Old 01-06-2012, 05:16 AM   #14
bhaak
Groupie
bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.
 
bhaak's Avatar
 
Posts: 162
Karma: 164959
Join Date: Dec 2011
Device: Palm IIIx, (iPhone|Kindle) Touch
Quote:
Originally Posted by mpetersen3 View Post
[ERROR] >>
[ERROR] >> Error happened in: main[scripts/crosstool-NG.sh]
[ERROR] >>
[ERROR] >> For more info on this error, look at the file: 'build.log'
[ERROR] >> There is a list of known issues, some with workarounds, in:
[ERROR] >> '/usr/share/doc/ct-ng-1.13.2/B - Known issues.txt'
[ERROR]
[ERROR] Build failed in step 'Extracting and patching toolchain components'
[ERROR]
[ERROR] (elapsed: 5:17.57)
[05:18] / make: *** [build] Error 2
Look into the file build.log, there are details about what went wrong.
bhaak is offline   Reply With Quote
Old 01-06-2012, 03:53 PM   #15
mpetersen3
Enthusiast
mpetersen3 began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Nov 2011
Device: Kindle
I am pretty sure that when i had this issue previously, the build log is in fact identical to this and tells you to check itself, i will inspect this later from home
mpetersen3 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling the Linux Kernel for the Kindle yifanlu Kindle Developer's Corner 60 05-18-2014 09:47 AM
Cross compiling for the Kindle - wrong glibc version ninjageckoattack Kindle Developer's Corner 14 02-25-2012 05:44 PM
Problems compiling unkilbeeg Sigil 1 09-13-2009 02:49 PM
iLiad compiling Minimo jtq iRex Developer's Corner 11 09-03-2007 06:33 AM
PRS-500 Compiling for the Reader alex_d Sony Reader Dev Corner 29 07-15-2007 01:29 PM


All times are GMT -4. The time now is 02:52 PM.


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