2 # For a description of the syntax of this configuration file,
3 # see scripts/kbuild/config-language.txt.
8 config BUSYBOX_CONFIG_ASH
11 depends on !BUSYBOX_CONFIG_NOMMU
13 Tha 'ash' shell adds about 60k in the default configuration and is
14 the most complete and most pedantically correct shell included with
15 busybox. This shell is actually a derivative of the Debian 'dash'
16 shell (by Herbert Xu), which was created by porting the 'ash' shell
17 (written by Kenneth Almquist) from NetBSD.
19 config BUSYBOX_CONFIG_ASH_BASH_COMPAT
20 bool "bash-compatible extensions"
22 depends on BUSYBOX_CONFIG_ASH
24 Enable bash-compatible extensions.
26 config BUSYBOX_CONFIG_ASH_JOB_CONTROL
29 depends on BUSYBOX_CONFIG_ASH
31 Enable job control in the ash shell.
33 config BUSYBOX_CONFIG_ASH_ALIAS
36 depends on BUSYBOX_CONFIG_ASH
38 Enable alias support in the ash shell.
40 config BUSYBOX_CONFIG_ASH_GETOPTS
41 bool "Builtin getopt to parse positional parameters"
43 depends on BUSYBOX_CONFIG_ASH
45 Enable getopts builtin in the ash shell.
47 config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO
48 bool "Builtin version of 'echo'"
50 depends on BUSYBOX_CONFIG_ASH
52 Enable support for echo, builtin to ash.
54 config BUSYBOX_CONFIG_ASH_BUILTIN_PRINTF
55 bool "Builtin version of 'printf'"
57 depends on BUSYBOX_CONFIG_ASH
59 Enable support for printf, builtin to ash.
61 config BUSYBOX_CONFIG_ASH_BUILTIN_TEST
62 bool "Builtin version of 'test'"
64 depends on BUSYBOX_CONFIG_ASH
66 Enable support for test, builtin to ash.
68 config BUSYBOX_CONFIG_ASH_CMDCMD
69 bool "'command' command to override shell builtins"
71 depends on BUSYBOX_CONFIG_ASH
73 Enable support for the ash 'command' builtin, which allows
74 you to run the specified command with the specified arguments,
75 even when there is an ash builtin command with the same name.
77 config BUSYBOX_CONFIG_ASH_MAIL
78 bool "Check for new mail on interactive shells"
80 depends on BUSYBOX_CONFIG_ASH
82 Enable "check for new mail" in the ash shell.
84 config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE
85 bool "Optimize for size instead of speed"
87 depends on BUSYBOX_CONFIG_ASH
89 Compile ash for reduced size at the price of speed.
91 config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT
92 bool "Pseudorandom generator and $RANDOM variable"
94 depends on BUSYBOX_CONFIG_ASH
96 Enable pseudorandom generator and dynamic variable "$RANDOM".
97 Each read of "$RANDOM" will generate a new pseudorandom value.
98 You can reset the generator by using a specified start value.
99 After "unset RANDOM" the generator will switch off and this
100 variable will no longer have special treatment.
102 config BUSYBOX_CONFIG_ASH_EXPAND_PRMT
103 bool "Expand prompt string"
105 depends on BUSYBOX_CONFIG_ASH
107 "PS#" may contain volatile content, such as backquote commands.
108 This option recreates the prompt string from the environment
109 variable each time it is displayed.
111 config BUSYBOX_CONFIG_CTTYHACK
115 One common problem reported on the mailing list is "can't access tty;
116 job control turned off" error message which typically appears when
117 one tries to use shell with stdin/stdout opened to /dev/console.
118 This device is special - it cannot be a controlling tty.
120 Proper solution is to use correct device instead of /dev/console.
122 cttyhack provides "quick and dirty" solution to this problem.
123 It analyzes stdin with various ioctls, trying to determine whether
124 it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line).
125 If it detects one, it closes stdin/out/err and reopens that device.
126 Then it executes given program. Opening the device will make
127 that device a controlling tty. This may require cttyhack
128 to be a session leader.
130 Example for /etc/inittab (for busybox init):
132 ::respawn:/bin/cttyhack /bin/sh
134 Starting an interactive shell from boot shell script:
138 Giving controlling tty to shell running with PID 1:
142 Without cttyhack, you need to know exact tty name,
143 and do something like this:
145 # exec setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1'
147 config BUSYBOX_CONFIG_HUSH
151 hush is a small shell (25k). It handles the normal flow control
152 constructs such as if/then/elif/else/fi, for/in/do/done, while loops,
153 case/esac. Redirections, here documents, $((arithmetic))
154 and functions are supported.
156 It will compile and work on no-mmu systems.
158 It does not handle select, aliases, tilde expansion,
159 &>file and >&file redirection of stdout+stderr.
161 config BUSYBOX_CONFIG_HUSH_BASH_COMPAT
162 bool "bash-compatible extensions"
164 depends on BUSYBOX_CONFIG_HUSH
166 Enable bash-compatible extensions.
168 config BUSYBOX_CONFIG_HUSH_BRACE_EXPANSION
169 bool "Brace expansion"
171 depends on BUSYBOX_CONFIG_HUSH_BASH_COMPAT
173 Enable {abc,def} extension.
175 config BUSYBOX_CONFIG_HUSH_HELP
178 depends on BUSYBOX_CONFIG_HUSH
180 Enable help builtin in hush. Code size + ~1 kbyte.
182 config BUSYBOX_CONFIG_HUSH_INTERACTIVE
183 bool "Interactive mode"
185 depends on BUSYBOX_CONFIG_HUSH
187 Enable interactive mode (prompt and command editing).
188 Without this, hush simply reads and executes commands
189 from stdin just like a shell script from a file.
190 No prompt, no PS1/PS2 magic shell variables.
192 config BUSYBOX_CONFIG_HUSH_SAVEHISTORY
193 bool "Save command history to .hush_history"
195 depends on BUSYBOX_CONFIG_HUSH_INTERACTIVE && BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY
197 Enable history saving in hush.
199 config BUSYBOX_CONFIG_HUSH_JOB
202 depends on BUSYBOX_CONFIG_HUSH_INTERACTIVE
204 Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current
205 command (not entire shell), fg/bg builtins work. Without this option,
206 "cmd &" still works by simply spawning a process and immediately
207 prompting for next command (or executing next command in a script),
208 but no separate process group is formed.
210 config BUSYBOX_CONFIG_HUSH_TICK
211 bool "Process substitution"
213 depends on BUSYBOX_CONFIG_HUSH
215 Enable process substitution `command` and $(command) in hush.
217 config BUSYBOX_CONFIG_HUSH_IF
218 bool "Support if/then/elif/else/fi"
220 depends on BUSYBOX_CONFIG_HUSH
222 Enable if/then/elif/else/fi in hush.
224 config BUSYBOX_CONFIG_HUSH_LOOPS
225 bool "Support for, while and until loops"
227 depends on BUSYBOX_CONFIG_HUSH
229 Enable for, while and until loops in hush.
231 config BUSYBOX_CONFIG_HUSH_CASE
232 bool "Support case ... esac statement"
234 depends on BUSYBOX_CONFIG_HUSH
236 Enable case ... esac statement in hush. +400 bytes.
238 config BUSYBOX_CONFIG_HUSH_FUNCTIONS
239 bool "Support funcname() { commands; } syntax"
241 depends on BUSYBOX_CONFIG_HUSH
243 Enable support for shell functions in hush. +800 bytes.
245 config BUSYBOX_CONFIG_HUSH_LOCAL
246 bool "Support local builtin"
248 depends on BUSYBOX_CONFIG_HUSH_FUNCTIONS
250 Enable support for local variables in functions.
252 config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT
253 bool "Pseudorandom generator and $RANDOM variable"
255 depends on BUSYBOX_CONFIG_HUSH
257 Enable pseudorandom generator and dynamic variable "$RANDOM".
258 Each read of "$RANDOM" will generate a new pseudorandom value.
260 config BUSYBOX_CONFIG_HUSH_EXPORT_N
261 bool "Support 'export -n' option"
263 depends on BUSYBOX_CONFIG_HUSH
265 export -n unexports variables. It is a bash extension.
267 config BUSYBOX_CONFIG_HUSH_MODE_X
268 bool "Support 'hush -x' option and 'set -x' command"
270 depends on BUSYBOX_CONFIG_HUSH
272 This instructs hush to print commands before execution.
275 config BUSYBOX_CONFIG_MSH
276 bool "msh (deprecated: aliased to hush)"
278 select BUSYBOX_CONFIG_HUSH
280 msh is deprecated and will be removed, please migrate to hush.
284 prompt "Choose which shell is aliased to 'sh' name"
285 default BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
287 Choose which shell you want to be executed by 'sh' alias.
288 The ash shell is the most bash compatible and full featured one.
290 # note: cannot use "select ASH" here, it breaks "make allnoconfig"
291 config BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
292 depends on BUSYBOX_CONFIG_ASH
294 depends on !BUSYBOX_CONFIG_NOMMU
296 config BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH
297 depends on BUSYBOX_CONFIG_HUSH
300 config BUSYBOX_CONFIG_FEATURE_SH_IS_NONE
306 prompt "Choose which shell is aliased to 'bash' name"
307 default BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE
309 Choose which shell you want to be executed by 'bash' alias.
310 The ash shell is the most bash compatible and full featured one.
312 Note that selecting this option does not switch on any bash
313 compatibility code. It merely makes it possible to install
314 /bin/bash (sym)link and run scripts which start with
317 Many systems use it in scripts which use bash-specific features,
318 even simple ones like $RANDOM. Without this option, busybox
319 can't be used for running them because it won't recongnize
320 "bash" as a supported applet name.
322 config BUSYBOX_CONFIG_FEATURE_BASH_IS_ASH
323 depends on BUSYBOX_CONFIG_ASH
325 depends on !BUSYBOX_CONFIG_NOMMU
327 config BUSYBOX_CONFIG_FEATURE_BASH_IS_HUSH
328 depends on BUSYBOX_CONFIG_HUSH
331 config BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE
337 config BUSYBOX_CONFIG_SH_MATH_SUPPORT
338 bool "POSIX math support"
340 depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH
342 Enable math support in the shell via $((...)) syntax.
344 config BUSYBOX_CONFIG_SH_MATH_SUPPORT_64
345 bool "Extend POSIX math support to 64 bit"
347 depends on BUSYBOX_CONFIG_SH_MATH_SUPPORT
349 Enable 64-bit math support in the shell. This will make the shell
350 slightly larger, but will allow computation with very large numbers.
351 This is not in POSIX, so do not rely on this in portable code.
353 config BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET
354 bool "Hide message on interactive shell startup"
356 depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH
358 Remove the busybox introduction when starting a shell.
360 config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE
361 bool "Standalone shell"
363 depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
365 This option causes busybox shells to use busybox applets
366 in preference to executables in the PATH whenever possible. For
367 example, entering the command 'ifconfig' into the shell would cause
368 busybox to use the ifconfig busybox applet. Specifying the fully
369 qualified executable name, such as '/sbin/ifconfig' will still
370 execute the /sbin/ifconfig executable on the filesystem. This option
371 is generally used when creating a statically linked version of busybox
372 for use as a rescue shell, in the event that you screw up your system.
374 This is implemented by re-execing /proc/self/exe (typically)
375 with right parameters. Some selected applets ("NOFORK" applets)
376 can even be executed without creating new process.
377 Instead, busybox will call <applet>_main() internally.
379 However, this causes problems in chroot jails without mounted /proc
380 and with ps/top (command name can be shown as 'exe' for applets
383 # Note that this will *also* cause applets to take precedence
384 # over shell builtins of the same name. So turning this on will
385 # eliminate any performance gained by turning on the builtin "echo"
386 # and "test" commands in ash.
388 # Note that when using this option, the shell will attempt to directly
389 # run '/bin/busybox'. If you do not have the busybox binary sitting in
390 # that exact location with that exact name, this option will not work at
393 config BUSYBOX_CONFIG_FEATURE_SH_NOFORK
394 bool "Run 'nofork' applets directly"
396 depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
398 This option causes busybox shells [currently only ash]
399 to not execute typical fork/exec/wait sequence, but call <applet>_main
400 directly, if possible. (Sometimes it is not possible: for example,
401 this is not possible in pipes).
403 This will be done only for some applets (those which are marked
404 NOFORK in include/applets.h).
406 This may significantly speed up some shell scripts.
408 This feature is relatively new. Use with care.