Config.in 12 KB

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