Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 1 | # |
| 2 | # For a description of the syntax of this configuration file, |
Kartik Agaram | 43b17b1 | 2018-05-31 22:15:55 -0700 | [diff] [blame] | 3 | # see docs/Kconfig-language.txt. |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 4 | # |
| 5 | |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 6 | mainmenu "Configuration" |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 7 | |
Eric Andersen | 068b6b0 | 2002-12-13 22:53:28 +0000 | [diff] [blame] | 8 | config HAVE_DOT_CONFIG |
| 9 | bool |
| 10 | default y |
| 11 | |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 12 | menu "Settings" |
Mike Frysinger | 72d59db | 2006-03-10 23:17:17 +0000 | [diff] [blame] | 13 | |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 14 | config DESKTOP |
Denys Vlasenko | 4bdc914 | 2019-01-06 20:12:16 +0100 | [diff] [blame] | 15 | bool "Enable compatibility for full-blown desktop systems (8kb)" |
Denys Vlasenko | ba085c6 | 2010-07-21 08:58:11 +0200 | [diff] [blame] | 16 | default y |
Denis Vlasenko | 97a8dd3 | 2006-10-01 15:55:11 +0000 | [diff] [blame] | 17 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 18 | Enable applet options and features which are not essential. |
| 19 | Many applet options have dedicated config options to (de)select them |
| 20 | under that applet; this options enables those options which have no |
| 21 | individual config item for them. |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 22 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 23 | Select this if you plan to use busybox on full-blown desktop machine |
| 24 | with common Linux distro, which needs higher level of command-line |
| 25 | compatibility. |
Denys Vlasenko | 3360226 | 2016-11-24 22:08:12 +0100 | [diff] [blame] | 26 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 27 | If you are preparing your build to be used on an embedded box |
| 28 | where you have tighter control over the entire set of userspace |
| 29 | tools, you can unselect this option for smaller code size. |
Denis Vlasenko | 97a8dd3 | 2006-10-01 15:55:11 +0000 | [diff] [blame] | 30 | |
Denis Vlasenko | 3fd15e1 | 2008-08-09 16:15:14 +0000 | [diff] [blame] | 31 | config EXTRA_COMPAT |
| 32 | bool "Provide compatible behavior for rare corner cases (bigger code)" |
| 33 | default n |
| 34 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 35 | This option makes grep, sed etc handle rare corner cases |
| 36 | (embedded NUL bytes and such). This makes code bigger and uses |
| 37 | some GNU extensions in libc. You probably only need this option |
| 38 | if you plan to run busybox on desktop. |
Denis Vlasenko | 3fd15e1 | 2008-08-09 16:15:14 +0000 | [diff] [blame] | 39 | |
Denys Vlasenko | 663ae52 | 2017-08-03 03:46:14 +0200 | [diff] [blame] | 40 | config FEDORA_COMPAT |
| 41 | bool "Building for Fedora distribution" |
| 42 | default n |
| 43 | help |
| 44 | This option makes some tools behave like they do on Fedora. |
| 45 | |
| 46 | At the time of this writing (2017-08) this only affects uname: |
| 47 | normally, uname -p (processor) and uname -i (platform) |
| 48 | are shown as "unknown", but with this option uname -p |
| 49 | shows the same string as uname -m (machine type), |
| 50 | and so does uname -i unless machine type is i486/i586/i686 - |
| 51 | then uname -i shows "i386". |
| 52 | |
Denys Vlasenko | a8df4c0 | 2009-10-19 18:56:26 +0200 | [diff] [blame] | 53 | config INCLUDE_SUSv2 |
| 54 | bool "Enable obsolete features removed before SUSv3" |
| 55 | default y |
| 56 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 57 | This option will enable backwards compatibility with SuSv2, |
| 58 | specifically, old-style numeric options ('command -1 <file>') |
| 59 | will be supported in head, tail, and fold. (Note: should |
| 60 | affect renice too.) |
Denys Vlasenko | a8df4c0 | 2009-10-19 18:56:26 +0200 | [diff] [blame] | 61 | |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 62 | config LONG_OPTS |
| 63 | bool "Support --long-options" |
| 64 | default y |
Denys Vlasenko | aa7da73 | 2009-09-13 14:57:24 +0200 | [diff] [blame] | 65 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 66 | Enable this if you want busybox applets to use the gnu --long-option |
| 67 | style, in addition to single character -a -b -c style options. |
Denys Vlasenko | aa7da73 | 2009-09-13 14:57:24 +0200 | [diff] [blame] | 68 | |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 69 | config SHOW_USAGE |
Bernhard Reutner-Fischer | b9f4cd8 | 2011-11-09 20:23:38 +0100 | [diff] [blame] | 70 | bool "Show applet usage messages" |
Bernhard Reutner-Fischer | 81901a0 | 2006-03-31 18:43:55 +0000 | [diff] [blame] | 71 | default y |
| 72 | help |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 73 | Enabling this option, applets will show terse help messages |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 74 | when invoked with wrong arguments. |
| 75 | If you do not want to show any (helpful) usage message when |
| 76 | issuing wrong command syntax, you can say 'N' here, |
| 77 | saving approximately 7k. |
Bernhard Reutner-Fischer | 81901a0 | 2006-03-31 18:43:55 +0000 | [diff] [blame] | 78 | |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 79 | config FEATURE_VERBOSE_USAGE |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 80 | bool "Show verbose applet usage messages" |
Denys Vlasenko | 2f32bf8 | 2010-06-06 04:14:28 +0200 | [diff] [blame] | 81 | default y |
Denys Vlasenko | 0e5ba08 | 2010-06-05 23:11:07 +0200 | [diff] [blame] | 82 | depends on SHOW_USAGE |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 83 | help |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 84 | All applets will show verbose help messages when invoked with --help. |
| 85 | This will add a lot of text to the binary. |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 86 | |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 87 | config FEATURE_COMPRESS_USAGE |
Rob Landley | 7e21d5f | 2006-04-27 23:34:46 +0000 | [diff] [blame] | 88 | bool "Store applet usage messages in compressed form" |
| 89 | default y |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 90 | depends on SHOW_USAGE |
Rob Landley | 7e21d5f | 2006-04-27 23:34:46 +0000 | [diff] [blame] | 91 | help |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 92 | Store usage messages in .bz2 compressed form, uncompress them |
| 93 | on-the-fly when "APPLET --help" is run. |
Rob Landley | 7e21d5f | 2006-04-27 23:34:46 +0000 | [diff] [blame] | 94 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 95 | If you have a really tiny busybox with few applets enabled (and |
| 96 | bunzip2 isn't one of them), the overhead of the decompressor might |
| 97 | be noticeable. Also, if you run executables directly from ROM |
| 98 | and have very little memory, this might not be a win. Otherwise, |
| 99 | you probably want this. |
Rob Landley | c7ddefc | 2006-06-14 01:24:33 +0000 | [diff] [blame] | 100 | |
Denys Vlasenko | a3df2fa | 2017-07-15 20:49:32 +0200 | [diff] [blame] | 101 | config LFS |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 102 | bool "Support files > 2 GB" |
Denys Vlasenko | a3df2fa | 2017-07-15 20:49:32 +0200 | [diff] [blame] | 103 | default y |
| 104 | help |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 105 | If you need to work with large files, enable this option. |
| 106 | This will have no effect if your kernel or your C |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 107 | library lacks large file support for large files. Some of the |
| 108 | programs that can benefit from large file support include dd, gzip, |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 109 | cp, mount, tar. |
Denys Vlasenko | a3df2fa | 2017-07-15 20:49:32 +0200 | [diff] [blame] | 110 | |
Bartosz Golaszewski | 265a74b | 2014-02-11 21:31:42 +0100 | [diff] [blame] | 111 | config PAM |
Denys Vlasenko | f560422 | 2017-01-10 14:58:54 +0100 | [diff] [blame] | 112 | bool "Support PAM (Pluggable Authentication Modules)" |
Bartosz Golaszewski | 265a74b | 2014-02-11 21:31:42 +0100 | [diff] [blame] | 113 | default n |
| 114 | help |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 115 | Use PAM in some applets (currently login and httpd) instead |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 116 | of direct access to password database. |
Bartosz Golaszewski | 265a74b | 2014-02-11 21:31:42 +0100 | [diff] [blame] | 117 | |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 118 | config FEATURE_DEVPTS |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 119 | bool "Use the devpts filesystem for Unix98 PTYs" |
Rob Landley | c7ddefc | 2006-06-14 01:24:33 +0000 | [diff] [blame] | 120 | default y |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 121 | help |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 122 | Enable if you want to use Unix98 PTY support. If enabled, |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 123 | busybox will use /dev/ptmx for the master side of the pseudoterminal |
| 124 | and /dev/pts/<number> for the slave side. Otherwise, BSD style |
| 125 | /dev/ttyp<number> will be used. To use this option, you should have |
| 126 | devpts mounted. |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 127 | |
Denys Vlasenko | d4d289a | 2010-10-12 04:18:05 +0200 | [diff] [blame] | 128 | config FEATURE_UTMP |
| 129 | bool "Support utmp file" |
| 130 | default y |
| 131 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 132 | The file /var/run/utmp is used to track who is currently logged in. |
| 133 | With this option on, certain applets (getty, login, telnetd etc) |
| 134 | will create and delete entries there. |
| 135 | "who" applet requires this option. |
Denys Vlasenko | d4d289a | 2010-10-12 04:18:05 +0200 | [diff] [blame] | 136 | |
Denys Vlasenko | 8d0e0cd | 2011-01-25 23:21:46 +0100 | [diff] [blame] | 137 | config FEATURE_WTMP |
| 138 | bool "Support wtmp file" |
| 139 | default y |
| 140 | depends on FEATURE_UTMP |
| 141 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 142 | The file /var/run/wtmp is used to track when users have logged into |
| 143 | and logged out of the system. |
| 144 | With this option on, certain applets (getty, login, telnetd etc) |
| 145 | will append new entries there. |
| 146 | "last" applet requires this option. |
Denys Vlasenko | 8d0e0cd | 2011-01-25 23:21:46 +0100 | [diff] [blame] | 147 | |
Denis Vlasenko | 10457b9 | 2007-03-27 22:01:31 +0000 | [diff] [blame] | 148 | config FEATURE_PIDFILE |
| 149 | bool "Support writing pidfiles" |
Denys Vlasenko | 2f32bf8 | 2010-06-06 04:14:28 +0200 | [diff] [blame] | 150 | default y |
Denis Vlasenko | 10457b9 | 2007-03-27 22:01:31 +0000 | [diff] [blame] | 151 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 152 | This option makes some applets (e.g. crond, syslogd, inetd) write |
| 153 | a pidfile at the configured PID_FILE_PATH. It has no effect |
| 154 | on applets which require pidfiles to run. |
Anthony G. Basile | 12677ac | 2012-12-10 14:49:39 -0500 | [diff] [blame] | 155 | |
| 156 | config PID_FILE_PATH |
Denys Vlasenko | a3df2fa | 2017-07-15 20:49:32 +0200 | [diff] [blame] | 157 | string "Directory for pidfiles" |
Anthony G. Basile | 12677ac | 2012-12-10 14:49:39 -0500 | [diff] [blame] | 158 | default "/var/run" |
| 159 | depends on FEATURE_PIDFILE |
| 160 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 161 | This is the default path where pidfiles are created. Applets which |
| 162 | allow you to set the pidfile path on the command line will override |
| 163 | this value. The option has no effect on applets that require you to |
| 164 | specify a pidfile path. |
Denis Vlasenko | 10457b9 | 2007-03-27 22:01:31 +0000 | [diff] [blame] | 165 | |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 166 | config BUSYBOX |
| 167 | bool "Include busybox applet" |
| 168 | default y |
| 169 | help |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 170 | The busybox applet provides general help message and allows |
| 171 | the included applets to be listed. It also provides |
| 172 | optional --install command to create applet links. If you unselect |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 173 | this option, running busybox without any arguments will give |
| 174 | just a cryptic error message: |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 175 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 176 | $ busybox |
| 177 | busybox: applet not found |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 178 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 179 | Running "busybox APPLET [ARGS...]" will still work, of course. |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 180 | |
Ron Yorston | d1b2ae2 | 2018-11-18 19:12:26 +0100 | [diff] [blame] | 181 | config FEATURE_SHOW_SCRIPT |
| 182 | bool "Support --show SCRIPT" |
| 183 | default y |
| 184 | depends on BUSYBOX |
| 185 | |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 186 | config FEATURE_INSTALLER |
| 187 | bool "Support --install [-s] to install applet links at runtime" |
| 188 | default y |
| 189 | depends on BUSYBOX |
| 190 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 191 | Enable 'busybox --install [-s]' support. This will allow you to use |
| 192 | busybox at runtime to create hard links or symlinks for all the |
| 193 | applets that are compiled into busybox. |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 194 | |
| 195 | config INSTALL_NO_USR |
| 196 | bool "Don't use /usr" |
| 197 | default n |
| 198 | help |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 199 | Disable use of /usr. "busybox --install" and "make install" |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 200 | will install applets only to /bin and /sbin, |
| 201 | never to /usr/bin or /usr/sbin. |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 202 | |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 203 | config FEATURE_SUID |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 204 | bool "Drop SUID state for most applets" |
Denys Vlasenko | 2f32bf8 | 2010-06-06 04:14:28 +0200 | [diff] [blame] | 205 | default y |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 206 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 207 | With this option you can install the busybox binary belonging |
| 208 | to root with the suid bit set, enabling some applets to perform |
| 209 | root-level operations even when run by ordinary users |
| 210 | (for example, mounting of user mounts in fstab needs this). |
Denys Vlasenko | d4d289a | 2010-10-12 04:18:05 +0200 | [diff] [blame] | 211 | |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 212 | With this option enabled, busybox drops privileges for applets |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 213 | that don't need root access, before entering their main() function. |
Rob Landley | d5b9b60 | 2006-05-31 23:23:42 +0000 | [diff] [blame] | 214 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 215 | If you are really paranoid and don't want even initial busybox code |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 216 | to run under root for every applet, build two busybox binaries with |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 217 | different applets in them (and the appropriate symlinks pointing |
| 218 | to each binary), and only set the suid bit on the one that needs it. |
Denys Vlasenko | d4d289a | 2010-10-12 04:18:05 +0200 | [diff] [blame] | 219 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 220 | Some applets which require root rights (need suid bit on the binary |
| 221 | or to be run by root) and will refuse to execute otherwise: |
| 222 | crontab, login, passwd, su, vlock, wall. |
Bernhard Reutner-Fischer | aa2a1c0 | 2008-10-24 19:48:47 +0000 | [diff] [blame] | 223 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 224 | The applets which will use root rights if they have them |
| 225 | (via suid bit, or because run by root), but would try to work |
| 226 | without root right nevertheless: |
| 227 | findfs, ping[6], traceroute[6], mount. |
Denys Vlasenko | 3b5acaa | 2011-01-18 13:52:48 +0100 | [diff] [blame] | 228 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 229 | Note that if you DO NOT select this option, but DO make busybox |
| 230 | suid root, ALL applets will run under root, which is a huge |
| 231 | security hole (think "cp /some/file /etc/passwd"). |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 232 | |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 233 | config FEATURE_SUID_CONFIG |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 234 | bool "Enable SUID configuration via /etc/busybox.conf" |
Denys Vlasenko | e0238f8 | 2011-05-14 15:23:55 +0200 | [diff] [blame] | 235 | default y |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 236 | depends on FEATURE_SUID |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 237 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 238 | Allow the SUID/SGID state of an applet to be determined at runtime |
| 239 | by checking /etc/busybox.conf. (This is sort of a poor man's sudo.) |
| 240 | The format of this file is as follows: |
Eric Andersen | e527207 | 2003-07-22 22:15:21 +0000 | [diff] [blame] | 241 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 242 | APPLET = [Ssx-][Ssx-][x-] [USER.GROUP] |
Denys Vlasenko | 3770b6b | 2011-05-16 13:19:25 +0200 | [diff] [blame] | 243 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 244 | s: USER or GROUP is allowed to execute APPLET. |
| 245 | APPLET will run under USER or GROUP |
| 246 | (regardless of who's running it). |
| 247 | S: USER or GROUP is NOT allowed to execute APPLET. |
| 248 | APPLET will run under USER or GROUP. |
| 249 | This option is not very sensical. |
| 250 | x: USER/GROUP/others are allowed to execute APPLET. |
| 251 | No UID/GID change will be done when it is run. |
| 252 | -: USER/GROUP/others are not allowed to execute APPLET. |
Eric Andersen | 5043ea1 | 2005-06-23 19:15:40 +0000 | [diff] [blame] | 253 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 254 | An example might help: |
Eric Andersen | e527207 | 2003-07-22 22:15:21 +0000 | [diff] [blame] | 255 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 256 | |[SUID] |
| 257 | |su = ssx root.0 # applet su can be run by anyone and runs with |
| 258 | | # euid=0,egid=0 |
| 259 | |su = ssx # exactly the same |
| 260 | | |
| 261 | |mount = sx- root.disk # applet mount can be run by root and members |
| 262 | | # of group disk (but not anyone else) |
| 263 | | # and runs with euid=0 (egid is not changed) |
| 264 | | |
| 265 | |cp = --- # disable applet cp for everyone |
Eric Andersen | e527207 | 2003-07-22 22:15:21 +0000 | [diff] [blame] | 266 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 267 | The file has to be owned by user root, group root and has to be |
| 268 | writeable only by root: |
| 269 | (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf) |
| 270 | The busybox executable has to be owned by user root, group |
| 271 | root and has to be setuid root for this to work: |
| 272 | (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox) |
Eric Andersen | e527207 | 2003-07-22 22:15:21 +0000 | [diff] [blame] | 273 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 274 | Robert 'sandman' Griebl has more information here: |
| 275 | <url: http://www.softforge.de/bb/suid.html >. |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 276 | |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 277 | config FEATURE_SUID_CONFIG_QUIET |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 278 | bool "Suppress warning message if /etc/busybox.conf is not readable" |
Rob Landley | d5b9b60 | 2006-05-31 23:23:42 +0000 | [diff] [blame] | 279 | default y |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 280 | depends on FEATURE_SUID_CONFIG |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 281 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 282 | /etc/busybox.conf should be readable by the user needing the SUID, |
| 283 | check this option to avoid users to be notified about missing |
| 284 | permissions. |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 285 | |
Denis Vlasenko | 80d14be | 2007-04-10 23:03:30 +0000 | [diff] [blame] | 286 | config FEATURE_PREFER_APPLETS |
Denis Vlasenko | 2f0c0d0 | 2007-01-21 00:41:04 +0000 | [diff] [blame] | 287 | bool "exec prefers applets" |
| 288 | default n |
| 289 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 290 | This is an experimental option which directs applets about to |
| 291 | call 'exec' to try and find an applicable busybox applet before |
| 292 | searching the PATH. This is typically done by exec'ing |
| 293 | /proc/self/exe. |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 294 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 295 | This may affect shell, find -exec, xargs and similar applets. |
| 296 | They will use applets even if /bin/APPLET -> busybox link |
| 297 | is missing (or is not a link to busybox). However, this causes |
| 298 | problems in chroot jails without mounted /proc and with ps/top |
| 299 | (command name can be shown as 'exe' for applets started this way). |
Denis Vlasenko | 2f0c0d0 | 2007-01-21 00:41:04 +0000 | [diff] [blame] | 300 | |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 301 | config BUSYBOX_EXEC_PATH |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 302 | string "Path to busybox executable" |
Rob Landley | c7ddefc | 2006-06-14 01:24:33 +0000 | [diff] [blame] | 303 | default "/proc/self/exe" |
| 304 | help |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 305 | When applets need to run other applets, busybox |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 306 | sometimes needs to exec() itself. When the /proc filesystem is |
| 307 | mounted, /proc/self/exe always points to the currently running |
| 308 | executable. If you haven't got /proc, set this to wherever you |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 309 | want to run busybox from. |
Rob Landley | c7ddefc | 2006-06-14 01:24:33 +0000 | [diff] [blame] | 310 | |
Denys Vlasenko | a3df2fa | 2017-07-15 20:49:32 +0200 | [diff] [blame] | 311 | config SELINUX |
| 312 | bool "Support NSA Security Enhanced Linux" |
| 313 | default n |
| 314 | select PLATFORM_LINUX |
| 315 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 316 | Enable support for SELinux in applets ls, ps, and id. Also provide |
| 317 | the option of compiling in SELinux applets. |
Denys Vlasenko | a3df2fa | 2017-07-15 20:49:32 +0200 | [diff] [blame] | 318 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 319 | If you do not have a complete SELinux userland installed, this stuff |
| 320 | will not compile. Specifially, libselinux 1.28 or better is |
| 321 | directly required by busybox. If the installation is located in a |
| 322 | non-standard directory, provide it by invoking make as follows: |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 323 | |
Denys Vlasenko | a3df2fa | 2017-07-15 20:49:32 +0200 | [diff] [blame] | 324 | CFLAGS=-I<libselinux-include-path> \ |
| 325 | LDFLAGS=-L<libselinux-lib-path> \ |
| 326 | make |
| 327 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 328 | Most people will leave this set to 'N'. |
Denys Vlasenko | a3df2fa | 2017-07-15 20:49:32 +0200 | [diff] [blame] | 329 | |
| 330 | config FEATURE_CLEAN_UP |
| 331 | bool "Clean up all memory before exiting (usually not needed)" |
| 332 | default n |
| 333 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 334 | As a size optimization, busybox normally exits without explicitly |
| 335 | freeing dynamically allocated memory or closing files. This saves |
| 336 | space since the OS will clean up for us, but it can confuse debuggers |
| 337 | like valgrind, which report tons of memory and resource leaks. |
Denys Vlasenko | a3df2fa | 2017-07-15 20:49:32 +0200 | [diff] [blame] | 338 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 339 | Don't enable this unless you have a really good reason to clean |
| 340 | things up manually. |
Denys Vlasenko | a3df2fa | 2017-07-15 20:49:32 +0200 | [diff] [blame] | 341 | |
James Byrne | 253c4e7 | 2019-04-12 17:01:51 +0000 | [diff] [blame] | 342 | config FEATURE_SYSLOG_INFO |
| 343 | bool "Support LOG_INFO level syslog messages" |
| 344 | default y |
| 345 | depends on FEATURE_SYSLOG |
| 346 | help |
| 347 | Applets which send their output to syslog use either LOG_INFO or |
| 348 | LOG_ERR log levels, but by disabling this option all messages will |
| 349 | be logged at the LOG_ERR level, saving just under 200 bytes. |
| 350 | |
Denis Vlasenko | a7825f2 | 2007-06-16 13:56:51 +0000 | [diff] [blame] | 351 | # These are auto-selected by other options |
| 352 | |
| 353 | config FEATURE_SYSLOG |
Denis Vlasenko | 35a064b | 2008-11-06 00:49:59 +0000 | [diff] [blame] | 354 | bool #No description makes it a hidden option |
Denis Vlasenko | a7825f2 | 2007-06-16 13:56:51 +0000 | [diff] [blame] | 355 | default n |
Denis Vlasenko | 35a064b | 2008-11-06 00:49:59 +0000 | [diff] [blame] | 356 | #help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 357 | #This option is auto-selected when you select any applet which may |
| 358 | #send its output to syslog. You do not need to select it manually. |
Denis Vlasenko | a7825f2 | 2007-06-16 13:56:51 +0000 | [diff] [blame] | 359 | |
Kang-Che Sung | 4d06b31 | 2017-01-07 15:16:46 +0800 | [diff] [blame] | 360 | config PLATFORM_LINUX |
| 361 | bool #No description makes it a hidden option |
| 362 | default n |
| 363 | #help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 364 | #For the most part, busybox requires only POSIX compatibility |
| 365 | #from the target system, but some applets and features use |
| 366 | #Linux-specific interfaces. |
Kang-Che Sung | 4d06b31 | 2017-01-07 15:16:46 +0800 | [diff] [blame] | 367 | # |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 368 | #This is automatically selected if any applet or feature requires |
| 369 | #Linux-specific interfaces. You do not need to select it manually. |
Kang-Che Sung | 4d06b31 | 2017-01-07 15:16:46 +0800 | [diff] [blame] | 370 | |
Denys Vlasenko | 3360226 | 2016-11-24 22:08:12 +0100 | [diff] [blame] | 371 | comment 'Build Options' |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 372 | |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 373 | config STATIC |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 374 | bool "Build static binary (no shared libs)" |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 375 | default n |
| 376 | help |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 377 | If you want to build a static binary, which does not use |
| 378 | or require any shared libraries, enable this option. |
| 379 | Static binaries are larger, but do not require functioning |
| 380 | dynamic libraries to be present, which is important if used |
| 381 | as a system rescue tool. |
Eric Andersen | e527207 | 2003-07-22 22:15:21 +0000 | [diff] [blame] | 382 | |
Denis Vlasenko | 1da86d2 | 2008-06-04 11:28:24 +0000 | [diff] [blame] | 383 | config PIE |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 384 | bool "Build position independent executable" |
Denis Vlasenko | 1da86d2 | 2008-06-04 11:28:24 +0000 | [diff] [blame] | 385 | default n |
| 386 | depends on !STATIC |
| 387 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 388 | Hardened code option. PIE binaries are loaded at a different |
| 389 | address at each invocation. This has some overhead, |
| 390 | particularly on x86-32 which is short on registers. |
Gilles Espinasse | 26b80e8 | 2011-02-13 22:54:37 +0100 | [diff] [blame] | 391 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 392 | Most people will leave this set to 'N'. |
Denis Vlasenko | 1da86d2 | 2008-06-04 11:28:24 +0000 | [diff] [blame] | 393 | |
Denis Vlasenko | d2c450c | 2008-01-08 20:32:12 +0000 | [diff] [blame] | 394 | config NOMMU |
| 395 | bool "Force NOMMU build" |
| 396 | default n |
| 397 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 398 | Busybox tries to detect whether architecture it is being |
| 399 | built against supports MMU or not. If this detection fails, |
| 400 | or if you want to build NOMMU version of busybox for testing, |
| 401 | you may force NOMMU build here. |
Denis Vlasenko | d2c450c | 2008-01-08 20:32:12 +0000 | [diff] [blame] | 402 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 403 | Most people will leave this set to 'N'. |
Denis Vlasenko | d2c450c | 2008-01-08 20:32:12 +0000 | [diff] [blame] | 404 | |
Denis Vlasenko | cc3f20b | 2008-06-23 22:31:52 +0000 | [diff] [blame] | 405 | # PIE can be made to work with BUILD_LIBBUSYBOX, but currently |
| 406 | # build system does not support that |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 407 | config BUILD_LIBBUSYBOX |
Bernhard Reutner-Fischer | 2aba395 | 2006-01-24 16:14:14 +0000 | [diff] [blame] | 408 | bool "Build shared libbusybox" |
Rob Landley | c7ddefc | 2006-06-14 01:24:33 +0000 | [diff] [blame] | 409 | default n |
Denis Vlasenko | fc5e806 | 2008-07-09 21:24:18 +0000 | [diff] [blame] | 410 | depends on !FEATURE_PREFER_APPLETS && !PIE && !STATIC |
Bernhard Reutner-Fischer | 2aba395 | 2006-01-24 16:14:14 +0000 | [diff] [blame] | 411 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 412 | Build a shared library libbusybox.so.N.N.N which contains all |
| 413 | busybox code. |
Bernhard Reutner-Fischer | 2aba395 | 2006-01-24 16:14:14 +0000 | [diff] [blame] | 414 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 415 | This feature allows every applet to be built as a really tiny |
| 416 | separate executable linked against the library: |
| 417 | |$ size 0_lib/l* |
| 418 | | text data bss dec hex filename |
| 419 | | 939 212 28 1179 49b 0_lib/last |
| 420 | | 939 212 28 1179 49b 0_lib/less |
| 421 | | 919138 8328 1556 929022 e2cfe 0_lib/libbusybox.so.1.N.M |
Denys Vlasenko | 367a55c | 2017-07-15 14:52:26 +0200 | [diff] [blame] | 422 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 423 | This is useful on NOMMU systems which are not capable |
| 424 | of sharing executables, but are capable of sharing code |
| 425 | in dynamic libraries. |
Denys Vlasenko | 367a55c | 2017-07-15 14:52:26 +0200 | [diff] [blame] | 426 | |
| 427 | config FEATURE_LIBBUSYBOX_STATIC |
| 428 | bool "Pull in all external references into libbusybox" |
| 429 | default n |
| 430 | depends on BUILD_LIBBUSYBOX |
| 431 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 432 | Make libbusybox library independent, not using or requiring |
| 433 | any other shared libraries. |
Bernhard Reutner-Fischer | 2aba395 | 2006-01-24 16:14:14 +0000 | [diff] [blame] | 434 | |
Denis Vlasenko | f545be0 | 2007-10-07 17:06:26 +0000 | [diff] [blame] | 435 | config FEATURE_INDIVIDUAL |
| 436 | bool "Produce a binary for each applet, linked against libbusybox" |
| 437 | default y |
Denis Vlasenko | fc5e806 | 2008-07-09 21:24:18 +0000 | [diff] [blame] | 438 | depends on BUILD_LIBBUSYBOX |
Bernhard Reutner-Fischer | 2aba395 | 2006-01-24 16:14:14 +0000 | [diff] [blame] | 439 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 440 | If your CPU architecture doesn't allow for sharing text/rodata |
| 441 | sections of running binaries, but allows for runtime dynamic |
| 442 | libraries, this option will allow you to reduce memory footprint |
| 443 | when you have many different applets running at once. |
Bernhard Reutner-Fischer | 2aba395 | 2006-01-24 16:14:14 +0000 | [diff] [blame] | 444 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 445 | If your CPU architecture allows for sharing text/rodata, |
| 446 | having single binary is more optimal. |
Denis Vlasenko | f545be0 | 2007-10-07 17:06:26 +0000 | [diff] [blame] | 447 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 448 | Each applet will be a tiny program, dynamically linked |
| 449 | against libbusybox.so.N.N.N. |
Denis Vlasenko | f545be0 | 2007-10-07 17:06:26 +0000 | [diff] [blame] | 450 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 451 | You need to have a working dynamic linker. |
Denis Vlasenko | f545be0 | 2007-10-07 17:06:26 +0000 | [diff] [blame] | 452 | |
| 453 | config FEATURE_SHARED_BUSYBOX |
| 454 | bool "Produce additional busybox binary linked against libbusybox" |
| 455 | default y |
Denis Vlasenko | fc5e806 | 2008-07-09 21:24:18 +0000 | [diff] [blame] | 456 | depends on BUILD_LIBBUSYBOX |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 457 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 458 | Build busybox, dynamically linked against libbusybox.so.N.N.N. |
Denis Vlasenko | f545be0 | 2007-10-07 17:06:26 +0000 | [diff] [blame] | 459 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 460 | You need to have a working dynamic linker. |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 461 | |
Denis Vlasenko | def8898 | 2007-10-07 17:06:01 +0000 | [diff] [blame] | 462 | ### config BUILD_AT_ONCE |
| 463 | ### bool "Compile all sources at once" |
| 464 | ### default n |
| 465 | ### help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 466 | ### Normally each source-file is compiled with one invocation of |
| 467 | ### the compiler. |
| 468 | ### If you set this option, all sources are compiled at once. |
| 469 | ### This gives the compiler more opportunities to optimize which can |
| 470 | ### result in smaller and/or faster binaries. |
Denis Vlasenko | def8898 | 2007-10-07 17:06:01 +0000 | [diff] [blame] | 471 | ### |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 472 | ### Setting this option will consume alot of memory, e.g. if you |
| 473 | ### enable all applets with all features, gcc uses more than 300MB |
| 474 | ### RAM during compilation of busybox. |
Denis Vlasenko | def8898 | 2007-10-07 17:06:01 +0000 | [diff] [blame] | 475 | ### |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 476 | ### This option is most likely only beneficial for newer compilers |
| 477 | ### such as gcc-4.1 and above. |
Denis Vlasenko | def8898 | 2007-10-07 17:06:01 +0000 | [diff] [blame] | 478 | ### |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 479 | ### Say 'N' unless you know what you are doing. |
Bernhard Reutner-Fischer | 2aba395 | 2006-01-24 16:14:14 +0000 | [diff] [blame] | 480 | |
Denis Vlasenko | b8e653b | 2008-06-02 04:51:29 +0000 | [diff] [blame] | 481 | config CROSS_COMPILER_PREFIX |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 482 | string "Cross compiler prefix" |
Denis Vlasenko | b8e653b | 2008-06-02 04:51:29 +0000 | [diff] [blame] | 483 | default "" |
| 484 | help |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 485 | If you want to build busybox with a cross compiler, then you |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 486 | will need to set this to the cross-compiler prefix, for example, |
| 487 | "i386-uclibc-". |
Bernhard Reutner-Fischer | 7d0d3e2 | 2008-08-22 08:25:26 +0000 | [diff] [blame] | 488 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 489 | Note that CROSS_COMPILE environment variable or |
| 490 | "make CROSS_COMPILE=xxx ..." will override this selection. |
Bernhard Reutner-Fischer | 7d0d3e2 | 2008-08-22 08:25:26 +0000 | [diff] [blame] | 491 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 492 | Native builds leave this empty. |
Denis Vlasenko | b8e653b | 2008-06-02 04:51:29 +0000 | [diff] [blame] | 493 | |
Rob Walker | bf63437 | 2012-03-07 12:25:53 +0100 | [diff] [blame] | 494 | config SYSROOT |
| 495 | string "Path to sysroot" |
| 496 | default "" |
| 497 | help |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 498 | If you want to build busybox with a cross compiler, then you |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 499 | might also need to specify where /usr/include and /usr/lib |
| 500 | will be found. |
Rob Walker | bf63437 | 2012-03-07 12:25:53 +0100 | [diff] [blame] | 501 | |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 502 | For example, busybox can be built against an installed |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 503 | Android NDK, platform version 9, for ARM ABI with |
Rob Walker | bf63437 | 2012-03-07 12:25:53 +0100 | [diff] [blame] | 504 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 505 | CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm |
Rob Walker | bf63437 | 2012-03-07 12:25:53 +0100 | [diff] [blame] | 506 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 507 | Native builds leave this empty. |
Rob Walker | bf63437 | 2012-03-07 12:25:53 +0100 | [diff] [blame] | 508 | |
Bernhard Reutner-Fischer | f6107c7 | 2009-01-22 13:27:14 +0000 | [diff] [blame] | 509 | config EXTRA_CFLAGS |
| 510 | string "Additional CFLAGS" |
| 511 | default "" |
| 512 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 513 | Additional CFLAGS to pass to the compiler verbatim. |
Bernhard Reutner-Fischer | f6107c7 | 2009-01-22 13:27:14 +0000 | [diff] [blame] | 514 | |
Rob Walker | bf63437 | 2012-03-07 12:25:53 +0100 | [diff] [blame] | 515 | config EXTRA_LDFLAGS |
| 516 | string "Additional LDFLAGS" |
| 517 | default "" |
| 518 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 519 | Additional LDFLAGS to pass to the linker verbatim. |
Rob Walker | bf63437 | 2012-03-07 12:25:53 +0100 | [diff] [blame] | 520 | |
| 521 | config EXTRA_LDLIBS |
| 522 | string "Additional LDLIBS" |
| 523 | default "" |
| 524 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 525 | Additional LDLIBS to pass to the linker with -l. |
Rob Walker | bf63437 | 2012-03-07 12:25:53 +0100 | [diff] [blame] | 526 | |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 527 | config USE_PORTABLE_CODE |
| 528 | bool "Avoid using GCC-specific code constructs" |
| 529 | default n |
| 530 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 531 | Use this option if you are trying to compile busybox with |
| 532 | compiler other than gcc. |
| 533 | If you do use gcc, this option may needlessly increase code size. |
Denys Vlasenko | 2c8929c | 2017-07-15 21:14:16 +0200 | [diff] [blame] | 534 | |
Denys Vlasenko | 2c99702 | 2018-04-06 18:55:35 +0200 | [diff] [blame] | 535 | config STACK_OPTIMIZATION_386 |
| 536 | bool "Use -mpreferred-stack-boundary=2 on i386 arch" |
| 537 | default y |
| 538 | help |
| 539 | This option makes for smaller code, but some libc versions |
| 540 | do not work with it (they use SSE instructions without |
| 541 | ensuring stack alignment). |
| 542 | |
Denys Vlasenko | 3360226 | 2016-11-24 22:08:12 +0100 | [diff] [blame] | 543 | comment 'Installation Options ("make install" behavior)' |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 544 | |
Denys Vlasenko | 3360226 | 2016-11-24 22:08:12 +0100 | [diff] [blame] | 545 | choice |
| 546 | prompt "What kind of applet links to install" |
| 547 | default INSTALL_APPLET_SYMLINKS |
| 548 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 549 | Choose what kind of links to applets are created by "make install". |
Denys Vlasenko | 3360226 | 2016-11-24 22:08:12 +0100 | [diff] [blame] | 550 | |
| 551 | config INSTALL_APPLET_SYMLINKS |
| 552 | bool "as soft-links" |
| 553 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 554 | Install applets as soft-links to the busybox binary. This needs some |
| 555 | free inodes on the filesystem, but might help with filesystem |
| 556 | generators that can't cope with hard-links. |
Denys Vlasenko | 3360226 | 2016-11-24 22:08:12 +0100 | [diff] [blame] | 557 | |
| 558 | config INSTALL_APPLET_HARDLINKS |
| 559 | bool "as hard-links" |
| 560 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 561 | Install applets as hard-links to the busybox binary. This might |
| 562 | count on a filesystem with few inodes. |
Denys Vlasenko | 3360226 | 2016-11-24 22:08:12 +0100 | [diff] [blame] | 563 | |
| 564 | config INSTALL_APPLET_SCRIPT_WRAPPERS |
| 565 | bool "as script wrappers" |
| 566 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 567 | Install applets as script wrappers that call the busybox binary. |
Denys Vlasenko | 3360226 | 2016-11-24 22:08:12 +0100 | [diff] [blame] | 568 | |
| 569 | config INSTALL_APPLET_DONT |
| 570 | bool "not installed" |
| 571 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 572 | Do not install applet links. Useful when you plan to use |
| 573 | busybox --install for installing links, or plan to use |
| 574 | a standalone shell and thus don't need applet links. |
Denys Vlasenko | 3360226 | 2016-11-24 22:08:12 +0100 | [diff] [blame] | 575 | |
| 576 | endchoice |
| 577 | |
| 578 | choice |
| 579 | prompt "/bin/sh applet link" |
| 580 | default INSTALL_SH_APPLET_SYMLINK |
| 581 | depends on INSTALL_APPLET_SCRIPT_WRAPPERS |
| 582 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 583 | Choose how you install /bin/sh applet link. |
Denys Vlasenko | 3360226 | 2016-11-24 22:08:12 +0100 | [diff] [blame] | 584 | |
| 585 | config INSTALL_SH_APPLET_SYMLINK |
| 586 | bool "as soft-link" |
| 587 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 588 | Install /bin/sh applet as soft-link to the busybox binary. |
Denys Vlasenko | 3360226 | 2016-11-24 22:08:12 +0100 | [diff] [blame] | 589 | |
| 590 | config INSTALL_SH_APPLET_HARDLINK |
| 591 | bool "as hard-link" |
| 592 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 593 | Install /bin/sh applet as hard-link to the busybox binary. |
Denys Vlasenko | 3360226 | 2016-11-24 22:08:12 +0100 | [diff] [blame] | 594 | |
| 595 | config INSTALL_SH_APPLET_SCRIPT_WRAPPER |
| 596 | bool "as script wrapper" |
| 597 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 598 | Install /bin/sh applet as script wrapper that calls |
| 599 | the busybox binary. |
Denys Vlasenko | 3360226 | 2016-11-24 22:08:12 +0100 | [diff] [blame] | 600 | |
| 601 | endchoice |
| 602 | |
| 603 | config PREFIX |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 604 | string "Destination path for 'make install'" |
Denys Vlasenko | 3360226 | 2016-11-24 22:08:12 +0100 | [diff] [blame] | 605 | default "./_install" |
| 606 | help |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 607 | Where "make install" should install busybox binary and links. |
Denys Vlasenko | 3360226 | 2016-11-24 22:08:12 +0100 | [diff] [blame] | 608 | |
| 609 | comment 'Debugging Options' |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 610 | |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 611 | config DEBUG |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 612 | bool "Build with debug information" |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 613 | default n |
| 614 | help |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 615 | Say Y here to compile with debug information. |
| 616 | This increases the size of the binary considerably, and |
| 617 | should only be used when doing development. |
| 618 | |
| 619 | This adds -g option to gcc command line. |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 620 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 621 | Most people should answer N. |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 622 | |
Denis Vlasenko | bd8390a | 2008-06-12 20:23:03 +0000 | [diff] [blame] | 623 | config DEBUG_PESSIMIZE |
Denis Vlasenko | c185e29 | 2008-07-16 23:45:11 +0000 | [diff] [blame] | 624 | bool "Disable compiler optimizations" |
Denis Vlasenko | bd8390a | 2008-06-12 20:23:03 +0000 | [diff] [blame] | 625 | default n |
| 626 | depends on DEBUG |
| 627 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 628 | The compiler's optimization of source code can eliminate and reorder |
| 629 | code, resulting in an executable that's hard to understand when |
| 630 | stepping through it with a debugger. This switches it off, resulting |
| 631 | in a much bigger executable that more closely matches the source |
| 632 | code. |
Denis Vlasenko | bd8390a | 2008-06-12 20:23:03 +0000 | [diff] [blame] | 633 | |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 634 | This replaces -Os/-O2 with -O0 in gcc command line. |
| 635 | |
Mike Frysinger | 43e5663 | 2016-02-12 22:12:47 -0500 | [diff] [blame] | 636 | config DEBUG_SANITIZE |
| 637 | bool "Enable runtime sanitizers (ASAN/LSAN/USAN/etc...)" |
| 638 | default n |
| 639 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 640 | Say Y here if you want to enable runtime sanitizers. These help |
| 641 | catch bad memory accesses (e.g. buffer overflows), but will make |
| 642 | the executable larger and slow down runtime a bit. |
Mike Frysinger | 43e5663 | 2016-02-12 22:12:47 -0500 | [diff] [blame] | 643 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 644 | This adds -fsanitize=foo options to gcc command line. |
Denys Vlasenko | f560422 | 2017-01-10 14:58:54 +0100 | [diff] [blame] | 645 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 646 | If you aren't developing/testing busybox, say N here. |
Mike Frysinger | 43e5663 | 2016-02-12 22:12:47 -0500 | [diff] [blame] | 647 | |
Bartosz Golaszewski | 3ed81cf | 2014-06-22 16:30:41 +0200 | [diff] [blame] | 648 | config UNIT_TEST |
| 649 | bool "Build unit tests" |
| 650 | default n |
| 651 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 652 | Say Y here if you want to build unit tests (both the framework and |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 653 | test cases) as an applet. This results in bigger code, so you |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 654 | probably don't want this option in production builds. |
Bartosz Golaszewski | 3ed81cf | 2014-06-22 16:30:41 +0200 | [diff] [blame] | 655 | |
Denis Vlasenko | e0eebc1 | 2007-01-27 13:44:53 +0000 | [diff] [blame] | 656 | config WERROR |
| 657 | bool "Abort compilation on any warning" |
Rob Landley | c503df5 | 2006-05-09 22:08:56 +0000 | [diff] [blame] | 658 | default n |
Rob Landley | c503df5 | 2006-05-09 22:08:56 +0000 | [diff] [blame] | 659 | help |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 660 | This adds -Werror to gcc command line. |
Denis Vlasenko | e0eebc1 | 2007-01-27 13:44:53 +0000 | [diff] [blame] | 661 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 662 | Most people should answer N. |
Denis Vlasenko | e0eebc1 | 2007-01-27 13:44:53 +0000 | [diff] [blame] | 663 | |
James Byrne | 6937487 | 2019-07-02 11:35:03 +0200 | [diff] [blame] | 664 | config WARN_SIMPLE_MSG |
| 665 | bool "Warn about single parameter bb_xx_msg calls" |
| 666 | default n |
| 667 | help |
| 668 | This will cause warnings to be shown for any instances of |
| 669 | bb_error_msg(), bb_error_msg_and_die(), bb_perror_msg(), |
| 670 | bb_perror_msg_and_die(), bb_herror_msg() or bb_herror_msg_and_die() |
| 671 | being called with a single parameter. In these cases the equivalent |
| 672 | bb_simple_xx_msg function should be used instead. |
| 673 | Note that use of STRERROR_FMT may give false positives. |
| 674 | |
| 675 | If you aren't developing busybox, say N here. |
| 676 | |
Eric Andersen | f086ed8 | 2004-05-25 11:30:22 +0000 | [diff] [blame] | 677 | choice |
| 678 | prompt "Additional debugging library" |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 679 | default NO_DEBUG_LIB |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 680 | help |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 681 | Using an additional debugging library will make busybox become |
| 682 | considerably larger and will cause it to run more slowly. You |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 683 | should always leave this option disabled for production use. |
Eric Andersen | f086ed8 | 2004-05-25 11:30:22 +0000 | [diff] [blame] | 684 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 685 | dmalloc support: |
| 686 | ---------------- |
| 687 | This enables compiling with dmalloc ( http://dmalloc.com/ ) |
| 688 | which is an excellent public domain mem leak and malloc problem |
| 689 | detector. To enable dmalloc, before running busybox you will |
| 690 | want to properly set your environment, for example: |
| 691 | export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile |
| 692 | The 'debug=' value is generated using the following command |
| 693 | dmalloc -p log-stats -p log-non-free -p log-bad-space \ |
| 694 | -p log-elapsed-time -p check-fence -p check-heap \ |
| 695 | -p check-lists -p check-blank -p check-funcs -p realloc-copy \ |
| 696 | -p allow-free-null |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 697 | |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 698 | Electric-fence support: |
| 699 | ----------------------- |
| 700 | This enables compiling with Electric-fence support. Electric |
| 701 | fence is another very useful malloc debugging library which uses |
| 702 | your computer's virtual memory hardware to detect illegal memory |
Denys Vlasenko | 86d5bf4 | 2017-07-27 02:59:13 +0200 | [diff] [blame] | 703 | accesses. This support will make busybox be considerably larger |
Denys Vlasenko | 72089cf | 2017-07-21 09:50:55 +0200 | [diff] [blame] | 704 | and run slower, so you should leave this option disabled unless |
| 705 | you are hunting a hard to find memory problem. |
Eric Andersen | c9f20d9 | 2002-12-05 08:41:41 +0000 | [diff] [blame] | 706 | |
Eric Andersen | f086ed8 | 2004-05-25 11:30:22 +0000 | [diff] [blame] | 707 | |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 708 | config NO_DEBUG_LIB |
Eric Andersen | f086ed8 | 2004-05-25 11:30:22 +0000 | [diff] [blame] | 709 | bool "None" |
| 710 | |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 711 | config DMALLOC |
Eric Andersen | f086ed8 | 2004-05-25 11:30:22 +0000 | [diff] [blame] | 712 | bool "Dmalloc" |
| 713 | |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 714 | config EFENCE |
Eric Andersen | f086ed8 | 2004-05-25 11:30:22 +0000 | [diff] [blame] | 715 | bool "Electric-fence" |
| 716 | |
| 717 | endchoice |
| 718 | |
Mike Frysinger | 72d59db | 2006-03-10 23:17:17 +0000 | [diff] [blame] | 719 | source libbb/Config.in |
| 720 | |
Denys Vlasenko | a3df2fa | 2017-07-15 20:49:32 +0200 | [diff] [blame] | 721 | endmenu |
| 722 | |
Mike Frysinger | 72d59db | 2006-03-10 23:17:17 +0000 | [diff] [blame] | 723 | comment "Applets" |
| 724 | |
| 725 | source archival/Config.in |
| 726 | source coreutils/Config.in |
| 727 | source console-tools/Config.in |
| 728 | source debianutils/Config.in |
Denys Vlasenko | ab77e81 | 2017-08-18 19:15:29 +0200 | [diff] [blame] | 729 | source klibc-utils/Config.in |
Mike Frysinger | 72d59db | 2006-03-10 23:17:17 +0000 | [diff] [blame] | 730 | source editors/Config.in |
| 731 | source findutils/Config.in |
| 732 | source init/Config.in |
| 733 | source loginutils/Config.in |
| 734 | source e2fsprogs/Config.in |
| 735 | source modutils/Config.in |
| 736 | source util-linux/Config.in |
| 737 | source miscutils/Config.in |
| 738 | source networking/Config.in |
Bernhard Reutner-Fischer | aa2a1c0 | 2008-10-24 19:48:47 +0000 | [diff] [blame] | 739 | source printutils/Config.in |
Denis Vlasenko | b9d572a | 2008-11-06 23:41:38 +0000 | [diff] [blame] | 740 | source mailutils/Config.in |
Mike Frysinger | 72d59db | 2006-03-10 23:17:17 +0000 | [diff] [blame] | 741 | source procps/Config.in |
Denis Vlasenko | fe54458 | 2006-10-03 15:57:40 +0000 | [diff] [blame] | 742 | source runit/Config.in |
Denis Vlasenko | d46d3c2 | 2007-02-06 19:28:50 +0000 | [diff] [blame] | 743 | source selinux/Config.in |
Bernhard Reutner-Fischer | aa2a1c0 | 2008-10-24 19:48:47 +0000 | [diff] [blame] | 744 | source shell/Config.in |
| 745 | source sysklogd/Config.in |