09-02-2012, 06:19 PM | #31 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
That is how you access the busybox functions without links. PS: It will work that way before you mount /proc, that is how you have to use it from initramfs to do the mounting of /proc. But does it work with the helper scripts. export PATH=/mnt/us/bin:$PATH man test You may have to strace that to see that it is reading your helper script and the new busybox. |
|
09-02-2012, 07:15 PM | #32 |
( ͡° ͜ʖ ͡°){ʇ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
|
there is no man in the other busybox.
that's why I used it for the test. Will do the strace now |
Advert | |
|
09-02-2012, 07:19 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
|
Quote:
man: no manual entry for 'test' Is a result. simple : ) Last edited by twobob; 09-02-2012 at 07:21 PM. Reason: pesky long paths |
|
09-02-2012, 07:26 PM | #34 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
|
09-02-2012, 07:31 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
|
but not so for the things it already has function for...
root@kindle:bin> ./grep BusyBox v1.20.2 (2012-09-02 18:22:56 BST) multi-call binary. root@kindle:bin> grep BusyBox v1.7.2 (2011-09-08 21:57:14 PDT) multi-call binary Hmm... interesting. root@kindle:bin> echo $PATH /mnt/us/usr/local/bin:/mnt/us/usr/bin:/mnt/us/bin:/mnt/us/usr/sbin:/mnt/us/sbin:\ /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/mnt/us/home/root Hmm... erm.. hmm.. root@kindle:bin> find / -name grep /mnt/us/bin/grep /bin/grep Last edited by twobob; 09-02-2012 at 07:34 PM. |
Advert | |
|
09-02-2012, 07:36 PM | #36 |
( ͡° ͜ʖ ͡°){ʇ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
|
Is there a "prefer real binaries over scripts" type thing going on?
confused. |
09-02-2012, 07:52 PM | #37 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Previously reported by geekmaster. What is happening, is the command line processor (ash) **IS** busybox, and the built-in is being detected / selected **before** any path search is made. Hmm... There might be a "perfer built-ins" config option in the original Busybox build that did that. You can delete the sym-link to the original Busybox to fix that, if willing to alter the system files. Note: When the /mnt/us part of the file tree is displayed to the user in "storage mode" - I don't think that the main system can access it. Note 2: The above was one of the reasons behind my wanting to try the various shared file system on the K3 - So that "user storage" could be both exported and used internally, concurrently, rather than switched between internal and external use. Last edited by knc1; 09-02-2012 at 08:02 PM. |
|
09-02-2012, 07:59 PM | #38 |
( ͡° ͜ʖ ͡°){ʇ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
|
okay I think I get you.
It swallows up the bash commands before they get processed. Hmm.. Sounds like an horrific alias hack could fix that. BUT... that probably really would complicate matters. and on top of that I'm fairly sure the alias list exists in a shared memory space with the bash history and possibly a few other bits, meaning if I strew it with 90 aliases things may start to die in strange ways... There must be a better solution... thinking now... |
09-02-2012, 08:04 PM | #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
|
solution found
root@kindle:bin> busybox grep BusyBox v1.20.2 (2012-09-02 18:22:56 BST) multi-call binary. simply prefix with the word busybox. boom. That's got to be easy enough now to convince *all* calls to be prefixed by that - hmm... binfrmt_misc hack perhaps. Last edited by twobob; 09-02-2012 at 08:06 PM. |
09-02-2012, 08:10 PM | #40 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Unless you happen to be running a copy of bash that you installed. ash is the command processor provided by Busybox and a considerable different feature set. But yes, that is what happens (the recognized command never "gets out" of the command line scanner) I.E: Like bash selects built-ins over externals, ash selects busybox built-ins over externals (when optioned the way the K3 one is). Last edited by knc1; 09-02-2012 at 08:13 PM. |
|
09-02-2012, 08:34 PM | #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
|
hmm, this is true but JUST MAYBE I can convince it otherwise with some aliases, it's worth a pop. I'll give it a go now.
touch /mnt/us/.alias; cd /mnt/us/bin; for filename in * ; do echo "alias "${filename}"='busybox "${filename}"'" >> /mnt/us/.alias; done; cd /mnt/us/sbin; for filename in * ; do echo "alias "${filename}"='busybox "${filename}"'" >> /mnt/us/.alias; done; For a quickie test perhaps... Spoiler:
THIS LIST IS INCOMPLETE AND MADE IN ABOUT 5 SECONDS!!! it needs to be checked and amended. you have been warned. Last edited by twobob; 09-02-2012 at 09:26 PM. Reason: .alias is a better name |
09-02-2012, 08:51 PM | #42 |
( ͡° ͜ʖ ͡°){ʇ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:root> . /mnt/us/aliases
root@kindle:root> grep BusyBox v1.20.2 (2012-09-02 18:22:56 BST) multi-call binary. boom I have no idea why I keep saying that. must go get more tea [root@kindle root]# bash --help BusyBox v1.20.2 (2012-09-02 18:22:56 BST) multi-call binary. Usage: bash [-/+OPTIONS] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS]] Unix shell interpreter Last edited by twobob; 09-02-2012 at 09:24 PM. |
09-02-2012, 09:19 PM | #43 | |
( ͡° ͜ʖ ͡°){ʇ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
|
well. that was easy
root@kindle:root> exit Connection to k closed. me@dev ~ $ ssh root@k Quote:
(Future reader: Don't look you don't have one, I added it /etc/passwd - read the docs) and stick PATH=/mnt/us/usr/local/bin:/mnt/us/usr/bin:/mnt/us/bin:/mnt/us/usr/sbin:/mnt/us/sbin:\ /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/mnt/us/home/root in my /home/root/.bashrc (err you don't have one of them either) and my myts .bashrc simply now contains . /home/root/.bashrc - bliss Guess we could strap something similar together for a sketchy runtime or just replace the busybox outright one day when it is tested into the ground. Anyways for now I have a fully working busybox 1.20.blah with all the relevant calls ported BEFORE the shell gets a chance to steal them. Happy days. what's next? : ) Last edited by twobob; 09-02-2012 at 09:34 PM. |
|
09-02-2012, 10:28 PM | #44 | |
( ͡° ͜ʖ ͡°){ʇ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
|
um... I forgot to include inetd support. duh.
recompiled it now with the new support in. EDIT: As penance I added a readme and the .alias file for ease of use. uploaded new zip (tar gz was too big) [root@kindle bin]# inetd --help Quote:
Last edited by twobob; 09-02-2012 at 10:46 PM. |
|
09-03-2012, 12:14 AM | #45 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
I think you are now months ahead of anyone making use of all the new features available.
I recall reading that several people where going to try to mount Windows shares, but don't recall anyone reporting success/fail. Now with inetd and a larger selection of built-in servers ... To enable a service: Add a line to the iptables rules to "accept" incoming connections on <some> port. Add a line to the inetd that starts a service on that <some> port when a connection is made. Sorry, still haven't read the list of features in the new Busybox - But I expect there is at least ftpd, telnetd, httpd, ... Repeat the above for each service desired to start on demand. Hmm... I guess one (or more) of our "launcher" authors could put an enable/disable toggle for each of the services (I.E: each of the firewall rules) in their end-user GUI. As twobob wrote a few weeks ago, he and I are just posting what we find as we try to learn how to build any-app for a K3 ; We don't have the slightest clue if, when or how end-users might make use of this stuff. N.O.J. Well, almost. We do have an agenda here. There are a few specific things we want to have for our own uses. But most of this stuff is just what falls off the end of the truck while racing around the learning curve(s). |
Tags |
busybox |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kobo runs linux and busybox | billingd | Kobo Reader | 32 | 04-03-2011 11:19 AM |
configuring text to speech | hpratt | Amazon Kindle | 1 | 06-28-2010 02:34 PM |
Configuring? | rachangua | PocketBook | 3 | 05-15-2010 04:33 AM |
Updating Busybox | Adam B. | iRex | 14 | 10-23-2008 11:18 AM |
Cybook source code released (kernel and busybox) | dottedmag | Gen3 Developer's Corner | 14 | 09-12-2008 05:59 AM |