Rob Landley | 5bcc7ea | 2014-09-20 13:20:17 -0500 | [diff] [blame] | 1 | mainmenu "Toybox Configuration" |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 2 | |
Rob Landley | 76ec485 | 2012-10-21 17:57:23 -0500 | [diff] [blame] | 3 | |
| 4 | source generated/Config.probed |
| 5 | source generated/Config.in |
| 6 | |
| 7 | comment "" |
| 8 | |
Rob Landley | 3a9241a | 2012-08-25 14:25:22 -0500 | [diff] [blame] | 9 | menu "Toybox global settings" |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 10 | |
Rob Landley | a8bee46 | 2014-08-18 19:10:45 -0500 | [diff] [blame] | 11 | # This entry controls the multiplexer, disabled for single command builds |
Rob Landley | 2896480 | 2008-01-19 17:08:39 -0600 | [diff] [blame] | 12 | config TOYBOX |
| 13 | bool |
Rob Landley | d04dc1f | 2013-08-30 01:53:31 -0500 | [diff] [blame] | 14 | default y |
Rob Landley | d06c58d | 2007-10-11 15:36:36 -0500 | [diff] [blame] | 15 | help |
Rob Landley | efb8060 | 2020-08-07 02:25:50 -0500 | [diff] [blame] | 16 | usage: toybox [--long | --help | --version | [COMMAND] [ARGUMENTS...]] |
Rob Landley | d06c58d | 2007-10-11 15:36:36 -0500 | [diff] [blame] | 17 | |
Rob Landley | efb8060 | 2020-08-07 02:25:50 -0500 | [diff] [blame] | 18 | With no arguments, "toybox" shows available COMMAND names. Add --long |
| 19 | to include suggested install path for each command, see |
| 20 | https://landley.net/toybox/faq.html#install for details. |
Rob Landley | 8431692 | 2014-06-10 21:57:05 -0500 | [diff] [blame] | 21 | |
Rob Landley | efb8060 | 2020-08-07 02:25:50 -0500 | [diff] [blame] | 22 | First argument is name of a COMMAND to run, followed by any ARGUMENTS |
| 23 | to that command. Most toybox commands also understand: |
Rob Landley | cefc0a2 | 2016-10-05 13:29:55 -0500 | [diff] [blame] | 24 | |
| 25 | --help Show command help (only) |
| 26 | --version Show toybox version (only) |
| 27 | |
Elliott Hughes | 502b10c | 2019-03-09 17:41:49 -0800 | [diff] [blame] | 28 | The filename "-" means stdin/stdout, and "--" stops argument parsing. |
| 29 | |
| 30 | Numerical arguments accept a single letter suffix for |
Rob Landley | cefc0a2 | 2016-10-05 13:29:55 -0500 | [diff] [blame] | 31 | kilo, mega, giga, tera, peta, and exabytes, plus an additional |
Elliott Hughes | 502b10c | 2019-03-09 17:41:49 -0800 | [diff] [blame] | 32 | "d" to indicate decimal 1000's instead of 1024. |
| 33 | |
| 34 | Durations can be decimal fractions and accept minute ("m"), hour ("h"), |
| 35 | or day ("d") suffixes (so 0.1m = 6s). |
Rob Landley | cefc0a2 | 2016-10-05 13:29:55 -0500 | [diff] [blame] | 36 | |
Rob Landley | e0377fb | 2010-01-05 12:17:05 -0600 | [diff] [blame] | 37 | config TOYBOX_SUID |
| 38 | bool "SUID support" |
| 39 | default y |
| 40 | help |
Rob Landley | 26c0045 | 2013-04-14 12:35:25 -0500 | [diff] [blame] | 41 | Support for the Set User ID bit, to install toybox suid root and drop |
| 42 | permissions for commands which do not require root access. To use |
| 43 | this change ownership of the file to the root user and set the suid |
| 44 | bit in the file permissions: |
| 45 | |
| 46 | chown root:root toybox; chmod +s toybox |
Rob Landley | e0377fb | 2010-01-05 12:17:05 -0600 | [diff] [blame] | 47 | |
Rob Landley | 08f51b5 | 2015-04-15 20:53:00 -0500 | [diff] [blame] | 48 | choice |
| 49 | prompt "Security Blanket" |
| 50 | default TOYBOX_LSM_NONE |
| 51 | help |
| 52 | Select a Linux Security Module to complicate your system |
| 53 | until you can't find holes in it. |
| 54 | |
| 55 | config TOYBOX_LSM_NONE |
| 56 | bool "None" |
| 57 | help |
| 58 | Don't try to achieve "watertight" by plugging the holes in a |
| 59 | collander, instead use conventional unix security (and possibly |
| 60 | Linux Containers) for a simple straightforward system. |
| 61 | |
Elliott Hughes | 7e2af1c | 2015-01-16 13:36:53 -0600 | [diff] [blame] | 62 | config TOYBOX_SELINUX |
Rob Landley | 08f51b5 | 2015-04-15 20:53:00 -0500 | [diff] [blame] | 63 | bool "SELinux support" |
| 64 | help |
| 65 | Include SELinux options in commands such as ls, and add |
| 66 | SELinux-specific commands such as chcon to the Android menu. |
| 67 | |
| 68 | config TOYBOX_SMACK |
| 69 | bool "SMACK support" |
| 70 | help |
| 71 | Include SMACK options in commands like ls for systems like Tizen. |
| 72 | |
| 73 | endchoice |
Elliott Hughes | 7e2af1c | 2015-01-16 13:36:53 -0600 | [diff] [blame] | 74 | |
Rob Landley | adef5dc | 2016-07-15 04:45:08 -0500 | [diff] [blame] | 75 | config TOYBOX_LIBCRYPTO |
| 76 | bool "Use libcrypto (OpenSSL/BoringSSL)" |
| 77 | default n |
| 78 | help |
Elliott Hughes | 42af2e5 | 2019-02-22 19:37:24 -0800 | [diff] [blame] | 79 | Use faster hash functions out of external -lcrypto library. |
Rob Landley | adef5dc | 2016-07-15 04:45:08 -0500 | [diff] [blame] | 80 | |
Elliott Hughes | de3e5ea | 2017-04-26 15:01:41 -0700 | [diff] [blame] | 81 | config TOYBOX_LIBZ |
| 82 | bool "Use libz (zlib)" |
| 83 | default n |
| 84 | help |
| 85 | Use libz for gz support. |
| 86 | |
Rob Landley | f01503d | 2012-02-02 07:26:39 -0600 | [diff] [blame] | 87 | config TOYBOX_FLOAT |
| 88 | bool "Floating point support" |
| 89 | default y |
| 90 | help |
| 91 | Include floating point support infrastructure and commands that |
| 92 | require it. |
| 93 | |
Rob Landley | 36ffc5a | 2013-04-14 21:43:22 -0500 | [diff] [blame] | 94 | config TOYBOX_HELP |
Rob Landley | d683b17 | 2013-06-16 20:00:11 -0500 | [diff] [blame] | 95 | bool "Help messages" |
Rob Landley | 36ffc5a | 2013-04-14 21:43:22 -0500 | [diff] [blame] | 96 | default y |
| 97 | help |
| 98 | Include help text for each command. |
| 99 | |
Rob Landley | 953722e | 2013-06-30 15:58:24 -0500 | [diff] [blame] | 100 | config TOYBOX_HELP_DASHDASH |
Rob Landley | 29e75d5 | 2016-10-01 15:52:00 -0500 | [diff] [blame] | 101 | bool "--help and --version" |
Rob Landley | 953722e | 2013-06-30 15:58:24 -0500 | [diff] [blame] | 102 | default y |
| 103 | depends on TOYBOX_HELP |
| 104 | help |
| 105 | Support --help argument in all commands, even ones with a NULL |
Rob Landley | 29e75d5 | 2016-10-01 15:52:00 -0500 | [diff] [blame] | 106 | optstring. (Use TOYFLAG_NOHELP to disable.) Produces the same output |
| 107 | as "help command". --version shows toybox version. |
Rob Landley | 953722e | 2013-06-30 15:58:24 -0500 | [diff] [blame] | 108 | |
Rob Landley | de05a70 | 2007-01-31 14:37:01 -0500 | [diff] [blame] | 109 | config TOYBOX_FREE |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 110 | bool "Free memory unnecessarily" |
| 111 | default n |
| 112 | help |
| 113 | When a program exits, the operating system will clean up after it |
Rob Landley | 26c0045 | 2013-04-14 12:35:25 -0500 | [diff] [blame] | 114 | (free memory, close files, etc). To save size, toybox usually relies |
| 115 | on this behavior. If you're running toybox under a debugger or |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 116 | without a real OS (ala newlib+libgloss), enable this to make toybox |
| 117 | clean up after itself. |
| 118 | |
Rob Landley | 977e48e | 2014-10-20 19:52:29 -0500 | [diff] [blame] | 119 | config TOYBOX_NORECURSE |
| 120 | bool "Disable recursive execution" |
| 121 | default n |
| 122 | help |
| 123 | When one toybox command calls another, usually it just calls the new |
| 124 | command's main() function rather than searching the $PATH and calling |
| 125 | exec on another file (which is much slower). |
| 126 | |
| 127 | This disables that optimization, so toybox will run external commands |
| 128 | even when it has a built-in version of that command. This requires |
| 129 | toybox symlinks to be installed in the $PATH, or re-invoking the |
| 130 | "toybox" multiplexer command by name. |
| 131 | |
Rob Landley | de05a70 | 2007-01-31 14:37:01 -0500 | [diff] [blame] | 132 | config TOYBOX_DEBUG |
Rob Landley | 8324b89 | 2006-11-19 02:49:22 -0500 | [diff] [blame] | 133 | bool "Debugging tests" |
| 134 | default n |
| 135 | help |
Rob Landley | a8bee46 | 2014-08-18 19:10:45 -0500 | [diff] [blame] | 136 | Enable extra checks for debugging purposes. All of them catch |
Rob Landley | 39f2e91 | 2015-07-31 03:05:24 -0500 | [diff] [blame] | 137 | things that can only go wrong at development time, not runtime. |
Rob Landley | a8bee46 | 2014-08-18 19:10:45 -0500 | [diff] [blame] | 138 | |
| 139 | config TOYBOX_UID_SYS |
| 140 | int "First system UID" |
| 141 | default 100 |
| 142 | help |
| 143 | When commands like useradd/groupadd allocate system IDs, start here. |
| 144 | |
| 145 | config TOYBOX_UID_USR |
| 146 | int "First user UID" |
| 147 | default 500 |
| 148 | help |
| 149 | When commands like useradd/groupadd allocate user IDs, start here. |
Rob Landley | 8c588d8 | 2015-08-29 22:12:56 -0500 | [diff] [blame] | 150 | |
Rob Landley | a242957 | 2020-02-17 04:11:07 -0600 | [diff] [blame] | 151 | config TOYBOX_FORCE_NOMMU |
| 152 | bool "Enable nommu support when the build can't detect it." |
Rob Landley | 8c588d8 | 2015-08-29 22:12:56 -0500 | [diff] [blame] | 153 | default n |
| 154 | help |
Rob Landley | a242957 | 2020-02-17 04:11:07 -0600 | [diff] [blame] | 155 | When using musl-libc on a nommu system, you'll need to say "y" here |
| 156 | unless you used the patch in the mcm-buildall.sh script. You can also |
| 157 | say "y" here to test the nommu codepaths on an mmu system. |
Rob Landley | 8c588d8 | 2015-08-29 22:12:56 -0500 | [diff] [blame] | 158 | |
Rob Landley | a242957 | 2020-02-17 04:11:07 -0600 | [diff] [blame] | 159 | A nommu system can't use fork(), it can only vfork() which suspends |
| 160 | the parent until the child calls exec() or exits. When a program |
| 161 | needs a second instance of itself to run specific code at the same |
| 162 | time as the parent, it must use a more complicated approach (such as |
| 163 | exec("/proc/self/exe") then pass data to the new child through a pipe) |
| 164 | which is larger and slower, especially for things like toysh subshells |
| 165 | that need to duplicate a lot of internal state in the child process |
| 166 | fork() gives you for free. |
Rob Landley | 8c588d8 | 2015-08-29 22:12:56 -0500 | [diff] [blame] | 167 | |
Rob Landley | a242957 | 2020-02-17 04:11:07 -0600 | [diff] [blame] | 168 | Libraries like uclibc omit fork() on nommu systems, allowing |
| 169 | compile-time probes to select which codepath to use. But musl |
| 170 | intentionally includes a broken version of fork() that always returns |
| 171 | -ENOSYS on nommu systems, and goes out of its way to prevent any |
| 172 | cross-compile compatible compile-time probes for a nommu system. |
| 173 | (It doesn't even #define __MUSL__ in features.h.) Musl does this |
| 174 | despite the fact that a nommu system can't even run standard ELF |
| 175 | binaries (requiring specially packaged executables) because it wants |
| 176 | to force every program to either include all nommu code in every |
| 177 | instance ever built, or drop nommu support altogether. |
| 178 | |
Rob Landley | 8f75eed | 2021-04-01 04:01:02 -0500 | [diff] [blame] | 179 | Building a scripts/mcm-buildall.sh toolchain patches musl to fix this. |
Rob Landley | 8c588d8 | 2015-08-29 22:12:56 -0500 | [diff] [blame] | 180 | |
landley | 5257cf5 | 2006-10-31 23:30:06 -0500 | [diff] [blame] | 181 | endmenu |