blob: b626f3c1e61a66a01bb743117d6fc1e00405e940 [file] [log] [blame]
Rob Landley5bcc7ea2014-09-20 13:20:17 -05001mainmenu "Toybox Configuration"
landley5257cf52006-10-31 23:30:06 -05002
Rob Landley76ec4852012-10-21 17:57:23 -05003
4source generated/Config.probed
5source generated/Config.in
6
7comment ""
8
Rob Landley3a9241a2012-08-25 14:25:22 -05009menu "Toybox global settings"
landley5257cf52006-10-31 23:30:06 -050010
Rob Landleya8bee462014-08-18 19:10:45 -050011# This entry controls the multiplexer, disabled for single command builds
Rob Landley28964802008-01-19 17:08:39 -060012config TOYBOX
13 bool
Rob Landleyd04dc1f2013-08-30 01:53:31 -050014 default y
Rob Landleyd06c58d2007-10-11 15:36:36 -050015 help
Rob Landleyefb80602020-08-07 02:25:50 -050016 usage: toybox [--long | --help | --version | [COMMAND] [ARGUMENTS...]]
Rob Landleyd06c58d2007-10-11 15:36:36 -050017
Rob Landleyefb80602020-08-07 02:25:50 -050018 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 Landley84316922014-06-10 21:57:05 -050021
Rob Landleyefb80602020-08-07 02:25:50 -050022 First argument is name of a COMMAND to run, followed by any ARGUMENTS
23 to that command. Most toybox commands also understand:
Rob Landleycefc0a22016-10-05 13:29:55 -050024
25 --help Show command help (only)
26 --version Show toybox version (only)
27
Elliott Hughes502b10c2019-03-09 17:41:49 -080028 The filename "-" means stdin/stdout, and "--" stops argument parsing.
29
30 Numerical arguments accept a single letter suffix for
Rob Landleycefc0a22016-10-05 13:29:55 -050031 kilo, mega, giga, tera, peta, and exabytes, plus an additional
Elliott Hughes502b10c2019-03-09 17:41:49 -080032 "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 Landleycefc0a22016-10-05 13:29:55 -050036
Rob Landleye0377fb2010-01-05 12:17:05 -060037config TOYBOX_SUID
38 bool "SUID support"
39 default y
40 help
Rob Landley26c00452013-04-14 12:35:25 -050041 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 Landleye0377fb2010-01-05 12:17:05 -060047
Rob Landley08f51b52015-04-15 20:53:00 -050048choice
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
55config 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 Hughes7e2af1c2015-01-16 13:36:53 -060062config TOYBOX_SELINUX
Rob Landley08f51b52015-04-15 20:53:00 -050063 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
68config TOYBOX_SMACK
69 bool "SMACK support"
70 help
71 Include SMACK options in commands like ls for systems like Tizen.
72
73endchoice
Elliott Hughes7e2af1c2015-01-16 13:36:53 -060074
Rob Landleyadef5dc2016-07-15 04:45:08 -050075config TOYBOX_LIBCRYPTO
76 bool "Use libcrypto (OpenSSL/BoringSSL)"
77 default n
78 help
Elliott Hughes42af2e52019-02-22 19:37:24 -080079 Use faster hash functions out of external -lcrypto library.
Rob Landleyadef5dc2016-07-15 04:45:08 -050080
Elliott Hughesde3e5ea2017-04-26 15:01:41 -070081config TOYBOX_LIBZ
82 bool "Use libz (zlib)"
83 default n
84 help
85 Use libz for gz support.
86
Rob Landleyf01503d2012-02-02 07:26:39 -060087config 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 Landley36ffc5a2013-04-14 21:43:22 -050094config TOYBOX_HELP
Rob Landleyd683b172013-06-16 20:00:11 -050095 bool "Help messages"
Rob Landley36ffc5a2013-04-14 21:43:22 -050096 default y
97 help
98 Include help text for each command.
99
Rob Landley953722e2013-06-30 15:58:24 -0500100config TOYBOX_HELP_DASHDASH
Rob Landley29e75d52016-10-01 15:52:00 -0500101 bool "--help and --version"
Rob Landley953722e2013-06-30 15:58:24 -0500102 default y
103 depends on TOYBOX_HELP
104 help
105 Support --help argument in all commands, even ones with a NULL
Rob Landley29e75d52016-10-01 15:52:00 -0500106 optstring. (Use TOYFLAG_NOHELP to disable.) Produces the same output
107 as "help command". --version shows toybox version.
Rob Landley953722e2013-06-30 15:58:24 -0500108
Rob Landleyde05a702007-01-31 14:37:01 -0500109config TOYBOX_FREE
landley5257cf52006-10-31 23:30:06 -0500110 bool "Free memory unnecessarily"
111 default n
112 help
113 When a program exits, the operating system will clean up after it
Rob Landley26c00452013-04-14 12:35:25 -0500114 (free memory, close files, etc). To save size, toybox usually relies
115 on this behavior. If you're running toybox under a debugger or
landley5257cf52006-10-31 23:30:06 -0500116 without a real OS (ala newlib+libgloss), enable this to make toybox
117 clean up after itself.
118
Rob Landley977e48e2014-10-20 19:52:29 -0500119config 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 Landleyde05a702007-01-31 14:37:01 -0500132config TOYBOX_DEBUG
Rob Landley8324b892006-11-19 02:49:22 -0500133 bool "Debugging tests"
134 default n
135 help
Rob Landleya8bee462014-08-18 19:10:45 -0500136 Enable extra checks for debugging purposes. All of them catch
Rob Landley39f2e912015-07-31 03:05:24 -0500137 things that can only go wrong at development time, not runtime.
Rob Landleya8bee462014-08-18 19:10:45 -0500138
Rob Landleycb8e5ad2017-03-20 12:41:22 -0500139config TOYBOX_PEDANTIC_ARGS
140 bool "Pedantic argument checking"
141 default n
142 help
143 Check arguments for commands that have no arguments.
144
Rob Landleya8bee462014-08-18 19:10:45 -0500145config TOYBOX_UID_SYS
146 int "First system UID"
147 default 100
148 help
149 When commands like useradd/groupadd allocate system IDs, start here.
150
151config TOYBOX_UID_USR
152 int "First user UID"
153 default 500
154 help
155 When commands like useradd/groupadd allocate user IDs, start here.
Rob Landley8c588d82015-08-29 22:12:56 -0500156
Rob Landleya2429572020-02-17 04:11:07 -0600157config TOYBOX_FORCE_NOMMU
158 bool "Enable nommu support when the build can't detect it."
Rob Landley8c588d82015-08-29 22:12:56 -0500159 default n
160 help
Rob Landleya2429572020-02-17 04:11:07 -0600161 When using musl-libc on a nommu system, you'll need to say "y" here
162 unless you used the patch in the mcm-buildall.sh script. You can also
163 say "y" here to test the nommu codepaths on an mmu system.
Rob Landley8c588d82015-08-29 22:12:56 -0500164
Rob Landleya2429572020-02-17 04:11:07 -0600165 A nommu system can't use fork(), it can only vfork() which suspends
166 the parent until the child calls exec() or exits. When a program
167 needs a second instance of itself to run specific code at the same
168 time as the parent, it must use a more complicated approach (such as
169 exec("/proc/self/exe") then pass data to the new child through a pipe)
170 which is larger and slower, especially for things like toysh subshells
171 that need to duplicate a lot of internal state in the child process
172 fork() gives you for free.
Rob Landley8c588d82015-08-29 22:12:56 -0500173
Rob Landleya2429572020-02-17 04:11:07 -0600174 Libraries like uclibc omit fork() on nommu systems, allowing
175 compile-time probes to select which codepath to use. But musl
176 intentionally includes a broken version of fork() that always returns
177 -ENOSYS on nommu systems, and goes out of its way to prevent any
178 cross-compile compatible compile-time probes for a nommu system.
179 (It doesn't even #define __MUSL__ in features.h.) Musl does this
180 despite the fact that a nommu system can't even run standard ELF
181 binaries (requiring specially packaged executables) because it wants
182 to force every program to either include all nommu code in every
183 instance ever built, or drop nommu support altogether.
184
Rob Landley8f75eed2021-04-01 04:01:02 -0500185 Building a scripts/mcm-buildall.sh toolchain patches musl to fix this.
Rob Landley8c588d82015-08-29 22:12:56 -0500186
landley5257cf52006-10-31 23:30:06 -0500187endmenu