15bcc7ea10f4dc37f387d4951e67ba24887edaebcRob Landleymainmenu "Toybox Configuration" 25257cf54a5810105bc4a75703a06740d756d8e8landley 376ec485eb607b94b8a5d4cde85df606aa086ad94Rob Landley 476ec485eb607b94b8a5d4cde85df606aa086ad94Rob Landleysource generated/Config.probed 576ec485eb607b94b8a5d4cde85df606aa086ad94Rob Landleysource generated/Config.in 676ec485eb607b94b8a5d4cde85df606aa086ad94Rob Landley 776ec485eb607b94b8a5d4cde85df606aa086ad94Rob Landleycomment "" 876ec485eb607b94b8a5d4cde85df606aa086ad94Rob Landley 93a9241add947cb6d24b5de7a8927517426a78795Rob Landleymenu "Toybox global settings" 105257cf54a5810105bc4a75703a06740d756d8e8landley 11a8bee46cfebcf1ae9c3749b820c483054be81295Rob Landley# This entry controls the multiplexer, disabled for single command builds 122896480c4918f2accccb8301bec457a7bff7377eRob Landleyconfig TOYBOX 132896480c4918f2accccb8301bec457a7bff7377eRob Landley bool 14d04dc1feb92a279e27e4487c502944f454d43837Rob Landley default y 15d06c58df5c723594c4f214dd5d1842a178d2a5e1Rob Landley help 16cefc0a2183f57173dab47cf89fcb37e7a827f258Rob Landley usage: toybox [--long | --help | --version | [command] [arguments...]] 17d06c58df5c723594c4f214dd5d1842a178d2a5e1Rob Landley 1826c0045a6eb061e180f58b6b4c029a5df5a2818eRob Landley With no arguments, shows available commands. First argument is 192896480c4918f2accccb8301bec457a7bff7377eRob Landley name of a command to run, followed by any arguments to that command. 20d06c58df5c723594c4f214dd5d1842a178d2a5e1Rob Landley 218431692738dc14412c236ab4ebc6464463b6327aRob Landley --long Show path to each command 228431692738dc14412c236ab4ebc6464463b6327aRob Landley 238431692738dc14412c236ab4ebc6464463b6327aRob Landley To install command symlinks, try: 248431692738dc14412c236ab4ebc6464463b6327aRob Landley for i in $(/bin/toybox --long); do ln -s /bin/toybox $i; done 258431692738dc14412c236ab4ebc6464463b6327aRob Landley 26cefc0a2183f57173dab47cf89fcb37e7a827f258Rob Landley Most toybox commands also understand the following arguments: 27cefc0a2183f57173dab47cf89fcb37e7a827f258Rob Landley 28cefc0a2183f57173dab47cf89fcb37e7a827f258Rob Landley --help Show command help (only) 29cefc0a2183f57173dab47cf89fcb37e7a827f258Rob Landley --version Show toybox version (only) 30cefc0a2183f57173dab47cf89fcb37e7a827f258Rob Landley 31cefc0a2183f57173dab47cf89fcb37e7a827f258Rob Landley The filename "-" means stdin, "--" stops argument parsing, 32cefc0a2183f57173dab47cf89fcb37e7a827f258Rob Landley and numerical arguments accept a single letter suffix for 33cefc0a2183f57173dab47cf89fcb37e7a827f258Rob Landley kilo, mega, giga, tera, peta, and exabytes, plus an additional 34cefc0a2183f57173dab47cf89fcb37e7a827f258Rob Landley "d" to indicate decimal 1000's instead of 1024. 35cefc0a2183f57173dab47cf89fcb37e7a827f258Rob Landley 36e0377fb294821a68112d4da09f836ac42e3d5956Rob Landleyconfig TOYBOX_SUID 37e0377fb294821a68112d4da09f836ac42e3d5956Rob Landley bool "SUID support" 38e0377fb294821a68112d4da09f836ac42e3d5956Rob Landley default y 39e0377fb294821a68112d4da09f836ac42e3d5956Rob Landley help 4026c0045a6eb061e180f58b6b4c029a5df5a2818eRob Landley Support for the Set User ID bit, to install toybox suid root and drop 4126c0045a6eb061e180f58b6b4c029a5df5a2818eRob Landley permissions for commands which do not require root access. To use 4226c0045a6eb061e180f58b6b4c029a5df5a2818eRob Landley this change ownership of the file to the root user and set the suid 4326c0045a6eb061e180f58b6b4c029a5df5a2818eRob Landley bit in the file permissions: 4426c0045a6eb061e180f58b6b4c029a5df5a2818eRob Landley 4526c0045a6eb061e180f58b6b4c029a5df5a2818eRob Landley chown root:root toybox; chmod +s toybox 46e0377fb294821a68112d4da09f836ac42e3d5956Rob Landley 4708f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landleychoice 4808f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley prompt "Security Blanket" 4908f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley default TOYBOX_LSM_NONE 5008f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley help 5108f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley Select a Linux Security Module to complicate your system 5208f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley until you can't find holes in it. 5308f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley 5408f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landleyconfig TOYBOX_LSM_NONE 5508f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley bool "None" 5608f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley help 5708f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley Don't try to achieve "watertight" by plugging the holes in a 5808f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley collander, instead use conventional unix security (and possibly 5908f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley Linux Containers) for a simple straightforward system. 6008f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley 617e2af1c7489cbf974a57d482bb9d23c884d2aa49Elliott Hughesconfig TOYBOX_SELINUX 6208f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley bool "SELinux support" 6308f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley help 6408f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley Include SELinux options in commands such as ls, and add 6508f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley SELinux-specific commands such as chcon to the Android menu. 6608f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley 6708f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landleyconfig TOYBOX_SMACK 6808f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley bool "SMACK support" 6908f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley help 7008f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley Include SMACK options in commands like ls for systems like Tizen. 7108f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landley 7208f51b53be06671f4bd6f57467182fd2b081b2c4Rob Landleyendchoice 737e2af1c7489cbf974a57d482bb9d23c884d2aa49Elliott Hughes 74adef5dcb1857f524e2a24dd0223f31db7cd7a8b9Rob Landleyconfig TOYBOX_LIBCRYPTO 75adef5dcb1857f524e2a24dd0223f31db7cd7a8b9Rob Landley bool "Use libcrypto (OpenSSL/BoringSSL)" 76adef5dcb1857f524e2a24dd0223f31db7cd7a8b9Rob Landley default n 77adef5dcb1857f524e2a24dd0223f31db7cd7a8b9Rob Landley help 78adef5dcb1857f524e2a24dd0223f31db7cd7a8b9Rob Landley Use faster hash functions out of exteral -lcrypto library. 79adef5dcb1857f524e2a24dd0223f31db7cd7a8b9Rob Landley 80de3e5ea4fe9c42f27d442aa87b7d16e090e72485Elliott Hughesconfig TOYBOX_LIBZ 81de3e5ea4fe9c42f27d442aa87b7d16e090e72485Elliott Hughes bool "Use libz (zlib)" 82de3e5ea4fe9c42f27d442aa87b7d16e090e72485Elliott Hughes default n 83de3e5ea4fe9c42f27d442aa87b7d16e090e72485Elliott Hughes help 84de3e5ea4fe9c42f27d442aa87b7d16e090e72485Elliott Hughes Use libz for gz support. 85de3e5ea4fe9c42f27d442aa87b7d16e090e72485Elliott Hughes 86f01503d18a35c71706edf8b1801af55cfcb19733Rob Landleyconfig TOYBOX_FLOAT 87f01503d18a35c71706edf8b1801af55cfcb19733Rob Landley bool "Floating point support" 88f01503d18a35c71706edf8b1801af55cfcb19733Rob Landley default y 89f01503d18a35c71706edf8b1801af55cfcb19733Rob Landley help 90f01503d18a35c71706edf8b1801af55cfcb19733Rob Landley Include floating point support infrastructure and commands that 91f01503d18a35c71706edf8b1801af55cfcb19733Rob Landley require it. 92f01503d18a35c71706edf8b1801af55cfcb19733Rob Landley 9336ffc5aa3e6bfcab5d628208f4f1508f9b1c2620Rob Landleyconfig TOYBOX_HELP 94d683b17f4e106509753bc458178490a306988b8bRob Landley bool "Help messages" 9536ffc5aa3e6bfcab5d628208f4f1508f9b1c2620Rob Landley default y 9636ffc5aa3e6bfcab5d628208f4f1508f9b1c2620Rob Landley help 9736ffc5aa3e6bfcab5d628208f4f1508f9b1c2620Rob Landley Include help text for each command. 9836ffc5aa3e6bfcab5d628208f4f1508f9b1c2620Rob Landley 99953722e3826c779f261a4c8a3649e36b1333a86fRob Landleyconfig TOYBOX_HELP_DASHDASH 10029e75d51d447c5c0aae9834f5988b79a945c7accRob Landley bool "--help and --version" 101953722e3826c779f261a4c8a3649e36b1333a86fRob Landley default y 102953722e3826c779f261a4c8a3649e36b1333a86fRob Landley depends on TOYBOX_HELP 103953722e3826c779f261a4c8a3649e36b1333a86fRob Landley help 104953722e3826c779f261a4c8a3649e36b1333a86fRob Landley Support --help argument in all commands, even ones with a NULL 10529e75d51d447c5c0aae9834f5988b79a945c7accRob Landley optstring. (Use TOYFLAG_NOHELP to disable.) Produces the same output 10629e75d51d447c5c0aae9834f5988b79a945c7accRob Landley as "help command". --version shows toybox version. 107953722e3826c779f261a4c8a3649e36b1333a86fRob Landley 108250e0055fe0596f0f13d6e30f0bfe086702f5a25Felix Jandaconfig TOYBOX_I18N 10926c0045a6eb061e180f58b6b4c029a5df5a2818eRob Landley bool "Internationalization support" 110250e0055fe0596f0f13d6e30f0bfe086702f5a25Felix Janda default y 111250e0055fe0596f0f13d6e30f0bfe086702f5a25Felix Janda help 11226c0045a6eb061e180f58b6b4c029a5df5a2818eRob Landley Support for UTF-8 character sets, and some locale support. 113250e0055fe0596f0f13d6e30f0bfe086702f5a25Felix Janda 114de05a7024f4be6826d05c40aa029fe2bbf6d2818Rob Landleyconfig TOYBOX_FREE 1155257cf54a5810105bc4a75703a06740d756d8e8landley bool "Free memory unnecessarily" 1165257cf54a5810105bc4a75703a06740d756d8e8landley default n 1175257cf54a5810105bc4a75703a06740d756d8e8landley help 1185257cf54a5810105bc4a75703a06740d756d8e8landley When a program exits, the operating system will clean up after it 11926c0045a6eb061e180f58b6b4c029a5df5a2818eRob Landley (free memory, close files, etc). To save size, toybox usually relies 12026c0045a6eb061e180f58b6b4c029a5df5a2818eRob Landley on this behavior. If you're running toybox under a debugger or 1215257cf54a5810105bc4a75703a06740d756d8e8landley without a real OS (ala newlib+libgloss), enable this to make toybox 1225257cf54a5810105bc4a75703a06740d756d8e8landley clean up after itself. 1235257cf54a5810105bc4a75703a06740d756d8e8landley 124977e48e1626b3e3f1f1f9b14f05ffc11e252455fRob Landleyconfig TOYBOX_NORECURSE 125977e48e1626b3e3f1f1f9b14f05ffc11e252455fRob Landley bool "Disable recursive execution" 126977e48e1626b3e3f1f1f9b14f05ffc11e252455fRob Landley default n 127977e48e1626b3e3f1f1f9b14f05ffc11e252455fRob Landley help 128977e48e1626b3e3f1f1f9b14f05ffc11e252455fRob Landley When one toybox command calls another, usually it just calls the new 129977e48e1626b3e3f1f1f9b14f05ffc11e252455fRob Landley command's main() function rather than searching the $PATH and calling 130977e48e1626b3e3f1f1f9b14f05ffc11e252455fRob Landley exec on another file (which is much slower). 131977e48e1626b3e3f1f1f9b14f05ffc11e252455fRob Landley 132977e48e1626b3e3f1f1f9b14f05ffc11e252455fRob Landley This disables that optimization, so toybox will run external commands 133977e48e1626b3e3f1f1f9b14f05ffc11e252455fRob Landley even when it has a built-in version of that command. This requires 134977e48e1626b3e3f1f1f9b14f05ffc11e252455fRob Landley toybox symlinks to be installed in the $PATH, or re-invoking the 135977e48e1626b3e3f1f1f9b14f05ffc11e252455fRob Landley "toybox" multiplexer command by name. 136977e48e1626b3e3f1f1f9b14f05ffc11e252455fRob Landley 137de05a7024f4be6826d05c40aa029fe2bbf6d2818Rob Landleyconfig TOYBOX_DEBUG 1388324b89598b2aee0957a0378f0f63ff5755498beRob Landley bool "Debugging tests" 1398324b89598b2aee0957a0378f0f63ff5755498beRob Landley default n 1408324b89598b2aee0957a0378f0f63ff5755498beRob Landley help 141a8bee46cfebcf1ae9c3749b820c483054be81295Rob Landley Enable extra checks for debugging purposes. All of them catch 14239f2e91e8bea7288ea487a79e1dc8732cf511b4fRob Landley things that can only go wrong at development time, not runtime. 143a8bee46cfebcf1ae9c3749b820c483054be81295Rob Landley 144cb8e5ad6c5b9c79cce1a6baf10041f90cf491711Rob Landleyconfig TOYBOX_PEDANTIC_ARGS 145cb8e5ad6c5b9c79cce1a6baf10041f90cf491711Rob Landley bool "Pedantic argument checking" 146cb8e5ad6c5b9c79cce1a6baf10041f90cf491711Rob Landley default n 147cb8e5ad6c5b9c79cce1a6baf10041f90cf491711Rob Landley help 148cb8e5ad6c5b9c79cce1a6baf10041f90cf491711Rob Landley Check arguments for commands that have no arguments. 149cb8e5ad6c5b9c79cce1a6baf10041f90cf491711Rob Landley 150a8bee46cfebcf1ae9c3749b820c483054be81295Rob Landleyconfig TOYBOX_UID_SYS 151a8bee46cfebcf1ae9c3749b820c483054be81295Rob Landley int "First system UID" 152a8bee46cfebcf1ae9c3749b820c483054be81295Rob Landley default 100 153a8bee46cfebcf1ae9c3749b820c483054be81295Rob Landley help 154a8bee46cfebcf1ae9c3749b820c483054be81295Rob Landley When commands like useradd/groupadd allocate system IDs, start here. 155a8bee46cfebcf1ae9c3749b820c483054be81295Rob Landley 156a8bee46cfebcf1ae9c3749b820c483054be81295Rob Landleyconfig TOYBOX_UID_USR 157a8bee46cfebcf1ae9c3749b820c483054be81295Rob Landley int "First user UID" 158a8bee46cfebcf1ae9c3749b820c483054be81295Rob Landley default 500 159a8bee46cfebcf1ae9c3749b820c483054be81295Rob Landley help 160a8bee46cfebcf1ae9c3749b820c483054be81295Rob Landley When commands like useradd/groupadd allocate user IDs, start here. 1618c588d822a4771420fa32571693f728e809bb2f2Rob Landley 1628c588d822a4771420fa32571693f728e809bb2f2Rob Landleyconfig TOYBOX_MUSL_NOMMU_IS_BROKEN 1638c588d822a4771420fa32571693f728e809bb2f2Rob Landley bool "Workaround for musl-libc breakage on nommu systems." 1648c588d822a4771420fa32571693f728e809bb2f2Rob Landley default n 1658c588d822a4771420fa32571693f728e809bb2f2Rob Landley help 1668c588d822a4771420fa32571693f728e809bb2f2Rob Landley When using musl-libc on a nommu system, you'll need to say "y" here. 1678c588d822a4771420fa32571693f728e809bb2f2Rob Landley 1688c588d822a4771420fa32571693f728e809bb2f2Rob Landley Although uclibc lets you detect support for things like fork() and 1698c588d822a4771420fa32571693f728e809bb2f2Rob Landley daemon() at compile time, musl intentionally includes broken versions 1708c588d822a4771420fa32571693f728e809bb2f2Rob Landley that always return -ENOSYS on nommu systems, and goes out of its way 1718c588d822a4771420fa32571693f728e809bb2f2Rob Landley to prevent any cross-compile compatible compile-time probes for a 17271921dc74d051fb352bbb65dc92c3416e219dbb9Rob Landley nommu system. (It doesn't even #define __MUSL__ in features.h.) 1738c588d822a4771420fa32571693f728e809bb2f2Rob Landley 1748c588d822a4771420fa32571693f728e809bb2f2Rob Landley Musl does this despite the fact that a nommu system can't even run 1758c588d822a4771420fa32571693f728e809bb2f2Rob Landley standard ELF binaries, and requires specially packaged executables. 1768c588d822a4771420fa32571693f728e809bb2f2Rob Landley So our only choice is to manually provide a musl nommu bug workaround 1778c588d822a4771420fa32571693f728e809bb2f2Rob Landley you can manually select to enable (larger, slower) nommu support with 1788c588d822a4771420fa32571693f728e809bb2f2Rob Landley musl. 1798c588d822a4771420fa32571693f728e809bb2f2Rob Landley 1805257cf54a5810105bc4a75703a06740d756d8e8landleyendmenu 181