diff options
author | Rob Landley <rob@landley.net> | 2020-08-07 02:25:50 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2020-08-07 02:25:50 -0500 |
commit | efb8060a591b6ed13c16c4034db43652e03f90d5 (patch) | |
tree | bd8d2bcb3ea994a1d9bbcf0481d8185d16c9ef2e /www | |
parent | 1d67afafcec61ef5e0bb743b174a450d1c4c7a1e (diff) | |
download | toybox-efb8060a591b6ed13c16c4034db43652e03f90d5.tar.gz |
People have been having trouble finding the toybox web page (despite being
the first google hit for "android toybox"), and want toybox --help to
mention it. I was referred to https://github.com/landley/toybox/issues/50
So add a URL to toybox --help. While I was there, make unrecognized commands
(like toybox -?) suggest "toybox --help", move the install instructions
to the FAQ page (with a second link from toybox --help), and generally
tighten up the help text. Also, "toybox -*" is no longer a synonym for --long.
Oh, and I fixed some build dependencies when Config.in changes.
Diffstat (limited to 'www')
-rwxr-xr-x | www/faq.html | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/www/faq.html b/www/faq.html index ffc90d86..3072b80e 100755 --- a/www/faq.html +++ b/www/faq.html @@ -17,6 +17,7 @@ <ul> <!-- get binaries --> +<li><h2><a href="#install">How do I install toybox?</h2></li> <li><h2><a href="#cross">How do I cross compile toybox?</h2></li> <li><h2><a href="#system">Where does toybox fit into the Linux/Android ecosystem?<br /> @@ -237,6 +238,34 @@ instead of the toybox version (in theory they should work the same), and VERBOSE=1 to see diffs of the expected and actual output when a test fails (VERBOSE=fail to stop at the first such failure)</p> +<a name="install" /> +<h2>Q: How do I install toybox?</h2> + +<p>A: +Multicall binaries like toybox behave differently based on the filename +used to call them, so if you "mv toybox ls; ./ls" it acts like ls. Creating +symlinks or hardlinks and adding them to the $PATH lets you run the +commands normally by name.</p> + +<p>If you already have a <a href=https://landley.net/toybox/downloads/binaries/>toybox binary</a> +you can install a tree of command symlinks living in +<a href=http://git.musl-libc.org/cgit/musl/tree/include/paths.h>the +standard path</a> +locations (<b>export PATH=/bin:/usr/bin:/sbin:/usr/sbin</b>) by doing:</p> + +<blockquote><p><b>for i in $(/bin/toybox --long); do ln -s /bin/toybox $i; done</b></p></blockquote> + +<p>or you can install all the symlinks in the same directory as the toybox binary +(<b>export PATH="$PWD:$PATH"</b>) via:</p> + +<blockquote><p><b>for i in $(./toybox); do ln -s toybox $i; done</b></p></blockquote></p> + +<p>When building from source, use the "<b>make install</b>" and +"<b>make install_flat</b>" +targets with an appropriate <b>PREFIX=/path/to/new/directory</b> either +exported or on the make command line +(as mentioned in "<b>make help</b>" output).</p> + <a name="cross" /> <h2>Q: How do I cross compile toybox?</h2> |