• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1mainmenu "Toybox Configuration"
2
3
4source generated/Config.probed
5source generated/Config.in
6
7comment ""
8
9menu "Toybox global settings"
10
11# This entry controls the multiplexer, disabled for single command builds
12config TOYBOX
13	bool
14	default y
15	help
16	  usage: toybox [--long | --help | --version | [COMMAND] [ARGUMENTS...]]
17
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.
21
22	  First argument is name of a COMMAND to run, followed by any ARGUMENTS
23	  to that command. Most toybox commands also understand:
24
25	  --help		Show command help (only)
26	  --version	Show toybox version (only)
27
28	  The filename "-" means stdin/stdout, and "--" stops argument parsing.
29
30	  Numerical arguments accept a single letter suffix for
31	  kilo, mega, giga, tera, peta, and exabytes, plus an additional
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).
36
37config TOYBOX_SUID
38	bool "SUID support"
39	default y
40	help
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
47
48choice
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
62config TOYBOX_SELINUX
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
68config TOYBOX_SMACK
69	bool "SMACK support"
70	help
71	  Include SMACK options in commands like ls for systems like Tizen.
72
73endchoice
74
75config TOYBOX_LIBCRYPTO
76       bool "Use libcrypto (OpenSSL/BoringSSL)"
77       default n
78       help
79         Use faster hash functions out of external -lcrypto library.
80
81config TOYBOX_LIBZ
82       bool "Use libz (zlib)"
83       default n
84       help
85         Use libz for gz support.
86
87config 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
94config TOYBOX_HELP
95	bool "Help messages"
96	default y
97	help
98	  Include help text for each command.
99
100config TOYBOX_HELP_DASHDASH
101	bool "--help and --version"
102	default y
103	depends on TOYBOX_HELP
104	help
105	  Support --help argument in all commands, even ones with a NULL
106	  optstring. (Use TOYFLAG_NOHELP to disable.) Produces the same output
107	  as "help command". --version shows toybox version.
108
109config TOYBOX_FREE
110	bool "Free memory unnecessarily"
111	default n
112	help
113	  When a program exits, the operating system will clean up after it
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
116	  without a real OS (ala newlib+libgloss), enable this to make toybox
117	  clean up after itself.
118
119config 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
132config TOYBOX_DEBUG
133	bool "Debugging tests"
134	default n
135	help
136	  Enable extra checks for debugging purposes. All of them catch
137	  things that can only go wrong at development time, not runtime.
138
139config 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
145config TOYBOX_UID_USR
146	int "First user UID"
147	default 500
148	help
149	  When commands like useradd/groupadd allocate user IDs, start here.
150
151config TOYBOX_FORCE_NOMMU
152	bool "Enable nommu support when the build can't detect it."
153	default n
154	help
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.
158
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.
167
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
179	  Building a scripts/mcm-buildall.sh toolchain patches musl to fix this.
180
181endmenu
182