06-12-2014, 03:08 PM | #31 |
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
|
@hawhill: Nope, you're totally right ;D.
Why make it simple when I can do weird stuff instead? |
06-12-2014, 05:25 PM | #32 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Thanks everybody for the help so far.
Have banged my head against the wall all I wish to today - So here goes a slightly broken V-0.2 for the world to try out. Last edited by knc1; 06-12-2014 at 05:50 PM. |
Advert | |
|
06-12-2014, 08:09 PM | #33 |
( ͡° ͜ʖ ͡°){ʇ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
|
Got files.
Realised I am too stupid to test them. What am I doing? *Reads thread again* |
06-12-2014, 10:14 PM | #34 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Nitpick, nitpick
Quote:
Presuming you have an ssh connection to your device (K4 ... newer) that is named: kpw *) unpack archive on PC (probably as root {sudo}) *) find in directory that archive was unpacked into: 'extensions' *) scp -r extensions kpw:/mnt/us *) ssh kpw *) export PATH=/mnt/us/extensions/system/bin:/mnt/us/extensions/system/usr/bin:$PATH *) now - it should all 'just work' - should not need any LD_LIBRARY_PATH settings (although you can use that if required). Exception, example that to use new busybox requires the 'busybox arguments' format: ls --help <<--- see message header? that's the old (soft float) BB busybox ls --help <<-- check header, that's v-1.22.1 (hard float) And lua (or luac) is just lua (luac). Will work on fixing this busybox build this weekend. If something seems to go wrong, then: LD_DEBUG=libs busybox ls --help (or anything else with LD_DEBUG set to something) should prove interesting. Also: LD_DEBUG=libs lua Will show most of the (new) system libraries being loaded. lua's internal number type is double, so do some math functions (from libm.so) - which (if it doesn't blow up) shows that the hard float argument passing is working. (and just using the interpeter input tests libreadline and libhistory) Reminder - to exit lua, enter: os.exit(0) Note: You will see one Amazon library being loaded: /usr/lib/libenvload.so That is currently expected and assumed to be harmless. Last edited by knc1; 06-12-2014 at 10:34 PM. |
|
06-12-2014, 10:46 PM | #35 |
( ͡° ͜ʖ ͡°){ʇ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
|
I get -sh: /mnt/us/extensions/system/bin/busybox: not found
I'll try again tomorrow. maybe I goofed. |
Advert | |
|
06-12-2014, 11:01 PM | #36 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
|
06-12-2014, 11:12 PM | #37 |
( ͡° ͜ʖ ͡°){ʇ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
|
I believe "not found" in this case refers to "cant be run." Ill double check
Last edited by twobob; 06-12-2014 at 11:16 PM. |
06-13-2014, 12:28 AM | #38 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
The whole point of this exercise is that you do not need anything set in LD_LIBRARY_PATH. That information is now moved into the elf format binaries. (AH, both of them, there are only two at the moment, busybox and lua). Run either of those (the ones stored on /mnt/us/extensions/system/*) and everything else is "automagically", dynamically linked with the hard float libraries. Run either of those (stored in the Amazon image) and everything is "automagically", dynamically linked with the soft float libraries. Neat? Right? (In fact, /mnt/us/extensions/system/* tree may hold **both** types of binaries - at the same time.) With this set-up, it should be possible to take an application binary packaged for Debian/Jessie, open, diddle elf headers, then drop into /mnt/us/extensions/system/* and it will "just work". |
|
06-13-2014, 03:05 AM | #39 | |||
( ͡° ͜ʖ ͡°){ʇ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
|
PW:
Quote:
hhmm KT: Quote:
-sh: /mnt/us/extensions/system/usr/bin/lua: not found I did manage to get a: Quote:
OTHER KT: Same. hmmm... *scratches head* Last edited by twobob; 06-13-2014 at 03:45 AM. |
|||
06-13-2014, 03:50 AM | #40 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
It will be morning here in another 6 hours - take a break for the moment.
Hmm... I did see that message during my testing. It could be a simple matter of my shipping the wrong binaries. For reference, this is the intended set of binary's headers: Spoiler:
The earlier, broken set, would have an $ORIGIN in the path to the interperater: I.E: the correct entry is: Code:
[Requesting program interpreter: /mnt/us/extensions/system/lib/ld-linux-armhf.so.3] Also, in the middle of the night, I realized I have mis-used the $ORIGIN in the libraries search paths. I will get out a v-0.2.1 fixing the library search paths ASAP. (that's easy, I just have to fix the helper scrips and run them again.) A fixed busybox build may have to wait until v-0.2.2 (this weekend). Thanks for your help. Last edited by knc1; 06-13-2014 at 04:00 AM. |
06-13-2014, 04:24 AM | #41 |
( ͡° ͜ʖ ͡°){ʇ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
|
[root@kindle lib]# LD_DEBUG=libs grep -v
SNIP Code:
11573: find library=ld-linux-armhf.so.3 [0]; searching 11573: search path=/mnt/us/extensions/system/lib:/usr/local/lib/tls/v7l/neon/vfp:/usr/local/lib/tls/v7l/neon:/usr/local/lib/tls/v7l/vfp:/usr/local/lib/tls/v7l:/usr/local/lib/tls/neon/vfp:/usr/local/lib/tls/neon:/usr/local/lib/tls/vfp:/usr/local/lib/tls:/usr/local/lib/v7l/neon/vfp:/usr/local/lib/v7l/neon:/usr/local/lib/v7l/vfp:/usr/local/lib/v7l:/usr/local/lib/neon/vfp:/usr/local/lib/neon:/usr/local/lib/vfp:/usr/local/lib (LD_LIBRARY_PATH) 11573: trying file=/mnt/us/extensions/system/lib/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/tls/v7l/neon/vfp/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/tls/v7l/neon/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/tls/v7l/vfp/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/tls/v7l/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/tls/neon/vfp/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/tls/neon/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/tls/vfp/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/tls/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/v7l/neon/vfp/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/v7l/neon/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/v7l/vfp/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/v7l/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/neon/vfp/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/neon/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/vfp/ld-linux-armhf.so.3 11573: trying file=/usr/local/lib/ld-linux-armhf.so.3 Code:
grep: error while loading shared libraries: ld-linux-armhf.so.3: cannot open shared object file: No such file or directory [root@kindle lib]# LD_DEBUG=libs /mnt/us/extensions/system/bin/busybox -sh: /mnt/us/extensions/system/bin/busybox: not found [root@kindle lib]# cd /mnt/us/extensions/system/bin [root@kindle bin]# LD_DEBUG=libs ./busybox -sh: ./busybox: not found seems to not be finding it or not finding something it can use anyhow. Last edited by twobob; 06-13-2014 at 04:33 AM. |
06-13-2014, 08:38 AM | #42 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Hmm...
On my K5-Paperwhite (with the libraries I thought I shipped): Code:
[root@kindle bin]# LD_DEBUG=libs ./busybox 5772: find library=libc.so.6 [0]; searching 5772: search path= too long, not interesting: :/mnt/us/extensions/system/bin/../usr/lib (RUNPATH from file ./busybox) 5772: trying file=/mnt/us/extensions/system/bin/../lib/tls/v7l/neon/vfp/libc.so.6 5772: trying file=/mnt/us/extensions/system/bin/../lib/tls/v7l/neon/libc.so.6 5772: trying file=/mnt/us/extensions/system/bin/../lib/tls/v7l/vfp/libc.so.6 5772: trying file=/mnt/us/extensions/system/bin/../lib/tls/v7l/libc.so.6 5772: trying file=/mnt/us/extensions/system/bin/../lib/tls/neon/vfp/libc.so.6 5772: trying file=/mnt/us/extensions/system/bin/../lib/tls/neon/libc.so.6 5772: trying file=/mnt/us/extensions/system/bin/../lib/tls/vfp/libc.so.6 5772: trying file=/mnt/us/extensions/system/bin/../lib/tls/libc.so.6 5772: trying file=/mnt/us/extensions/system/bin/../lib/v7l/neon/vfp/libc.so.6 5772: trying file=/mnt/us/extensions/system/bin/../lib/v7l/neon/libc.so.6 5772: trying file=/mnt/us/extensions/system/bin/../lib/v7l/vfp/libc.so.6 5772: trying file=/mnt/us/extensions/system/bin/../lib/v7l/libc.so.6 5772: trying file=/mnt/us/extensions/system/bin/../lib/neon/vfp/libc.so.6 5772: trying file=/mnt/us/extensions/system/bin/../lib/neon/libc.so.6 5772: trying file=/mnt/us/extensions/system/bin/../lib/vfp/libc.so.6 5772: trying file=/mnt/us/extensions/system/bin/../lib/libc.so.6 5772: 5772: 5772: calling init: /mnt/us/extensions/system/bin/../lib/libc.so.6 5772: 5772: 5772: calling init: /usr/lib/libenvload.so 5772: 5772: 5772: initialize program: ./busybox 5772: 5772: 5772: transferring control: ./busybox 5772: BusyBox v1.22.1 (2014-06-11 02:23:01 CDT) multi-call binary. BusyBox is copyrighted by many authors between 1998-2012. Licensed under GPLv2. See source distribution for detailed copyright notices. Usage: busybox [function [arguments]...] or: busybox --list[-full] or: busybox --install [-s] [DIR] or: function [arguments]... BusyBox is a multi-call binary that combines many common Unix utilities into a single executable. Most people will create a link to busybox for each function they wish to use and BusyBox will act like whatever it was invoked as. Currently defined functions: [, [[, addgroup, adduser, ar, arping, ash, awk, basename, blkid, bunzip2, bzcat, cat, catv, chattr, chgrp, chmod, chown, chroot, chrt, chvt, cksum, clear, cmp, cp, cpio, crond, crontab, cut, date, dc, dd, deallocvt, delgroup, deluser, devmem, df, diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap, echo, egrep, eject, env, ether-wake, expr, false, fdflush, fdformat, fgrep, find, fold, free, freeramdisk, fsck, fstrim, fuser, getopt, getty, grep, gunzip, gzip, halt, hdparm, head, hexdump, hostid, hostname, hwclock, id, ifconfig, ifdown, ifup, inetd, init, insmod, install, ip, ipaddr, ipcrm, ipcs, iplink, iproute, iprule, iptunnel, kill, killall, killall5, klogd, last, less, linux32, linux64, linuxrc, ln, loadfont, loadkmap, logger, login, logname, losetup, ls, lsattr, lsmod, lsof, lspci, lsusb, lzcat, lzma, makedevs, md5sum, mdev, mesg, microcom, mkdir, mkfifo, mknod, mkswap, mktemp, modprobe, more, mount, mountpoint, mt, mv, nameif, netstat, nice, nohup, nslookup, od, openvt, passwd, patch, pidof, ping, pipe_progress, pivot_root, poweroff, printenv, printf, ps, pwd, rdate, readlink, readprofile, realpath, reboot, renice, reset, resize, rm, rmdir, rmmod, route, run-parts, runlevel, sed, seq, setarch, setconsole, setkeycodes, setlogcons, setserial, setsid, sh, sha1sum, sha256sum, sha3sum, sha512sum, sleep, sort, start-stop-daemon, strings, stty, su, sulogin, swapoff, swapon, switch_root, sync, sysctl, syslogd, tail, tar, tee, telnet, test, tftp, time, top, touch, tr, traceroute, true, tty, udhcpc, umount, uname, uniq, unix2dos, unlzma, unxz, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, watch, watchdog, wc, wget, which, who, whoami, xargs, xz, xzcat, yes, zcat 5772: 5772: calling fini: ./busybox [0] 5772: 5772: 5772: calling fini: /usr/lib/libenvload.so [0] 5772: [root@kindle bin]# Your trace shows it not found in the hard-float package and is then searching for the soft-float version (which should have worked - but I didn't test it). The only thing in the shipped package in */bin is busybox (one (1) file). Aw, so! Did you: rm -fr /mnt/us/extensions/system before you copied in the new hard-float stuff? (mine was empty) There may be a conflict with what you already had in there. Or with alias'es set-up in your root environment (mine had none). Do (still) have root's profile set-up with an alias grep="something evil" ?? Last edited by knc1; 06-13-2014 at 09:02 AM. |
06-13-2014, 10:36 AM | #43 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Version 0.2.1 Posted
Top post and attachments updated with v-0.2.1 stuff.
|
06-13-2014, 08:52 PM | #44 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
@twobob:
I re-configured and re-built BusyBox -
Built and installed a copy of V-0.2.2 - And what happened? I broke my own system, somehow. I.E: I confirmed your own results with V-0.2.1 - - - - - - Terminal #1: core2quad ~ $ ssh kpw ################################################# # N O T I C E * N O T I C E * N O T I C E # ################################################# Rootfs is mounted read-only. Invoke mntroot rw to switch back to a writable rootfs. ################################################# [root@kindle root]# cd /mnt/us/extensions [root@kindle extensions]# rm -fr system [root@kindle extensions]# Terminal #2: core2quad ~ $ mkdir wrk core2quad ~ $ cd wrk Code:
core2quad wrk $ ls -l ../BR_Working/base-0.2.2-a8_armhf_vfpv3d16.tar.gz -rw-r--r-- 1 mszick mszick 2312755 2014-06-13 15:49 ../BR_Working/base-0.2.2-a8_armhf_vfpv3d16.tar.gz core2quad wrk $ tar --extract --file=../BR_Working/base-0.2.2-a8_armhf_vfpv3d16.tar.gz extensions core2quad wrk $ scp -r extensions kpw:/mnt/us Spoiler:
100% 47 0.1KB/s 00:00
core2quad wrk $ Terminal #1: [root@kindle extensions]# ls -l system/* Spoiler:
[root@kindle extensions]# ls -l system/usr/* Spoiler:
[root@kindle extensions]# cd [root@kindle root]# export PATH=/mnt/us/extensions/system/bin:/mnt/us/extensions/system/sbin:/mnt/us/extensions/system/usr/bin:/ mnt/us/extensions/system/usr/sbin:$PATH [root@kindle root]# echo $LD_LIBRARY_PATH [root@kindle root]# busybox BusyBox v1.17.1 (2013-01-08 21:45:52 PST) multi-call binary. Spoiler:
[root@kindle root]# ls -l /mnt/us/extensions/system/bin/busybox Code:
-rwxr-xr-x 1 root root 572596 Oct 19 13:08 /mnt/us/extensions/system/bin/busybox Fri Oct 19 13:18:46 CEST 2012 [root@kindle root]# /mnt/us/extensions/system/bin/busybox -sh: /mnt/us/extensions/system/bin/busybox: not found [root@kindle root]# cd /mnt/us/extensions/system/bin [root@kindle bin]# ./busybox -sh: ./busybox: not found [root@kindle bin]# ls -l ./busybox -rwxr-xr-x 1 root root 572596 Oct 19 13:08 ./busybox [root@kindle root]# Will be working on that this weekend. |
06-13-2014, 11:30 PM | #45 |
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
|
If that helps, that's what happens when the kernel can't even run the binary (wrong arch, possibly fatally wrong CPU tuning, although that should SIGILL instead).
|
Tags |
armhf |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle Nicknaming Scheme, Using Kindle with Calibre, and Hacking the Kindle | Klif | Amazon Kindle | 11 | 09-12-2012 05:11 PM |
$0.01 in Kindle Store: Interactive Sudoku for Kindle 2 and Kindle DX - Volume 1 | Xia | Deals and Resources (No Self-Promotion or Affiliate Links) | 2 | 11-07-2009 10:06 AM |