05-09-2016, 11:18 PM | #61 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
|
05-10-2016, 03:49 AM | #62 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I tried a bunch of different promising toolchains, but to no avail.
But now I think I had SOME possible progress. I downloaded: https://downloads.gumstix.com/feeds/archive/318M/uclibc/ipk/armv5te/g++_4.1.2-r7_armv5te.ipk And from that archive I unpacked: arm-angstrom-linux-uclibcgnueabi-g++ I copied that to my K1, and when running: /mnt/us/arm-angstrom-linux-uclibcgnueabi-g++ -v I got a DIFFERENT error message: can't load library 'libiconv.so.2' That seems a lot less cryptic than "not found" or "Segmentation fault", which are all I ever saw from anything else NOT copied directly from a K1 rootfs. Considering that the K1 was largely Gumstix based (even with Gumstix references in the amazon GPL source code), it makes sense that binary packages from a Gumstix website would at least "try" to load and run. I suspect it WOULD run if I could find and install all the missing dependencies. That seems like a modicum of progress... With a bit of luck, I *might* be able to compile directly on the K1, but there are probably a ton of dependencies to resolve first. |
Advert | |
|
05-10-2016, 03:55 AM | #63 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
And googling for that "almost" working executable, I found that beagleboard dev kits support that, so perhaps more potentially useable binaries there too:
http://beagleboard.org/linux The goal being to find some static-compiled build tools that I can use to build more... Last edited by geekmaster; 05-10-2016 at 04:01 AM. |
05-10-2016, 07:23 AM | #64 | |
Guru
Posts: 916
Karma: 13928438
Join Date: Jan 2013
Location: Ely, Cambridgeshire, UK
Device: Kindle Oasis 3, Kindle Oasis 1
|
Quote:
You almost certainly want to exploit the sysroot feature, if you can manage to use a new-enough compiler (which you probably can): <https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html>. This lets you drop a mini-root-directory full of libraries and headers and have GCC just use it and avoid ever using the libraries and headers on your build machine. GCC still has ARMv5 support, so you should not need to use an ancient compiler: a new toolchain should work fine, as long as you stick with whatever ancient uclibc the K1 is using. |
|
05-10-2016, 07:48 AM | #65 |
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
|
The error message is a good sign those gumstix binaries will work with the Kindle1. The files I was using were built for a newer kernel so they worked on my DXG with 2.6.22 and might not work on the K1 with 2.6.10.
Actually, my hello program was built with libc6 not uclibc so I doubt mine would work unless I built a -static version. The gcc was able to find the includes without a problem. I had a difficult time finding all of the correct locations for the libraries and finally had to move the crt1.o files to my build directory. These problems might have been due to my symlinks all over the place. I also had some 'sh: file not found' errors from bad linking by 'ld'. I finally compiled only '-c' to the hello.o and then ran 'ld --verbose' separately to track down the library search pathology. I never could get the linker to find the crt1.o type files and just added them to my hello directory to finish linking. That is cool the gumstix uclibc binaries show some promise. |
Advert | |
|
05-10-2016, 08:07 AM | #66 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Unless of course you want to just use newer libraries (or even non-uClibc libraries).
Linux (actually, any ELF system) can support multiple sets of system libraries concurrently. I published a "HowTo" here on that subject - See my "ARMhf on Kindle" thread. Found also in that thread are examples of how to get the loader to report what it is doing (and thereby, what the source of the problem is with a bit more control than --verbose). All of these trouble reports about trouble building for the K1 xScale processor should be a non-issue. And the BuildRoot project people added support for multiple system libraries for the use of after-market addition builders at my request. Last edited by knc1; 05-10-2016 at 08:15 AM. |
05-10-2016, 09:21 AM | #67 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
|
|
05-10-2016, 09:31 AM | #68 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Your the teacher, not the student. Could you make a copy of the file system and post it somewhere I could grab a copy? If you don't have a private place to post it handy, PM me the public key of an ssh key-pair and I'll setup a sftp location for you to push it to on one of my servers. I don't have a K1, but maybe I can learn from the file system what might be causing you so much trouble. |
|
05-10-2016, 09:48 AM | #69 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
I can grab K1 dirs as tarballs, but I have had little success imaging the (useful) partitions. Though I have recently read how the firmware updates build the partitions by sending "cookies" (magic numbers) to the "BL" flash drivers. When partitions are unlocked with those magic cookies, then 'dd' can access them, but some cookies can be very destructive so I am yet wary of that, and it is still not sure what all of them are yet. I just discovered that one of them is the "recovery-kernel". Poking around is slow and tedious with no terminal support -- I really need to find a 0.5mm ribbon cable so I can connect to the serial port (or order some on ebay and wait a month)... Last edited by geekmaster; 05-10-2016 at 09:55 AM. |
|
05-10-2016, 10:03 AM | #70 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
tarballs of whatever you can get should be a good starting point.
|
05-10-2016, 10:34 AM | #71 | |
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
|
Quote:
I found several optware builds that might work on the K1 using arm with uclibc. I see where the nslu2 uses glibc not uclibc so those packages wouldn't work. http://www.nslu2-linux.org/wiki/Optware/Platforms Trying to match the CPU and with the kernels and libraries to find working binaries is probably not the best technique. Maybe staying with the cross-compiling is a better option if that is almost setup correctly. I mention the following only in case somebody else is following this thread and looking for other binaries to add to their readers and not wanting to build their own. http://ipkg.nslu2-linux.org/feeds/optware/ PS- Anybody wanting to look inside the Kindle1 OS using kindle_update_tool.py can get the full rootfs.img from Amazon with Update_kindle-1.2.bin Code:
drwxr-xr-x 6 root root 4096 May 10 07:26 . drwxr-xr-x 3 root root 4096 May 10 07:25 .. -rw-r--r-- 1 61967 502 15466496 Jan 28 2009 content_fs.img drwxr-xr-x 2 root root 4096 May 10 07:25 eink -rw-r--r-- 1 61967 502 786432 Jan 28 2009 initrd_fs.img -rw-r--r-- 1 61967 502 786432 Jan 28 2009 initrd-recover_fs.img drwxr-xr-x 2 root root 4096 May 10 07:25 ioc -rw-r--r-- 1 61967 502 11665408 Jan 28 2009 root_fs.img drwxr-xr-x 2 root root 4096 May 10 07:25 scripts -rw-r--r-- 1 61967 502 1310720 Jan 28 2009 uImage -rw-r--r-- 1 61967 502 1223 Jan 28 2009 update-016-KU3-029987.dat drwxr-xr-x 2 root root 4096 May 10 07:25 utils |
|
05-10-2016, 11:01 AM | #72 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
And those scripts in the update give me great clues to accessing raw partitions, which were nowhere to be found in scripts installed on my K1. That repository of gumstix packages seems to be missing stuff in the uclib versions. I need some coffee so I can think somewhat more clearly. Trying to do tech stuff while barely awake is too distracting. I am suffering from severe caffeine deficiency at the moment... :O Last edited by geekmaster; 05-10-2016 at 11:05 AM. |
|
05-10-2016, 11:10 AM | #73 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Would the current 1.2.1 firmware be packed as a full image also?
|
05-10-2016, 11:29 AM | #74 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
1.2.1 is a tiny update file, so no... Probably just the cacert update and a small number of other trinkets... 1.2 is full sized though, and has "full flash" scripts (even with flash images for some of its peripheral devices). I also unpacked the update.bin files that are created when you unpack the main 1.2 update.bin (it is a multi-stage install). However, the rootfs seems a bit anemic to me...
Last edited by geekmaster; 05-10-2016 at 11:31 AM. |
05-10-2016, 12:30 PM | #75 |
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
|
I couldn't loop mount the root_fs.img so found the tool unsquashfs in the squashfs-tools.deb will unpack the root_fs.img filesystem without needing to be loop mounted.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
geekmaster vacation | geekmaster | Kindle Developer's Corner | 2 | 03-19-2012 09:18 PM |