Config.in 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. #
  2. # For a description of the syntax of this configuration file,
  3. # see scripts/kbuild/config-language.txt.
  4. #
  5. menu "Shells"
  6. config BUSYBOX_CONFIG_ASH
  7. bool "ash"
  8. default y
  9. depends on !BUSYBOX_CONFIG_NOMMU
  10. help
  11. Tha 'ash' shell adds about 60k in the default configuration and is
  12. the most complete and most pedantically correct shell included with
  13. busybox. This shell is actually a derivative of the Debian 'dash'
  14. shell (by Herbert Xu), which was created by porting the 'ash' shell
  15. (written by Kenneth Almquist) from NetBSD.
  16. config BUSYBOX_CONFIG_ASH_BASH_COMPAT
  17. bool "bash-compatible extensions"
  18. default y
  19. depends on BUSYBOX_CONFIG_ASH
  20. help
  21. Enable bash-compatible extensions.
  22. config BUSYBOX_CONFIG_ASH_JOB_CONTROL
  23. bool "Job control"
  24. default y
  25. depends on BUSYBOX_CONFIG_ASH
  26. help
  27. Enable job control in the ash shell.
  28. config BUSYBOX_CONFIG_ASH_ALIAS
  29. bool "alias support"
  30. default y
  31. depends on BUSYBOX_CONFIG_ASH
  32. help
  33. Enable alias support in the ash shell.
  34. config BUSYBOX_CONFIG_ASH_GETOPTS
  35. bool "Builtin getopt to parse positional parameters"
  36. default y
  37. depends on BUSYBOX_CONFIG_ASH
  38. help
  39. Enable getopts builtin in the ash shell.
  40. config BUSYBOX_CONFIG_ASH_BUILTIN_ECHO
  41. bool "Builtin version of 'echo'"
  42. default y
  43. depends on BUSYBOX_CONFIG_ASH
  44. help
  45. Enable support for echo, builtin to ash.
  46. config BUSYBOX_CONFIG_ASH_BUILTIN_PRINTF
  47. bool "Builtin version of 'printf'"
  48. default y
  49. depends on BUSYBOX_CONFIG_ASH
  50. help
  51. Enable support for printf, builtin to ash.
  52. config BUSYBOX_CONFIG_ASH_BUILTIN_TEST
  53. bool "Builtin version of 'test'"
  54. default y
  55. depends on BUSYBOX_CONFIG_ASH
  56. help
  57. Enable support for test, builtin to ash.
  58. config BUSYBOX_CONFIG_ASH_CMDCMD
  59. bool "'command' command to override shell builtins"
  60. default y
  61. depends on BUSYBOX_CONFIG_ASH
  62. help
  63. Enable support for the ash 'command' builtin, which allows
  64. you to run the specified command with the specified arguments,
  65. even when there is an ash builtin command with the same name.
  66. config BUSYBOX_CONFIG_ASH_MAIL
  67. bool "Check for new mail on interactive shells"
  68. default n
  69. depends on BUSYBOX_CONFIG_ASH
  70. help
  71. Enable "check for new mail" in the ash shell.
  72. config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE
  73. bool "Optimize for size instead of speed"
  74. default n
  75. depends on BUSYBOX_CONFIG_ASH
  76. help
  77. Compile ash for reduced size at the price of speed.
  78. config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT
  79. bool "Pseudorandom generator and $RANDOM variable"
  80. default n
  81. depends on BUSYBOX_CONFIG_ASH
  82. help
  83. Enable pseudorandom generator and dynamic variable "$RANDOM".
  84. Each read of "$RANDOM" will generate a new pseudorandom value.
  85. You can reset the generator by using a specified start value.
  86. After "unset RANDOM" the generator will switch off and this
  87. variable will no longer have special treatment.
  88. config BUSYBOX_CONFIG_ASH_EXPAND_PRMT
  89. bool "Expand prompt string"
  90. default y
  91. depends on BUSYBOX_CONFIG_ASH
  92. help
  93. "PS#" may contain volatile content, such as backquote commands.
  94. This option recreates the prompt string from the environment
  95. variable each time it is displayed.
  96. config BUSYBOX_CONFIG_HUSH
  97. bool "hush"
  98. default n
  99. help
  100. hush is a small shell (22k). It handles the normal flow control
  101. constructs such as if/then/elif/else/fi, for/in/do/done, while loops,
  102. case/esac. Redirections, here documents, $((arithmetic))
  103. and functions are supported.
  104. It will compile and work on no-mmu systems.
  105. It does not handle select, aliases, brace expansion,
  106. tilde expansion, &>file and >&file redirection of stdout+stderr.
  107. config BUSYBOX_CONFIG_HUSH_BASH_COMPAT
  108. bool "bash-compatible extensions"
  109. default y
  110. depends on BUSYBOX_CONFIG_HUSH
  111. help
  112. Enable bash-compatible extensions.
  113. config BUSYBOX_CONFIG_HUSH_HELP
  114. bool "help builtin"
  115. default y
  116. depends on BUSYBOX_CONFIG_HUSH
  117. help
  118. Enable help builtin in hush. Code size + ~1 kbyte.
  119. config BUSYBOX_CONFIG_HUSH_INTERACTIVE
  120. bool "Interactive mode"
  121. default y
  122. depends on BUSYBOX_CONFIG_HUSH
  123. help
  124. Enable interactive mode (prompt and command editing).
  125. Without this, hush simply reads and executes commands
  126. from stdin just like a shell script from a file.
  127. No prompt, no PS1/PS2 magic shell variables.
  128. config BUSYBOX_CONFIG_HUSH_JOB
  129. bool "Job control"
  130. default y
  131. depends on BUSYBOX_CONFIG_HUSH_INTERACTIVE
  132. help
  133. Enable job control: Ctrl-Z backgrounds, Ctrl-C interrupts current
  134. command (not entire shell), fg/bg builtins work. Without this option,
  135. "cmd &" still works by simply spawning a process and immediately
  136. prompting for next command (or executing next command in a script),
  137. but no separate process group is formed.
  138. config BUSYBOX_CONFIG_HUSH_TICK
  139. bool "Process substitution"
  140. default y
  141. depends on BUSYBOX_CONFIG_HUSH
  142. help
  143. Enable process substitution `command` and $(command) in hush.
  144. config BUSYBOX_CONFIG_HUSH_IF
  145. bool "Support if/then/elif/else/fi"
  146. default y
  147. depends on BUSYBOX_CONFIG_HUSH
  148. help
  149. Enable if/then/elif/else/fi in hush.
  150. config BUSYBOX_CONFIG_HUSH_LOOPS
  151. bool "Support for, while and until loops"
  152. default y
  153. depends on BUSYBOX_CONFIG_HUSH
  154. help
  155. Enable for, while and until loops in hush.
  156. config BUSYBOX_CONFIG_HUSH_CASE
  157. bool "Support case ... esac statement"
  158. default y
  159. depends on BUSYBOX_CONFIG_HUSH
  160. help
  161. Enable case ... esac statement in hush. +400 bytes.
  162. config BUSYBOX_CONFIG_HUSH_FUNCTIONS
  163. bool "Support funcname() { commands; } syntax"
  164. default y
  165. depends on BUSYBOX_CONFIG_HUSH
  166. help
  167. Enable support for shell functions in hush. +800 bytes.
  168. config BUSYBOX_CONFIG_HUSH_LOCAL
  169. bool "Support local builtin"
  170. default y
  171. depends on BUSYBOX_CONFIG_HUSH_FUNCTIONS
  172. help
  173. Enable support for local variables in functions.
  174. config BUSYBOX_CONFIG_HUSH_EXPORT_N
  175. bool "Support export '-n' option"
  176. default y
  177. depends on BUSYBOX_CONFIG_HUSH
  178. help
  179. Enable support for export '-n' option in hush. It is a bash extension.
  180. config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT
  181. bool "Pseudorandom generator and $RANDOM variable"
  182. default n
  183. depends on BUSYBOX_CONFIG_HUSH
  184. help
  185. Enable pseudorandom generator and dynamic variable "$RANDOM".
  186. Each read of "$RANDOM" will generate a new pseudorandom value.
  187. choice
  188. prompt "Choose which shell is aliased to 'sh' name"
  189. default BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
  190. help
  191. Choose which shell you want to be executed by 'sh' alias.
  192. The ash shell is the most bash compatible and full featured one.
  193. # note: cannot use "select ASH" here, it breaks "make allnoconfig"
  194. config BUSYBOX_CONFIG_FEATURE_SH_IS_ASH
  195. depends on BUSYBOX_CONFIG_ASH
  196. bool "ash"
  197. depends on !BUSYBOX_CONFIG_NOMMU
  198. config BUSYBOX_CONFIG_FEATURE_SH_IS_HUSH
  199. depends on BUSYBOX_CONFIG_HUSH
  200. bool "hush"
  201. config BUSYBOX_CONFIG_FEATURE_SH_IS_NONE
  202. bool "none"
  203. endchoice
  204. choice
  205. prompt "Choose which shell is aliased to 'bash' name"
  206. default BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE
  207. help
  208. Choose which shell you want to be executed by 'bash' alias.
  209. The ash shell is the most bash compatible and full featured one.
  210. Note that selecting this option does not switch on any bash
  211. compatibility code. It merely makes it possible to install
  212. /bin/bash (sym)link and run scripts which start with
  213. #!/bin/bash line.
  214. Many systems use it in scripts which use bash-specific features,
  215. even simple ones like $RANDOM. Without this option, busybox
  216. can't be used for running them because it won't recongnize
  217. "bash" as a supported applet name.
  218. config BUSYBOX_CONFIG_FEATURE_BASH_IS_ASH
  219. depends on BUSYBOX_CONFIG_ASH
  220. bool "ash"
  221. depends on !BUSYBOX_CONFIG_NOMMU
  222. config BUSYBOX_CONFIG_FEATURE_BASH_IS_HUSH
  223. depends on BUSYBOX_CONFIG_HUSH
  224. bool "hush"
  225. config BUSYBOX_CONFIG_FEATURE_BASH_IS_NONE
  226. bool "none"
  227. endchoice
  228. config BUSYBOX_CONFIG_LASH
  229. bool "lash (deprecated: aliased to hush)"
  230. default n
  231. select BUSYBOX_CONFIG_HUSH
  232. help
  233. lash is deprecated and will be removed, please migrate to hush.
  234. config BUSYBOX_CONFIG_MSH
  235. bool "msh (deprecated: please use hush)"
  236. default n
  237. select BUSYBOX_CONFIG_HUSH
  238. help
  239. msh is deprecated and will be removed, please migrate to hush.
  240. If there is a feature msh has but hush does not, please let us know.
  241. # The minix shell (adds just 30k) is quite complete and handles things
  242. # like for/do/done, case/esac and all the things you expect a Bourne
  243. # shell to do. It is not always pedantically correct about Bourne
  244. # shell grammar (try running the shell testscript "tests/sh.testcases"
  245. # on it and compare vs bash) but for most things it works quite well.
  246. # It uses only vfork, so it can be used on uClinux systems.
  247. config BUSYBOX_CONFIG_SH_MATH_SUPPORT
  248. bool "POSIX math support"
  249. default y
  250. depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH
  251. help
  252. Enable math support in the shell via $((...)) syntax.
  253. config BUSYBOX_CONFIG_SH_MATH_SUPPORT_64
  254. bool "Extend POSIX math support to 64 bit"
  255. default y
  256. depends on BUSYBOX_CONFIG_SH_MATH_SUPPORT
  257. help
  258. Enable 64-bit math support in the shell. This will make the shell
  259. slightly larger, but will allow computation with very large numbers.
  260. This is not in POSIX, so do not rely on this in portable code.
  261. config BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET
  262. bool "Hide message on interactive shell startup"
  263. default n
  264. depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH
  265. help
  266. Remove the busybox introduction when starting a shell.
  267. config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE
  268. bool "Standalone shell"
  269. default n
  270. depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
  271. help
  272. This option causes busybox shells to use busybox applets
  273. in preference to executables in the PATH whenever possible. For
  274. example, entering the command 'ifconfig' into the shell would cause
  275. busybox to use the ifconfig busybox applet. Specifying the fully
  276. qualified executable name, such as '/sbin/ifconfig' will still
  277. execute the /sbin/ifconfig executable on the filesystem. This option
  278. is generally used when creating a statically linked version of busybox
  279. for use as a rescue shell, in the event that you screw up your system.
  280. This is implemented by re-execing /proc/self/exe (typically)
  281. with right parameters. Some selected applets ("NOFORK" applets)
  282. can even be executed without creating new process.
  283. Instead, busybox will call <applet>_main() internally.
  284. However, this causes problems in chroot jails without mounted /proc
  285. and with ps/top (command name can be shown as 'exe' for applets
  286. started this way).
  287. # untrue?
  288. # Note that this will *also* cause applets to take precedence
  289. # over shell builtins of the same name. So turning this on will
  290. # eliminate any performance gained by turning on the builtin "echo"
  291. # and "test" commands in ash.
  292. # untrue?
  293. # Note that when using this option, the shell will attempt to directly
  294. # run '/bin/busybox'. If you do not have the busybox binary sitting in
  295. # that exact location with that exact name, this option will not work at
  296. # all.
  297. config BUSYBOX_CONFIG_FEATURE_SH_NOFORK
  298. bool "Run 'nofork' applets directly"
  299. default n
  300. depends on (BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_ASH) && BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS
  301. help
  302. This option causes busybox shells [currently only ash]
  303. to not execute typical fork/exec/wait sequence, but call <applet>_main
  304. directly, if possible. (Sometimes it is not possible: for example,
  305. this is not possible in pipes).
  306. This will be done only for some applets (those which are marked
  307. NOFORK in include/applets.h).
  308. This may significantly speed up some shell scripts.
  309. This feature is relatively new. Use with care.
  310. config BUSYBOX_CONFIG_CTTYHACK
  311. bool "cttyhack"
  312. default n
  313. help
  314. One common problem reported on the mailing list is "can't access tty;
  315. job control turned off" error message which typically appears when
  316. one tries to use shell with stdin/stdout opened to /dev/console.
  317. This device is special - it cannot be a controlling tty.
  318. Proper solution is to use correct device instead of /dev/console.
  319. cttyhack provides "quick and dirty" solution to this problem.
  320. It analyzes stdin with various ioctls, trying to determine whether
  321. it is a /dev/ttyN or /dev/ttySN (virtual terminal or serial line).
  322. If it detects one, it closes stdin/out/err and reopens that device.
  323. Then it executes given program. Opening the device will make
  324. that device a controlling tty. This may require cttyhack
  325. to be a session leader.
  326. Example for /etc/inittab (for busybox init):
  327. ::respawn:/bin/cttyhack /bin/sh
  328. Giving controlling tty to shell running with PID 1:
  329. $ exec cttyhack sh
  330. Starting an interactive shell from boot shell script:
  331. setsid cttyhack sh
  332. endmenu