blob: d7623f7744f16bae3e6442007a68ef0895579c02 [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"
Kang-Che Sung95291152017-01-04 12:29:04 +010020 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020021 Choose ash to be the shell executed by 'sh' name.
22 The ash code will be built into busybox. If you don't select
23 "ash" choice (CONFIG_ASH), this shell may only be invoked by
24 the name 'sh' (and not 'ash').
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020025
Denys Vlasenko0b883582016-12-23 16:49:07 +010026config SH_IS_HUSH
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020027 bool "hush"
Kang-Che Sung95291152017-01-04 12:29:04 +010028 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020029 Choose hush to be the shell executed by 'sh' name.
30 The hush code will be built into busybox. If you don't select
31 "hush" choice (CONFIG_HUSH), this shell may only be invoked by
32 the name 'sh' (and not 'hush').
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020033
Denys Vlasenko0b883582016-12-23 16:49:07 +010034config SH_IS_NONE
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020035 bool "none"
36
37endchoice
38
39choice
40 prompt "Choose which shell is aliased to 'bash' name"
Denys Vlasenko0b883582016-12-23 16:49:07 +010041 default BASH_IS_NONE
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020042 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020043 Choose which shell you want to be executed by 'bash' alias.
44 The ash shell is the most bash compatible and full featured one,
45 although compatibility is far from being complete.
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020046
Denys Vlasenko72089cf2017-07-21 09:50:55 +020047 Note that selecting this option does not switch on any bash
48 compatibility code. It merely makes it possible to install
49 /bin/bash (sym)link and run scripts which start with
50 #!/bin/bash line.
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020051
Denys Vlasenko72089cf2017-07-21 09:50:55 +020052 Many systems use it in scripts which use bash-specific features,
53 even simple ones like $RANDOM. Without this option, busybox
54 can't be used for running them because it won't recongnize
55 "bash" as a supported applet name.
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020056
Denys Vlasenko0b883582016-12-23 16:49:07 +010057config BASH_IS_ASH
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020058 depends on !NOMMU
Denys Vlasenko0b883582016-12-23 16:49:07 +010059 bool "ash"
Kang-Che Sung95291152017-01-04 12:29:04 +010060 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020061 Choose ash to be the shell executed by 'bash' name.
62 The ash code will be built into busybox. If you don't select
63 "ash" choice (CONFIG_ASH), this shell may only be invoked by
64 the name 'bash' (and not 'ash').
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020065
Denys Vlasenko0b883582016-12-23 16:49:07 +010066config BASH_IS_HUSH
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020067 bool "hush"
Kang-Che Sung95291152017-01-04 12:29:04 +010068 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020069 Choose hush to be the shell executed by 'bash' name.
70 The hush code will be built into busybox. If you don't select
71 "hush" choice (CONFIG_HUSH), this shell may only be invoked by
72 the name 'bash' (and not 'hush').
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020073
Denys Vlasenko0b883582016-12-23 16:49:07 +010074config BASH_IS_NONE
Denys Vlasenkoc8aae0b2010-06-06 22:14:58 +020075 bool "none"
76
77endchoice
78
79
Denys Vlasenko0b883582016-12-23 16:49:07 +010080INSERT
81
82
Kang-Che Sung6cd02942017-01-06 17:02:03 +010083comment "Options common to all shells"
84if ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
85
Denys Vlasenko0b883582016-12-23 16:49:07 +010086config FEATURE_SH_MATH
Mike Frysinger98c52642009-04-02 10:02:37 +000087 bool "POSIX math support"
88 default y
Denys Vlasenko0b883582016-12-23 16:49:07 +010089 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
Mike Frysinger98c52642009-04-02 10:02:37 +000090 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020091 Enable math support in the shell via $((...)) syntax.
Mike Frysinger98c52642009-04-02 10:02:37 +000092
Denys Vlasenko0b883582016-12-23 16:49:07 +010093config FEATURE_SH_MATH_64
Mike Frysinger98c52642009-04-02 10:02:37 +000094 bool "Extend POSIX math support to 64 bit"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +020095 default y
Denys Vlasenko0b883582016-12-23 16:49:07 +010096 depends on FEATURE_SH_MATH
Mike Frysinger98c52642009-04-02 10:02:37 +000097 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020098 Enable 64-bit math support in the shell. This will make the shell
99 slightly larger, but will allow computation with very large numbers.
100 This is not in POSIX, so do not rely on this in portable code.
Mike Frysinger98c52642009-04-02 10:02:37 +0000101
Denys Vlasenko9edd2682019-05-19 17:23:31 +0200102config FEATURE_SH_MATH_BASE
103 bool "Support BASE#nnnn literals"
104 default y
105 depends on FEATURE_SH_MATH
106
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000107config FEATURE_SH_EXTRA_QUIET
Glenn L McGrath3b251852004-01-03 12:07:32 +0000108 bool "Hide message on interactive shell startup"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200109 default y
Denys Vlasenko0b883582016-12-23 16:49:07 +0100110 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
Eric Andersenc9f20d92002-12-05 08:41:41 +0000111 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200112 Remove the busybox introduction when starting a shell.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000113
Denis Vlasenko80d14be2007-04-10 23:03:30 +0000114config FEATURE_SH_STANDALONE
Eric Andersenc9f20d92002-12-05 08:41:41 +0000115 bool "Standalone shell"
116 default n
Denys Vlasenko0b883582016-12-23 16:49:07 +0100117 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
Eric Andersenc9f20d92002-12-05 08:41:41 +0000118 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200119 This option causes busybox shells to use busybox applets
120 in preference to executables in the PATH whenever possible. For
121 example, entering the command 'ifconfig' into the shell would cause
122 busybox to use the ifconfig busybox applet. Specifying the fully
123 qualified executable name, such as '/sbin/ifconfig' will still
124 execute the /sbin/ifconfig executable on the filesystem. This option
125 is generally used when creating a statically linked version of busybox
126 for use as a rescue shell, in the event that you screw up your system.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000127
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200128 This is implemented by re-execing /proc/self/exe (typically)
129 with right parameters.
Paul Fox6ab03782006-06-08 21:37:26 +0000130
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200131 However, there are drawbacks: it is problematic in chroot jails
132 without mounted /proc, and ps/top may show command name as 'exe'
133 for applets started this way.
Eric Andersen6f8542b2004-09-24 01:25:39 +0000134
Denis Vlasenko9bc80d72008-04-12 20:07:53 +0000135config FEATURE_SH_NOFORK
136 bool "Run 'nofork' applets directly"
137 default n
Denys Vlasenko0b883582016-12-23 16:49:07 +0100138 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
Denis Vlasenko9bc80d72008-04-12 20:07:53 +0000139 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200140 This option causes busybox shells to not execute typical
141 fork/exec/wait sequence, but call <applet>_main directly,
142 if possible. (Sometimes it is not possible: for example,
143 this is not possible in pipes).
Denis Vlasenko9bc80d72008-04-12 20:07:53 +0000144
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200145 This will be done only for some applets (those which are marked
146 NOFORK in include/applets.h).
Denis Vlasenko9bc80d72008-04-12 20:07:53 +0000147
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200148 This may significantly speed up some shell scripts.
Denis Vlasenko9bc80d72008-04-12 20:07:53 +0000149
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200150 This feature is relatively new. Use with care. Report bugs
151 to project mailing list.
Denis Vlasenko9bc80d72008-04-12 20:07:53 +0000152
Denys Vlasenkoeae12682017-07-20 16:09:31 +0200153config FEATURE_SH_READ_FRAC
154 bool "read -t N.NNN support (+110 bytes)"
155 default y
156 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
157 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200158 Enable support for fractional second timeout in read builtin.
Denys Vlasenkoeae12682017-07-20 16:09:31 +0200159
Denys Vlasenko2c4de5b2011-03-31 13:16:52 +0200160config FEATURE_SH_HISTFILESIZE
161 bool "Use $HISTFILESIZE"
162 default y
Denys Vlasenko0b883582016-12-23 16:49:07 +0100163 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
Denys Vlasenko2c4de5b2011-03-31 13:16:52 +0200164 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200165 This option makes busybox shells to use $HISTFILESIZE variable
166 to set shell history size. Note that its max value is capped
167 by "History size" setting in library tuning section.
Denys Vlasenko2c4de5b2011-03-31 13:16:52 +0200168
Ron Yorston71df2d32018-11-27 14:34:25 +0000169config FEATURE_SH_EMBEDDED_SCRIPTS
170 bool "Embed scripts in the binary"
171 default y
172 depends on ASH || HUSH || SH_IS_ASH || BASH_IS_ASH || SH_IS_HUSH || BASH_IS_HUSH
173 help
174 Allow scripts to be compressed and embedded in the busybox
175 binary. The scripts should be placed in the 'embed' directory
176 at build time. Like applets, scripts can be run as
177 'busybox SCRIPT ...' or by linking their name to the binary.
178
179 This also allows applets to be implemented as scripts: place
180 the script in 'applets_sh' and a stub C file containing
181 configuration in the appropriate subsystem directory.
182
Kang-Che Sung6cd02942017-01-06 17:02:03 +0100183endif # Options common to all shells
Denys Vlasenko2c4de5b2011-03-31 13:16:52 +0200184
Eric Andersenc9f20d92002-12-05 08:41:41 +0000185endmenu