08-13-2012, 04:32 AM | #16 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Hmm...
But running the loader directly as described in its own message might well be the solution to a question posed by GM in another thread about getting add-in programs in /mnt/us to reference the proper combination of new libraries and existing Amazon libraries. I.E: Just script the program load function as above. |
08-13-2012, 09:05 AM | #17 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
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
|
Thanks mate. as ever you bring me the good info. I thank you very kindly.
[root@kindle root]# /lib/ld-linux.so.3 --list /mnt/us/local/lib/libstdc\+\+.so.6 libm.so.6 => /lib/libm.so.6 (0x400da000) libc.so.6 => /lib/libc.so.6 (0x4014f000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40265000) /lib/ld-linux.so.3 (0x2a000000) [root@kindle root]# |
08-13-2012, 09:10 AM | #18 | |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
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
|
Quote:
I welcome the day this info is so commonplace it hangs from the trees like fruit at the moment it seems to be a few degrees of separation away for my part I am going to try to learn to either pass the correct CFLAGS in before compilation or to weld them in afterwards. --library-path PATH use given PATH instead of content of the environment variable LD_LIBRARY_PATH to some degree looks to me my friend here... goes off to read things. again. ; ) http://linux.die.net/man/8/ld-linux (ld-linux(8) - Linux man page) Last edited by twobob; 08-13-2012 at 09:36 AM. Reason: added what I am reading. this is an e-reader site after all |
|
08-13-2012, 09:18 AM | #19 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Check from a command line in a working K3, see if this directory exists:
Code:
core2quad ~ $ ls -ld /proc/sys/fs/binfmt_misc drwxr-xr-x 2 root root 0 2012-08-11 20:58 /proc/sys/fs/binfmt_misc insmod binfmt_misc and then check if the directory exists. If so, we should be able to just register the uClibc loader with it for running uClibc linked programs under a glibc system. **should** May take a bit of experimentation to make it work. |
08-13-2012, 09:31 AM | #20 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
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
|
libm.so lives in /usr/bin ok a K3?
[root@kindle fs]# /lib/ld-linux.so.3 --list /usr/bin/libm.so /lib/ld-linux.so.3 (0x2a000000) libc.so.6 => /lib/libc.so.6 (0x4007a000) hmmm m´okay Last edited by twobob; 08-13-2012 at 12:51 PM. |
08-13-2012, 09:32 AM | #21 | |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
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
|
Quote:
[root@kindle fs]# ls Code:
aio-max-nr file-nr leases-enable overflowuid aio-nr inode-nr mqueue suid_dumpable dentry-state inode-state nfs dir-notify-enable inotify nr_open file-max lease-break-time overflowgid [root@kindle fs]# insmod binfmt_misc insmod: can't read 'binfmt_misc': No such file or directory Is a no. Last edited by twobob; 08-13-2012 at 09:58 AM. Reason: For Matt |
|
08-13-2012, 09:39 AM | #22 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Hmm... I guess we would have to build that module for the kernel and add it into the module directory ourselves.
|
08-13-2012, 09:46 AM | #23 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
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
|
Spoiler:
Some LD_LIBRARY_PATH stuff in practice: [root@kindle lib]# pwd /mnt/us/lib [root@kindle lib]# ls ld-2.15.so libm-2.15.so libpthread.so.0 ld-linux.so.3 libm.so.6 libresolv-2.15.so libc-2.15.so libnsl-2.15.so libresolv.so.2 libc.so.6 libnsl.so.1 librt-2.15.so libcrypt-2.15.so libnss_dns-2.15.so librt.so.1 libcrypt.so.1 libnss_dns.so.2 libutil-2.15.so libdl-2.15.so libnss_files-2.15.so libutil.so.1 libdl.so.2 libnss_files.so.2 libgcc_s.so.1 libpthread-2.15.so (some I made earlier) [root@kindle lib]# /lib/ld-linux.so.3 --list ./libm.so.6 /lib/ld-linux.so.3 (0x2a000000) libc.so.6 => /lib/libc.so.6 (0x400a7000) [root@kindle lib]# echo $LD_LIBRARY_PATH (blank response by default) [root@kindle lib]# export LD_LIBRARY_PATH=/mnt/us/usr/lib:/mnt/us/lib:/lib:/usr/lib [root@kindle lib]# echo $LD_LIBRARY_PATH /mnt/us/lib:/mnt/us/usr/lib:/lib:/usr/lib:/usr/bin [root@kindle lib]# /lib/ld-linux.so.3 --list ./libm.so.6 /lib/ld-linux.so.3 (0x2a000000) libc.so.6 => /mnt/us/lib/libc.so.6 (0x400a7000) Tidy up again [root@kindle lib]# export LD_LIBRARY_PATH= [root@kindle lib]# /lib/ld-linux.so.3 --list ./libm.so.6 /lib/ld-linux.so.3 (0x2a000000) libc.so.6 => /lib/libc.so.6 (0x400ab000) Looks simple enough This is just some notes for me to read about kABI-tracking kmod. or you if you want to. Spoiler:
And [root@kindle /etc]# ls mod* modprobe.conf modules modules.conf modules.luigi [root@kindle /etc]# ls *.so.* ld.so.cache ld.so.conf For my reference and future understanding http://blog.gustavobarbieri.com.br/2...lp-testing-it/ http://lwn.net/Articles/475821/ http://git.profusion.mobi/cgit.cgi/kmod.git/ Last edited by twobob; 08-13-2012 at 12:08 PM. Reason: i was wrong. I try to be wrong about once a day minimum |
08-13-2012, 12:19 PM | #24 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
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
|
doing something. why not.
Doing something to see what would happen.
Why not. I don't expect this to 'Work', I'm digging cp * my /home/me/BLDS/Interim-STATIC/usr files via sftp to kindle sftp://root@k/mnt/us/ These files are extracted from a completed buildroot image /usr directory Get obvious ln -s errors Spoiler:
see what survived [root@kindle usr]# cd /mnt/us/usr/bin [root@kindle bin]# ls Spoiler:
[root@kindle bin]# strace -o output.perl ./microperl Segmentation fault [root@kindle bin]# vi output.perl Spoiler:
Interesting stuff! [root@kindle bin]# strace -o output.opkg ./opkg-cl --help Segmentation fault Spoiler:
Last edited by twobob; 08-13-2012 at 12:26 PM. Reason: added what and from where |
08-13-2012, 12:28 PM | #25 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
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
|
EDIT: THIS CAN BE FIXED - ASSUMING YOU BUiLT WITH CS TC 2006q3 - BY SIMPLY DELETING THE LOCAL VERSION OF C library - YOUR LOCAL VERSION = NOT THE KINDLES!!! Thanks
back to the threads: ------------------------------------------------------------------------------------------- All look like fails on a threading library. see I can reference the right library with/without threading perhaps. http://www.akkadia.org/drepper/assumekernel.html Continues reading. Building the x-compiler pass 'n'ty-hundred and 'n'ty here we go! : )~ This time against 2.6.26 headers. [EXTRA] Configuring final compiler [EXTRA] Building final compiler [EXTRA] Installing final compiler [INFO ] Installing final compiler: done in 1327.73s (at 36:47) ouchy 36 mins : ) lol Last edited by twobob; 08-22-2012 at 09:03 AM. Reason: added fix that is now known |
08-13-2012, 03:56 PM | #26 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Ulrich Drepper, 2004-5-12
From back in the days of libc4 (which did not last long), shifting over to libc5 with libc6 on the immediate horizon and three different threading libraries. Hey, you think you have library problems now? Those where the days when getting Linux to just load a program was a lot of fun. It upset one person (Eric Anderson) enough that he started writing his own C library (uClibc). |
08-13-2012, 10:03 PM | #27 | |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
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
|
Quote:
That sounds like it needed noting here. Kudos all. |
|
08-13-2012, 10:07 PM | #28 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
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
|
Building the 3.3 of the 2.6.26 via Buildroot? Err really?
Spoiler:
AND THE NEXT DAY: Open buildroot: open buildroot build folder you have setup. see buildroot docs, dont HAVE to make one but it's tidy up to you. cd that folder make xconfig (possibly with -C your buildroot folder - read buildroot docs) Configure: Arm blah blah More here later Custom Kernal Tarball: Enter URL linux-2.6.26-lab126.tar.bz2 of extracted from Kindle_src_3.3_611680021.tar.gz (host it yourself. find it online or just feed it via a local http) Enter custom patch (thank you Niluje - see below) Include Initramfs in choices of files (kernal build dies otherwise) and tarred (for easy access) Choose from options of software in list... (I chose hardly any as I want it to finish quick to let me manually interrupt the buildroot make process when the kernal comes around to building) Save it and close run make Either read the buildroot docs and do the specific steps to incrementally make up the the kernal - OR - just CTRL +C once you hit the kernal build the kindle kernel source code Kindle_src_3.3_611680021.tar.gz will have appeared unzipped in /build/linux-custom - go there. Edit the Makefile in /build/linux-custom ARCH ?= (SUBARCH) BECOMES ARCH ?= arm CROSS_COMPILE ?= BECOMES CROSS_COMPILE = arm-none-linux-gnueabi- (check your path has the bins in!) Save it and close run make imx35_luigi_defconfig to generate a .config file. Edit .config file search "CONFIG_INITRAMFS_SOURCE" with the reference to a skeleton change it to CONFIG_INITRAMFS_SOURCE="" (as in no value in quotes) add modules you might want to build etc. I added binfmt_misc as a module for example Save it and close One more thing: $ cat> include/linux/kindle_version.h << EOF # ifndef __KINDLE_VERSION_H__ # define __KINDLE_VERSION_H__ # define VERSION_TAG "000000" # endif EOF as this is not generated by the makes The mighty NiLuje has kindly provided https://svn.ak-team.com/svn/Configs/...buildfix.patch which comprises this kindle_version.s file creation and some make cleansing for the Amazon makes. It does not make the config so that step is still required, run make Should complete. You should be able to then go back and install MORE options in the make xconfig stage and run make again in your root buildroot folder to create the additional packages without having to repeat the kernal steps. I'm testing this theory. : ) hope that saves someone the 48hours it took me to put that together after all this time from translated docs and 2! google results on the subject. Almost a google whack Thanks to knc1, NiLuje, Hawhill, GM and everyone who put there time into getting an answer for building a more recent kernal for the 3 via the sources. With a little more reading this process could be far smoother. Static-er build also needs testing. I'll update the kindle image I'm sharing via dropbox to this one when I have the legal stuff put to bed. (erm I might have accidentally built a 20 Gb file install. bit over-zelaous with the qt4 examples so it will need cutting down A LOT and checking if the various bits can be shared in this way before anything changes) TODO busybox config: enable inetd and other "service" servers. rebuild kernal. oops Thanks for listening. Last edited by twobob; 08-14-2012 at 10:10 PM. Reason: added binfmt_misc as a module |
08-14-2012, 03:34 AM | #29 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
And when tomorrow comes. . . .
In the kernel menu config: binfmt_misc as a module ; In the busybox config: enable inetd and other "service" servers. |
08-30-2012, 11:03 PM | #30 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
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
|
Back on topic. Somewhat.
Further reading for the layman, Autotools: a practitioner's guide to Autoconf, Automake and Libtool http://www.freesoftwaremagazine.com/...tomake_libtool And the Authors blog for more Autotool details http://jcalcote.wordpress.com/tag/autotools/ Using this knowledge in the real world A helpful guide to realworld buildoot (it's a google doc) |
Tags |
compiling, development, issues, kindle, tools |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is there anyway to set a static IP address on the Kobo Wifi? | saladasalad | Kobo Reader | 3 | 07-11-2012 07:22 AM |
Content Download a static website to the kindle? | scotter | Amazon Kindle | 1 | 03-07-2011 06:52 PM |
Static screensaver | kindle79 | Amazon Kindle | 2 | 11-17-2010 02:51 PM |
Free Book (Kindle) - The Static of the Spheres | koland | Deals and Resources (No Self-Promotion or Affiliate Links) | 3 | 06-21-2010 06:24 AM |
Static IP grey out | rushkk | enTourage Archive | 1 | 06-04-2010 11:23 AM |