Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 1 | # |
| 2 | # For a description of the syntax of this configuration file, |
| 3 | # see scripts/kbuild/config-language.txt. |
| 4 | # |
| 5 | |
Mike Frysinger | 9ac178a | 2005-09-24 05:49:36 +0000 | [diff] [blame] | 6 | menu "Shells" |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 7 | |
Denys Vlasenko | d70e0e9 | 2010-06-08 12:15:11 +0200 | [diff] [blame] | 8 | INSERT |
| 9 | |
Denys Vlasenko | c8aae0b | 2010-06-06 22:14:58 +0200 | [diff] [blame] | 10 | |
| 11 | choice |
| 12 | prompt "Choose which shell is aliased to 'sh' name" |
| 13 | default FEATURE_SH_IS_ASH |
| 14 | help |
| 15 | Choose which shell you want to be executed by 'sh' alias. |
| 16 | The ash shell is the most bash compatible and full featured one. |
| 17 | |
Denys Vlasenko | 121fb95 | 2010-06-07 13:34:34 +0200 | [diff] [blame] | 18 | # note: cannot use "select ASH" here, it breaks "make allnoconfig" |
Denys Vlasenko | c8aae0b | 2010-06-06 22:14:58 +0200 | [diff] [blame] | 19 | config FEATURE_SH_IS_ASH |
| 20 | depends on ASH |
| 21 | bool "ash" |
| 22 | depends on !NOMMU |
| 23 | |
| 24 | config FEATURE_SH_IS_HUSH |
| 25 | depends on HUSH |
| 26 | bool "hush" |
| 27 | |
| 28 | config FEATURE_SH_IS_NONE |
| 29 | bool "none" |
| 30 | |
| 31 | endchoice |
| 32 | |
| 33 | choice |
| 34 | prompt "Choose which shell is aliased to 'bash' name" |
| 35 | default FEATURE_BASH_IS_NONE |
| 36 | help |
| 37 | Choose which shell you want to be executed by 'bash' alias. |
| 38 | The ash shell is the most bash compatible and full featured one. |
| 39 | |
| 40 | Note that selecting this option does not switch on any bash |
| 41 | compatibility code. It merely makes it possible to install |
| 42 | /bin/bash (sym)link and run scripts which start with |
| 43 | #!/bin/bash line. |
| 44 | |
| 45 | Many systems use it in scripts which use bash-specific features, |
| 46 | even simple ones like $RANDOM. Without this option, busybox |
| 47 | can't be used for running them because it won't recongnize |
| 48 | "bash" as a supported applet name. |
| 49 | |
| 50 | config FEATURE_BASH_IS_ASH |
| 51 | depends on ASH |
| 52 | bool "ash" |
| 53 | depends on !NOMMU |
| 54 | |
| 55 | config FEATURE_BASH_IS_HUSH |
| 56 | depends on HUSH |
| 57 | bool "hush" |
| 58 | |
| 59 | config FEATURE_BASH_IS_NONE |
| 60 | bool "none" |
| 61 | |
| 62 | endchoice |
| 63 | |
| 64 | |
Mike Frysinger | 98c5264 | 2009-04-02 10:02:37 +0000 | [diff] [blame] | 65 | config SH_MATH_SUPPORT |
| 66 | bool "POSIX math support" |
| 67 | default y |
| 68 | depends on ASH || HUSH |
| 69 | help |
| 70 | Enable math support in the shell via $((...)) syntax. |
| 71 | |
| 72 | config SH_MATH_SUPPORT_64 |
| 73 | bool "Extend POSIX math support to 64 bit" |
Denys Vlasenko | 2f32bf8 | 2010-06-06 04:14:28 +0200 | [diff] [blame] | 74 | default y |
Mike Frysinger | 98c5264 | 2009-04-02 10:02:37 +0000 | [diff] [blame] | 75 | depends on SH_MATH_SUPPORT |
| 76 | help |
| 77 | Enable 64-bit math support in the shell. This will make the shell |
| 78 | slightly larger, but will allow computation with very large numbers. |
| 79 | This is not in POSIX, so do not rely on this in portable code. |
| 80 | |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 81 | config FEATURE_SH_EXTRA_QUIET |
Glenn L McGrath | 3b25185 | 2004-01-03 12:07:32 +0000 | [diff] [blame] | 82 | bool "Hide message on interactive shell startup" |
Denys Vlasenko | 2f32bf8 | 2010-06-06 04:14:28 +0200 | [diff] [blame] | 83 | default y |
| 84 | depends on HUSH || ASH |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 85 | help |
Glenn L McGrath | 3b25185 | 2004-01-03 12:07:32 +0000 | [diff] [blame] | 86 | Remove the busybox introduction when starting a shell. |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 87 | |
Denis Vlasenko | 80d14be | 2007-04-10 23:03:30 +0000 | [diff] [blame] | 88 | config FEATURE_SH_STANDALONE |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 89 | bool "Standalone shell" |
| 90 | default n |
Denys Vlasenko | 2f32bf8 | 2010-06-06 04:14:28 +0200 | [diff] [blame] | 91 | depends on (HUSH || ASH) && FEATURE_PREFER_APPLETS |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 92 | help |
Denis Vlasenko | 92c0b82 | 2007-05-08 17:27:17 +0000 | [diff] [blame] | 93 | This option causes busybox shells to use busybox applets |
Bernhard Reutner-Fischer | 3e8669f | 2008-07-22 18:27:53 +0000 | [diff] [blame] | 94 | in preference to executables in the PATH whenever possible. For |
Eric Andersen | 075dd81 | 2004-04-07 09:34:27 +0000 | [diff] [blame] | 95 | example, entering the command 'ifconfig' into the shell would cause |
Bernhard Reutner-Fischer | 3e8669f | 2008-07-22 18:27:53 +0000 | [diff] [blame] | 96 | busybox to use the ifconfig busybox applet. Specifying the fully |
Eric Andersen | 075dd81 | 2004-04-07 09:34:27 +0000 | [diff] [blame] | 97 | qualified executable name, such as '/sbin/ifconfig' will still |
Bernhard Reutner-Fischer | 3e8669f | 2008-07-22 18:27:53 +0000 | [diff] [blame] | 98 | execute the /sbin/ifconfig executable on the filesystem. This option |
Rob Landley | 06ec8cf | 2006-03-03 19:02:50 +0000 | [diff] [blame] | 99 | is generally used when creating a statically linked version of busybox |
Eric Andersen | 075dd81 | 2004-04-07 09:34:27 +0000 | [diff] [blame] | 100 | for use as a rescue shell, in the event that you screw up your system. |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 101 | |
Denis Vlasenko | 92c0b82 | 2007-05-08 17:27:17 +0000 | [diff] [blame] | 102 | This is implemented by re-execing /proc/self/exe (typically) |
| 103 | with right parameters. Some selected applets ("NOFORK" applets) |
| 104 | can even be executed without creating new process. |
| 105 | Instead, busybox will call <applet>_main() internally. |
Paul Fox | 6ab0378 | 2006-06-08 21:37:26 +0000 | [diff] [blame] | 106 | |
Denis Vlasenko | 92c0b82 | 2007-05-08 17:27:17 +0000 | [diff] [blame] | 107 | However, this causes problems in chroot jails without mounted /proc |
| 108 | and with ps/top (command name can be shown as 'exe' for applets |
| 109 | started this way). |
| 110 | # untrue? |
| 111 | # Note that this will *also* cause applets to take precedence |
Bernhard Reutner-Fischer | 3e8669f | 2008-07-22 18:27:53 +0000 | [diff] [blame] | 112 | # over shell builtins of the same name. So turning this on will |
Denis Vlasenko | 92c0b82 | 2007-05-08 17:27:17 +0000 | [diff] [blame] | 113 | # eliminate any performance gained by turning on the builtin "echo" |
| 114 | # and "test" commands in ash. |
| 115 | # untrue? |
| 116 | # Note that when using this option, the shell will attempt to directly |
Bernhard Reutner-Fischer | 3e8669f | 2008-07-22 18:27:53 +0000 | [diff] [blame] | 117 | # run '/bin/busybox'. If you do not have the busybox binary sitting in |
Denis Vlasenko | 92c0b82 | 2007-05-08 17:27:17 +0000 | [diff] [blame] | 118 | # that exact location with that exact name, this option will not work at |
| 119 | # all. |
Eric Andersen | 6f8542b | 2004-09-24 01:25:39 +0000 | [diff] [blame] | 120 | |
Denis Vlasenko | 9bc80d7 | 2008-04-12 20:07:53 +0000 | [diff] [blame] | 121 | config FEATURE_SH_NOFORK |
| 122 | bool "Run 'nofork' applets directly" |
| 123 | default n |
Denys Vlasenko | 2f32bf8 | 2010-06-06 04:14:28 +0200 | [diff] [blame] | 124 | depends on (HUSH || ASH) && FEATURE_PREFER_APPLETS |
Denis Vlasenko | 9bc80d7 | 2008-04-12 20:07:53 +0000 | [diff] [blame] | 125 | help |
Denys Vlasenko | b72baeb | 2011-02-02 18:38:57 +0100 | [diff] [blame^] | 126 | This option causes busybox shells to not execute typical |
| 127 | fork/exec/wait sequence, but call <applet>_main directly, |
| 128 | if possible. (Sometimes it is not possible: for example, |
Denis Vlasenko | 9bc80d7 | 2008-04-12 20:07:53 +0000 | [diff] [blame] | 129 | this is not possible in pipes). |
| 130 | |
| 131 | This will be done only for some applets (those which are marked |
| 132 | NOFORK in include/applets.h). |
| 133 | |
| 134 | This may significantly speed up some shell scripts. |
| 135 | |
Denys Vlasenko | b72baeb | 2011-02-02 18:38:57 +0100 | [diff] [blame^] | 136 | This feature is relatively new. Use with care. Report bugs |
| 137 | to project mailing list. |
Denis Vlasenko | 9bc80d7 | 2008-04-12 20:07:53 +0000 | [diff] [blame] | 138 | |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 139 | endmenu |