12-26-2011, 08:52 PM | #1 |
Enthusiast
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 |
12-27-2011, 04:43 AM | #2 |
Enthusiast
Posts: 45
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".
|
Advert | |
|
12-27-2011, 09:49 AM | #3 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Some kindles have a floating point processor, so could use different flags.
|
12-27-2011, 10:19 PM | #4 |
Enthusiast
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
|
12-28-2011, 01:46 AM | #5 | |
Enthusiast
Posts: 45
Karma: 10842
Join Date: Aug 2010
Device: Kindle DXG
|
Quote:
@mpetersen3 Just for the record, CS toolchain is just a prepackaged GCC (so OSS too). Think Ubuntu vs "Linux From Scratch". |
|
Advert | |
|
12-28-2011, 10:22 PM | #6 |
BLAM!
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
|
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 10:24 PM. |
12-30-2011, 12:08 PM | #7 |
Enthusiast
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.
|
12-30-2011, 02:42 PM | #8 |
Enthusiast
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 03:25 PM. |
01-02-2012, 05:14 PM | #9 | |
BLAM!
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
|
@mpetersen3:
Quote:
|
|
01-03-2012, 10:59 PM | #10 |
BLAM!
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
|
@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 12:02 AM. |
01-04-2012, 04:22 AM | #11 |
Enthusiast
Posts: 45
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. |
01-06-2012, 12:52 AM | #12 |
Enthusiast
Posts: 25
Karma: 10
Join Date: Nov 2011
Device: Kindle
|
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. |
01-06-2012, 01:01 AM | #13 |
Enthusiast
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 |
01-06-2012, 04:16 AM | #14 | |
Groupie
Posts: 164
Karma: 164969
Join Date: Dec 2011
Device: Palm IIIx, (iPhone|Kindle) Touch
|
Quote:
|
|
01-06-2012, 02:53 PM | #15 |
Enthusiast
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
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compiling the Linux Kernel for the Kindle | yifanlu | Kindle Developer's Corner | 82 | 12-12-2016 09:35 PM |
Cross compiling for the Kindle - wrong glibc version | ninjageckoattack | Kindle Developer's Corner | 14 | 02-25-2012 04:44 PM |
Problems compiling | unkilbeeg | Sigil | 1 | 09-13-2009 01:49 PM |
iLiad compiling Minimo | jtq | iRex Developer's Corner | 11 | 09-03-2007 05:33 AM |
PRS-500 Compiling for the Reader | alex_d | Sony Reader Dev Corner | 29 | 07-15-2007 12:29 PM |