blob: 5efbf999596f816125aa44d657d0c6a4dbab56c5 [file] [log] [blame]
Eric Andersenc9f20d92002-12-05 08:41:41 +00001#
2# For a description of the syntax of this configuration file,
Kartik Agaram43b17b12018-05-31 22:15:55 -07003# see docs/Kconfig-language.txt.
Eric Andersenc9f20d92002-12-05 08:41:41 +00004#
5
Mike Frysinger9ac178a2005-09-24 05:49:36 +00006menu "Shells"
Eric Andersenc9f20d92002-12-05 08:41:41 +00007
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +02008
9choice
10 prompt "Choose which shell is aliased to 'sh' name"
Denys Vlasenko0b883582016-12-23 16:49:07 +010011 default SH_IS_ASH
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020012 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020013 Choose which shell you want to be executed by 'sh' alias.
14 The ash shell is the most bash compatible and full featured one.
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020015
Denys Vlasenko121fb952010-06-07 13:34:34 +020016# note: cannot use "select ASH" here, it breaks "make allnoconfig"
Denys Vlasenko0b883582016-12-23 16:49:07 +010017config SH_IS_ASH
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020018 depends on !NOMMU
Denys Vlasenko0b883582016-12-23 16:49:07 +010019 bool "ash"
Denys Vlasenko67e15292020-06-24 13:39:13 +020020 select SHELL_ASH
Kang-Che Sung95291152017-01-04 12:29:04 +010021 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020022 Choose ash to be the shell executed by 'sh' name.
23 The ash code will be built into busybox. If you don't select
24 "ash" choice (CONFIG_ASH), this shell may only be invoked by
25 the name 'sh' (and not 'ash').
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020026
Denys Vlasenko0b883582016-12-23 16:49:07 +010027config SH_IS_HUSH
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020028 bool "hush"
Denys Vlasenko67e15292020-06-24 13:39:13 +020029 select SHELL_HUSH
Kang-Che Sung95291152017-01-04 12:29:04 +010030 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020031 Choose hush to be the shell executed by 'sh' name.
32 The hush code will be built into busybox. If you don't select
33 "hush" choice (CONFIG_HUSH), this shell may only be invoked by
34 the name 'sh' (and not 'hush').
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020035
Denys Vlasenko0b883582016-12-23 16:49:07 +010036config SH_IS_NONE
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020037 bool "none"
38
39endchoice
40
41choice
42 prompt "Choose which shell is aliased to 'bash' name"
Denys Vlasenko0b883582016-12-23 16:49:07 +010043 default BASH_IS_NONE
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020044 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020045 Choose which shell you want to be executed by 'bash' alias.
46 The ash shell is the most bash compatible and full featured one,
47 although compatibility is far from being complete.
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020048
Denys Vlasenko72089cf2017-07-21 09:50:55 +020049 Note that selecting this option does not switch on any bash
50 compatibility code. It merely makes it possible to install
51 /bin/bash (sym)link and run scripts which start with
52 #!/bin/bash line.
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020053
Denys Vlasenko72089cf2017-07-21 09:50:55 +020054 Many systems use it in scripts which use bash-specific features,
55 even simple ones like $RANDOM. Without this option, busybox
56 can't be used for running them because it won't recongnize
57 "bash" as a supported applet name.
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020058
Denys Vlasenko0b883582016-12-23 16:49:07 +010059config BASH_IS_ASH
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020060 depends on !NOMMU
Denys Vlasenko0b883582016-12-23 16:49:07 +010061 bool "ash"
Denys Vlasenko67e15292020-06-24 13:39:13 +020062 select SHELL_ASH
Kang-Che Sung95291152017-01-04 12:29:04 +010063 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020064 Choose ash to be the shell executed by 'bash' name.
65 The ash code will be built into busybox. If you don't select
66 "ash" choice (CONFIG_ASH), this shell may only be invoked by
67 the name 'bash' (and not 'ash').
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020068
Denys Vlasenko0b883582016-12-23 16:49:07 +010069config BASH_IS_HUSH
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020070 bool "hush"
Denys Vlasenko67e15292020-06-24 13:39:13 +020071 select SHELL_HUSH
Kang-Che Sung95291152017-01-04 12:29:04 +010072 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020073 Choose hush to be the shell executed by 'bash' name.
74 The hush code will be built into busybox. If you don't select
75 "hush" choice (CONFIG_HUSH), this shell may only be invoked by
76 the name 'bash' (and not 'hush').
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020077
Denys Vlasenko0b883582016-12-23 16:49:07 +010078config BASH_IS_NONE
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020079 bool "none"
80
81endchoice
82
83
Denys Vlasenko0b883582016-12-23 16:49:07 +010084INSERT
85
86
Kang-Che Sung6cd02942017-01-06 17:02:03 +010087comment "Options common to all shells"
Denys Vlasenko67e15292020-06-24 13:39:13 +020088if SHELL_ASH || SHELL_HUSH
Kang-Che Sung6cd02942017-01-06 17:02:03 +010089
Denys Vlasenko0b883582016-12-23 16:49:07 +010090config FEATURE_SH_MATH
Mike Frysinger98c52642009-04-02 10:02:37 +000091 bool "POSIX math support"
92 default y
Denys Vlasenko67e15292020-06-24 13:39:13 +020093 depends on SHELL_ASH || SHELL_HUSH
Mike Frysinger98c52642009-04-02 10:02:37 +000094 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020095 Enable math support in the shell via $((...)) syntax.
Mike Frysinger98c52642009-04-02 10:02:37 +000096
Denys Vlasenko0b883582016-12-23 16:49:07 +010097config FEATURE_SH_MATH_64
Mike Frysinger98c52642009-04-02 10:02:37 +000098 bool "Extend POSIX math support to 64 bit"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +020099 default y
Denys Vlasenko0b883582016-12-23 16:49:07 +0100100 depends on FEATURE_SH_MATH
Mike Frysinger98c52642009-04-02 10:02:37 +0000101 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200102 Enable 64-bit math support in the shell. This will make the shell
103 slightly larger, but will allow computation with very large numbers.
104 This is not in POSIX, so do not rely on this in portable code.
Mike Frysinger98c52642009-04-02 10:02:37 +0000105
Denys Vlasenko9edd2682019-05-19 17:23:31 +0200106config FEATURE_SH_MATH_BASE
107 bool "Support BASE#nnnn literals"
108 default y
109 depends on FEATURE_SH_MATH
110
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000111config FEATURE_SH_EXTRA_QUIET
Glenn L McGrath3b251852004-01-03 12:07:32 +0000112 bool "Hide message on interactive shell startup"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200113 default y
Denys Vlasenko67e15292020-06-24 13:39:13 +0200114 depends on SHELL_ASH || SHELL_HUSH
Eric Andersenc9f20d92002-12-05 08:41:41 +0000115 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200116 Remove the busybox introduction when starting a shell.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000117
Denis Vlasenko80d14be2007-04-10 23:03:30 +0000118config FEATURE_SH_STANDALONE
Eric Andersenc9f20d92002-12-05 08:41:41 +0000119 bool "Standalone shell"
120 default n
Denys Vlasenko67e15292020-06-24 13:39:13 +0200121 depends on SHELL_ASH || SHELL_HUSH
Eric Andersenc9f20d92002-12-05 08:41:41 +0000122 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200123 This option causes busybox shells to use busybox applets
124 in preference to executables in the PATH whenever possible. For
125 example, entering the command 'ifconfig' into the shell would cause
126 busybox to use the ifconfig busybox applet. Specifying the fully
127 qualified executable name, such as '/sbin/ifconfig' will still
128 execute the /sbin/ifconfig executable on the filesystem. This option
129 is generally used when creating a statically linked version of busybox
130 for use as a rescue shell, in the event that you screw up your system.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000131
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200132 This is implemented by re-execing /proc/self/exe (typically)
133 with right parameters.
Paul Fox6ab03782006-06-08 21:37:26 +0000134
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200135 However, there are drawbacks: it is problematic in chroot jails
136 without mounted /proc, and ps/top may show command name as 'exe'
137 for applets started this way.
Eric Andersen6f8542b2004-09-24 01:25:39 +0000138
Denis Vlasenko9bc80d72008-04-12 20:07:53 +0000139config FEATURE_SH_NOFORK
140 bool "Run 'nofork' applets directly"
141 default n
Denys Vlasenko67e15292020-06-24 13:39:13 +0200142 depends on SHELL_ASH || SHELL_HUSH
Denis Vlasenko9bc80d72008-04-12 20:07:53 +0000143 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200144 This option causes busybox shells to not execute typical
145 fork/exec/wait sequence, but call <applet>_main directly,
146 if possible. (Sometimes it is not possible: for example,
147 this is not possible in pipes).
Denis Vlasenko9bc80d72008-04-12 20:07:53 +0000148
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200149 This will be done only for some applets (those which are marked
150 NOFORK in include/applets.h).
Denis Vlasenko9bc80d72008-04-12 20:07:53 +0000151
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200152 This may significantly speed up some shell scripts.
Denis Vlasenko9bc80d72008-04-12 20:07:53 +0000153
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200154 This feature is relatively new. Use with care. Report bugs
155 to project mailing list.
Denis Vlasenko9bc80d72008-04-12 20:07:53 +0000156
Denys Vlasenkoeae12682017-07-20 16:09:31 +0200157config FEATURE_SH_READ_FRAC
158 bool "read -t N.NNN support (+110 bytes)"
159 default y
Denys Vlasenko67e15292020-06-24 13:39:13 +0200160 depends on SHELL_ASH || SHELL_HUSH
Denys Vlasenkoeae12682017-07-20 16:09:31 +0200161 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200162 Enable support for fractional second timeout in read builtin.
Denys Vlasenkoeae12682017-07-20 16:09:31 +0200163
Denys Vlasenko2c4de5b2011-03-31 13:16:52 +0200164config FEATURE_SH_HISTFILESIZE
165 bool "Use $HISTFILESIZE"
166 default y
Denys Vlasenko67e15292020-06-24 13:39:13 +0200167 depends on SHELL_ASH || SHELL_HUSH
Denys Vlasenko2c4de5b2011-03-31 13:16:52 +0200168 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200169 This option makes busybox shells to use $HISTFILESIZE variable
170 to set shell history size. Note that its max value is capped
171 by "History size" setting in library tuning section.
Denys Vlasenko2c4de5b2011-03-31 13:16:52 +0200172
Ron Yorston71df2d32018-11-27 14:34:25 +0000173config FEATURE_SH_EMBEDDED_SCRIPTS
174 bool "Embed scripts in the binary"
175 default y
Denys Vlasenko67e15292020-06-24 13:39:13 +0200176 depends on SHELL_ASH || SHELL_HUSH
Ron Yorston71df2d32018-11-27 14:34:25 +0000177 help
178 Allow scripts to be compressed and embedded in the busybox
179 binary. The scripts should be placed in the 'embed' directory
180 at build time. Like applets, scripts can be run as
181 'busybox SCRIPT ...' or by linking their name to the binary.
182
183 This also allows applets to be implemented as scripts: place
184 the script in 'applets_sh' and a stub C file containing
185 configuration in the appropriate subsystem directory.
186
Kang-Che Sung6cd02942017-01-06 17:02:03 +0100187endif # Options common to all shells
Denys Vlasenko2c4de5b2011-03-31 13:16:52 +0200188
Eric Andersenc9f20d92002-12-05 08:41:41 +0000189endmenu