![]() |
#121 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I just discovered that some "search commands" are typed on the K1 keypad while in the settings menu:
411 gives a bunch of nice info, but what interest me at this point is: "Kindle Version: Linux version 2.6.10-lab126 (build@voyager) (gcc version 3.4.2) #1 Wed Jan 28 19:02:06 PST 2009" If I am going to try another GCC, that one should be next. Though in reality, hunting for a build tool that creates K1-compatible code is no longer any fun. At all... |
![]() |
![]() |
![]() |
#122 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
See my earlier post from today on the subject - you have to duplicate the A/L toolchain without having the component (uClibc, Kernel, gcc) configuration files. It should be doable - but will take some work and don't expect to find a 'magic bullet' that lets you skip duplicating their toolchain. Last edited by knc1; 05-12-2016 at 08:27 AM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#123 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
I did specify softfloat (or softfp) in some attempts, depending on the compiler (older GCC versions default to soft float). The -mcpu options did not work when I tried them, so I switched to -march and -mtune. I will try more of the options you suggested. Question, why would the compiler generate floating point code for a "Hello" program? My simplest attempt was a main() that did a "return 42;" and nothing else (and my script displays return code). I am tempted to drop to ASM and use my own minimal C runtime (i.e. bare metal mode). At least then I know the compiler is not throwing in stuff that makes the loader bail or causes an instruction trap. Configuring and building a toolchain is all-new to me. I should spend more time reading and less time stumbling around in the dark, in these blind attempts to run custom code on my K1... Last edited by geekmaster; 05-12-2016 at 08:32 AM. |
|
![]() |
![]() |
![]() |
#124 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
I will be done posting here for a bit while I study, but I will keep an eye out for anything y'all post to this thread. A working toolchain would be nice... |
|
![]() |
![]() |
![]() |
#125 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
One of those things I putter around on when bored with life. Also one of the things I have never finished. But the basics are: Going forward with menuconfig (kernel, busybox, uClibc, buildroot, etc): You want feature: "Churn Butter on Wednesday" - Find in menuconfig menus and then set to: 'yes' - When the makefile is later run - Finding symbol: CBW_CONFIG='y' it adds to the string OBJS-Y += cbw.o - Later in the makefile processing all objects mentioned in the OBJS-Y (string) symbol are built - Each *.o file built has its own set of (run-time) symbols. The final <whatever> being built has an accumulation of symbols from each of its components. So to reverse the process: First a little prep work - make allyes that **should** (but will not) build every possible *.o in its tree Now run a script (using a language that supports associative keyes) to list (using a standard elf tool) sysmbols in each *.o. Make a catalog (when you find an entry point symbol cbw_init, do): cbw_init: cbw.o, CBW_CONFIG=y, etc. etc. etc. Now run a script on the final <whatever> was built - For each symbol found, look it up in the above catalog, append the configuration symbol (CBW_CONFIG=y) to the output list you are building. With an object like uClibc.so - ELF tools will give you the symbol list and details - For the K1's kernel (also built with menuconfig): cat /proc/kallsyms while the kernel is running (do it now - before we both forget). (/proc/kallsyms contains a list of symbols from every *.o = 'y' or 'm' when the kernel was built) |
|
![]() |
![]() |
Advert | |
|
![]() |
#126 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 86
Karma: 186294
Join Date: Jun 2011
Device: Kindle k3G 3.4.2; DXG 2.5.8; DXG 3.1; Iriver Story HD
|
Kindle used denx? I found this finally.
I would schedule several months at least if I wanted to learn how to do this, and I don't. ftp://ftp.denx.de/pub/eldk/4.0/arm-linux-x86/iso/ |
![]() |
![]() |
![]() |
#127 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Meh... Okay. This K1 project seems like a dead end. Getting a toolchain working based on configs lab12 did not supply seems like opening a combination lock in the dark. I have better things to do...
|
![]() |
![]() |
![]() |
#128 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
I think knc1 is right about needing the same configs lab126 used... Think of the cool stuff I could share if I had spent this many hours developing stuff for newer kindles, where we already have toolchains that work, instead of this... Last edited by geekmaster; 05-12-2016 at 09:50 AM. |
|
![]() |
![]() |
![]() |
#129 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
It must be re-built. In fact, since it is so highly configurable, it can be in-compatible from build-to-build of the same version. Aboriginal Linux is probably a (currently maintained) alternative to ELDK for a native build environment. http://landley.net/aboriginal/about.html Last edited by knc1; 05-12-2016 at 10:16 AM. |
|
![]() |
![]() |
![]() |
#130 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 929
Karma: 15576314
Join Date: Jan 2013
Location: Ely, Cambridgeshire, UK
Device: Kindle Oasis 3, Kindle Oasis 1
|
[QUOTE=geekmaster;3315820]
PHP Code:
Well, the reason why this isn't working is simple enough -- the ELF interpreter specified by uclibc/bin/busybox is /lib/ld-uClibc.so.0. That is an absolute path, and no searching is done: the kernel just executes it directly. An ld.so in a different directory, let alone one with a different name, will never be found by this process. But uClibc is highly reconfigurable: as noted, without the config Amazon used, it's probably best to statically link everything, so you don't depend on the God-knows-what libc config Amazon have used. If you can't get that to work, you'll never be able to get the considerably more complex dynamic linking case to work. |
![]() |
![]() |
![]() |
#131 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
Regarding getting NEW custom apps running on the K1, I have done static links that work on qemu-arm-static, but not on the K1. They typically segfault or get "illegal instruction" errors (depending on which gcc version was used). The compiler flags have little effect on the results. I think either the flags are not honored in some cases, or the loader is choking on the ELF file in some cases. Not sure -- this is new territory for me (in the past I just USED the tools, and I trusted them; not so much now)... Last edited by geekmaster; 05-12-2016 at 01:35 PM. |
|
![]() |
![]() |
![]() |
#132 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
FYI, all those "stl" symbols in that data dump are for the "Sector Translation Layer", which manages all the OneNAND (just a lump of dumb flash memory) write wear-levelling and bad block relocation. The mmc socket does not need this added layer of complexity, because SD cards contain their own (often quite sophisticated) CPU to manage all that out of sight of the hardware application. BTW, many SD cards are hackable (I even have root shell on one of my SD cards, but logging to flash from that shell, while the SD card is visible to a host PC, is rather hard to sync and sometimes causes file system corruption). Last edited by geekmaster; 05-12-2016 at 01:43 PM. |
|
![]() |
![]() |
![]() |
#133 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Instead of fighting with incompatible ELF files, maybe I should play with custom u-boot images? That might be easier...
![]() |
![]() |
![]() |
![]() |
#134 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 929
Karma: 15576314
Join Date: Jan 2013
Location: Ely, Cambridgeshire, UK
Device: Kindle Oasis 3, Kindle Oasis 1
|
Quote:
If there is no faulting dmesg, then since there's no gdb binary on this platform (and we can't build a gdb stub for remote debugging until we can build a binary that works), then it gets much harder to figure out what's causing this. But if we can figure out what instruction is triggering this SIGILL, we're most of the way there. The ARM is rather famous for having wild variation in the variety of instructions particular chips accept: I'd bet that at least one that is usually available on ARMv5 isn't available on the one used in the K1. |
|
![]() |
![]() |
![]() |
#135 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I haven't had difficulty for a variety of ARM dev kits that provide their own toolchain (other than making sure environment variables do not conflict), but I have yet to find a download link for various lab126 toolchains that would be useful for us here...
![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
geekmaster vacation | geekmaster | Kindle Developer's Corner | 2 | 03-19-2012 09:18 PM |