blob: ac5b13b8dd8486c2d6a098b8a8af664fc756ed89 [file] [log] [blame]
Eric Andersenc9f20d92002-12-05 08:41:41 +00001#
2# For a description of the syntax of this configuration file,
Kartik Agaram43b17b12018-05-31 22:15:55 -07003# see docs/Kconfig-language.txt.
Eric Andersenc9f20d92002-12-05 08:41:41 +00004#
5
Denys Vlasenko86d5bf42017-07-27 02:59:13 +02006mainmenu "Configuration"
Eric Andersenc9f20d92002-12-05 08:41:41 +00007
Eric Andersen068b6b02002-12-13 22:53:28 +00008config HAVE_DOT_CONFIG
9 bool
10 default y
11
Denys Vlasenko86d5bf42017-07-27 02:59:13 +020012menu "Settings"
Mike Frysinger72d59db2006-03-10 23:17:17 +000013
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000014config DESKTOP
Denys Vlasenko4bdc9142019-01-06 20:12:16 +010015 bool "Enable compatibility for full-blown desktop systems (8kb)"
Denys Vlasenkoba085c62010-07-21 08:58:11 +020016 default y
Denis Vlasenko97a8dd32006-10-01 15:55:11 +000017 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020018 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 Vlasenko2c8929c2017-07-15 21:14:16 +020022
Denys Vlasenko72089cf2017-07-21 09:50:55 +020023 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 Vlasenko33602262016-11-24 22:08:12 +010026
Denys Vlasenko72089cf2017-07-21 09:50:55 +020027 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 Vlasenko97a8dd32006-10-01 15:55:11 +000030
Denis Vlasenko3fd15e12008-08-09 16:15:14 +000031config EXTRA_COMPAT
32 bool "Provide compatible behavior for rare corner cases (bigger code)"
33 default n
34 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020035 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 Vlasenko3fd15e12008-08-09 16:15:14 +000039
Denys Vlasenko663ae522017-08-03 03:46:14 +020040config 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 Vlasenkoa8df4c02009-10-19 18:56:26 +020053config INCLUDE_SUSv2
54 bool "Enable obsolete features removed before SUSv3"
55 default y
56 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020057 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 Vlasenkoa8df4c02009-10-19 18:56:26 +020061
Denys Vlasenko2c8929c2017-07-15 21:14:16 +020062config LONG_OPTS
63 bool "Support --long-options"
64 default y
Denys Vlasenkoaa7da732009-09-13 14:57:24 +020065 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020066 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 Vlasenkoaa7da732009-09-13 14:57:24 +020068
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000069config SHOW_USAGE
Bernhard Reutner-Fischerb9f4cd82011-11-09 20:23:38 +010070 bool "Show applet usage messages"
Bernhard Reutner-Fischer81901a02006-03-31 18:43:55 +000071 default y
72 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +020073 Enabling this option, applets will show terse help messages
Denys Vlasenko72089cf2017-07-21 09:50:55 +020074 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-Fischer81901a02006-03-31 18:43:55 +000078
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000079config FEATURE_VERBOSE_USAGE
Eric Andersenc9f20d92002-12-05 08:41:41 +000080 bool "Show verbose applet usage messages"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +020081 default y
Denys Vlasenko0e5ba082010-06-05 23:11:07 +020082 depends on SHOW_USAGE
Eric Andersenc9f20d92002-12-05 08:41:41 +000083 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +020084 All applets will show verbose help messages when invoked with --help.
85 This will add a lot of text to the binary.
Eric Andersenc9f20d92002-12-05 08:41:41 +000086
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000087config FEATURE_COMPRESS_USAGE
Rob Landley7e21d5f2006-04-27 23:34:46 +000088 bool "Store applet usage messages in compressed form"
89 default y
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000090 depends on SHOW_USAGE
Rob Landley7e21d5f2006-04-27 23:34:46 +000091 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +020092 Store usage messages in .bz2 compressed form, uncompress them
93 on-the-fly when "APPLET --help" is run.
Rob Landley7e21d5f2006-04-27 23:34:46 +000094
Denys Vlasenko72089cf2017-07-21 09:50:55 +020095 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 Landleyc7ddefc2006-06-14 01:24:33 +0000100
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200101config LFS
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200102 bool "Support files > 2 GB"
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200103 default y
104 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200105 If you need to work with large files, enable this option.
106 This will have no effect if your kernel or your C
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200107 library lacks large file support for large files. Some of the
108 programs that can benefit from large file support include dd, gzip,
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200109 cp, mount, tar.
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200110
Bartosz Golaszewski265a74b2014-02-11 21:31:42 +0100111config PAM
Denys Vlasenkof5604222017-01-10 14:58:54 +0100112 bool "Support PAM (Pluggable Authentication Modules)"
Bartosz Golaszewski265a74b2014-02-11 21:31:42 +0100113 default n
114 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200115 Use PAM in some applets (currently login and httpd) instead
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200116 of direct access to password database.
Bartosz Golaszewski265a74b2014-02-11 21:31:42 +0100117
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000118config FEATURE_DEVPTS
Eric Andersenc9f20d92002-12-05 08:41:41 +0000119 bool "Use the devpts filesystem for Unix98 PTYs"
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000120 default y
Eric Andersenc9f20d92002-12-05 08:41:41 +0000121 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200122 Enable if you want to use Unix98 PTY support. If enabled,
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200123 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 Andersenc9f20d92002-12-05 08:41:41 +0000127
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200128config FEATURE_UTMP
129 bool "Support utmp file"
130 default y
131 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200132 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 Vlasenkod4d289a2010-10-12 04:18:05 +0200136
Denys Vlasenko8d0e0cd2011-01-25 23:21:46 +0100137config FEATURE_WTMP
138 bool "Support wtmp file"
139 default y
140 depends on FEATURE_UTMP
141 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200142 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 Vlasenko8d0e0cd2011-01-25 23:21:46 +0100147
Denis Vlasenko10457b92007-03-27 22:01:31 +0000148config FEATURE_PIDFILE
149 bool "Support writing pidfiles"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200150 default y
Denis Vlasenko10457b92007-03-27 22:01:31 +0000151 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200152 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. Basile12677ac2012-12-10 14:49:39 -0500155
156config PID_FILE_PATH
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200157 string "Directory for pidfiles"
Anthony G. Basile12677ac2012-12-10 14:49:39 -0500158 default "/var/run"
James Byrneed79af72019-07-17 15:53:04 +0000159 depends on FEATURE_PIDFILE || FEATURE_CROND_SPECIAL_TIMES
Anthony G. Basile12677ac2012-12-10 14:49:39 -0500160 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200161 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
James Byrneed79af72019-07-17 15:53:04 +0000164 specify a pidfile path. When crond has the 'Support special times'
165 option enabled, the 'crond.reboot' file is also stored here.
Denis Vlasenko10457b92007-03-27 22:01:31 +0000166
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200167config BUSYBOX
168 bool "Include busybox applet"
169 default y
170 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200171 The busybox applet provides general help message and allows
172 the included applets to be listed. It also provides
173 optional --install command to create applet links. If you unselect
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200174 this option, running busybox without any arguments will give
175 just a cryptic error message:
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200176
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200177 $ busybox
178 busybox: applet not found
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200179
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200180 Running "busybox APPLET [ARGS...]" will still work, of course.
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200181
Ron Yorstond1b2ae22018-11-18 19:12:26 +0100182config FEATURE_SHOW_SCRIPT
183 bool "Support --show SCRIPT"
184 default y
185 depends on BUSYBOX
186
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200187config FEATURE_INSTALLER
188 bool "Support --install [-s] to install applet links at runtime"
189 default y
190 depends on BUSYBOX
191 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200192 Enable 'busybox --install [-s]' support. This will allow you to use
193 busybox at runtime to create hard links or symlinks for all the
194 applets that are compiled into busybox.
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200195
196config INSTALL_NO_USR
197 bool "Don't use /usr"
198 default n
199 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200200 Disable use of /usr. "busybox --install" and "make install"
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200201 will install applets only to /bin and /sbin,
202 never to /usr/bin or /usr/sbin.
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200203
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000204config FEATURE_SUID
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200205 bool "Drop SUID state for most applets"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200206 default y
Eric Andersenc9f20d92002-12-05 08:41:41 +0000207 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200208 With this option you can install the busybox binary belonging
209 to root with the suid bit set, enabling some applets to perform
210 root-level operations even when run by ordinary users
211 (for example, mounting of user mounts in fstab needs this).
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200212
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200213 With this option enabled, busybox drops privileges for applets
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200214 that don't need root access, before entering their main() function.
Rob Landleyd5b9b602006-05-31 23:23:42 +0000215
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200216 If you are really paranoid and don't want even initial busybox code
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200217 to run under root for every applet, build two busybox binaries with
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200218 different applets in them (and the appropriate symlinks pointing
219 to each binary), and only set the suid bit on the one that needs it.
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200220
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200221 Some applets which require root rights (need suid bit on the binary
222 or to be run by root) and will refuse to execute otherwise:
223 crontab, login, passwd, su, vlock, wall.
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000224
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200225 The applets which will use root rights if they have them
226 (via suid bit, or because run by root), but would try to work
227 without root right nevertheless:
228 findfs, ping[6], traceroute[6], mount.
Denys Vlasenko3b5acaa2011-01-18 13:52:48 +0100229
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200230 Note that if you DO NOT select this option, but DO make busybox
231 suid root, ALL applets will run under root, which is a huge
232 security hole (think "cp /some/file /etc/passwd").
Eric Andersenc9f20d92002-12-05 08:41:41 +0000233
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000234config FEATURE_SUID_CONFIG
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200235 bool "Enable SUID configuration via /etc/busybox.conf"
Denys Vlasenkoe0238f82011-05-14 15:23:55 +0200236 default y
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000237 depends on FEATURE_SUID
Eric Andersenc9f20d92002-12-05 08:41:41 +0000238 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200239 Allow the SUID/SGID state of an applet to be determined at runtime
240 by checking /etc/busybox.conf. (This is sort of a poor man's sudo.)
241 The format of this file is as follows:
Eric Andersene5272072003-07-22 22:15:21 +0000242
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200243 APPLET = [Ssx-][Ssx-][x-] [USER.GROUP]
Denys Vlasenko3770b6b2011-05-16 13:19:25 +0200244
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200245 s: USER or GROUP is allowed to execute APPLET.
246 APPLET will run under USER or GROUP
247 (regardless of who's running it).
248 S: USER or GROUP is NOT allowed to execute APPLET.
249 APPLET will run under USER or GROUP.
250 This option is not very sensical.
251 x: USER/GROUP/others are allowed to execute APPLET.
252 No UID/GID change will be done when it is run.
253 -: USER/GROUP/others are not allowed to execute APPLET.
Eric Andersen5043ea12005-06-23 19:15:40 +0000254
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200255 An example might help:
Eric Andersene5272072003-07-22 22:15:21 +0000256
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200257 |[SUID]
258 |su = ssx root.0 # applet su can be run by anyone and runs with
259 | # euid=0,egid=0
260 |su = ssx # exactly the same
261 |
262 |mount = sx- root.disk # applet mount can be run by root and members
263 | # of group disk (but not anyone else)
264 | # and runs with euid=0 (egid is not changed)
265 |
266 |cp = --- # disable applet cp for everyone
Eric Andersene5272072003-07-22 22:15:21 +0000267
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200268 The file has to be owned by user root, group root and has to be
269 writeable only by root:
270 (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
271 The busybox executable has to be owned by user root, group
272 root and has to be setuid root for this to work:
273 (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
Eric Andersene5272072003-07-22 22:15:21 +0000274
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200275 Robert 'sandman' Griebl has more information here:
276 <url: http://www.softforge.de/bb/suid.html >.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000277
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000278config FEATURE_SUID_CONFIG_QUIET
Eric Andersenc9f20d92002-12-05 08:41:41 +0000279 bool "Suppress warning message if /etc/busybox.conf is not readable"
Rob Landleyd5b9b602006-05-31 23:23:42 +0000280 default y
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000281 depends on FEATURE_SUID_CONFIG
Eric Andersenc9f20d92002-12-05 08:41:41 +0000282 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200283 /etc/busybox.conf should be readable by the user needing the SUID,
284 check this option to avoid users to be notified about missing
285 permissions.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000286
Denis Vlasenko80d14be2007-04-10 23:03:30 +0000287config FEATURE_PREFER_APPLETS
Denis Vlasenko2f0c0d02007-01-21 00:41:04 +0000288 bool "exec prefers applets"
289 default n
290 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200291 This is an experimental option which directs applets about to
292 call 'exec' to try and find an applicable busybox applet before
293 searching the PATH. This is typically done by exec'ing
294 /proc/self/exe.
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200295
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200296 This may affect shell, find -exec, xargs and similar applets.
297 They will use applets even if /bin/APPLET -> busybox link
298 is missing (or is not a link to busybox). However, this causes
299 problems in chroot jails without mounted /proc and with ps/top
300 (command name can be shown as 'exe' for applets started this way).
Denis Vlasenko2f0c0d02007-01-21 00:41:04 +0000301
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000302config BUSYBOX_EXEC_PATH
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200303 string "Path to busybox executable"
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000304 default "/proc/self/exe"
305 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200306 When applets need to run other applets, busybox
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200307 sometimes needs to exec() itself. When the /proc filesystem is
308 mounted, /proc/self/exe always points to the currently running
309 executable. If you haven't got /proc, set this to wherever you
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200310 want to run busybox from.
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000311
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200312config SELINUX
313 bool "Support NSA Security Enhanced Linux"
314 default n
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200315 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200316 Enable support for SELinux in applets ls, ps, and id. Also provide
317 the option of compiling in SELinux applets.
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200318
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200319 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 Vlasenko2c8929c2017-07-15 21:14:16 +0200323
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200324 CFLAGS=-I<libselinux-include-path> \
325 LDFLAGS=-L<libselinux-lib-path> \
326 make
327
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200328 Most people will leave this set to 'N'.
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200329
330config FEATURE_CLEAN_UP
331 bool "Clean up all memory before exiting (usually not needed)"
332 default n
333 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200334 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 Vlasenkoa3df2fa2017-07-15 20:49:32 +0200338
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200339 Don't enable this unless you have a really good reason to clean
340 things up manually.
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200341
James Byrne253c4e72019-04-12 17:01:51 +0000342config 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 Vlasenkoa7825f22007-06-16 13:56:51 +0000351# These are auto-selected by other options
352
353config FEATURE_SYSLOG
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000354 bool #No description makes it a hidden option
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000355 default n
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000356 #help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200357 #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 Vlasenkoa7825f22007-06-16 13:56:51 +0000359
Denys Vlasenko33602262016-11-24 22:08:12 +0100360comment 'Build Options'
Eric Andersenc9f20d92002-12-05 08:41:41 +0000361
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000362config STATIC
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200363 bool "Build static binary (no shared libs)"
Eric Andersenc9f20d92002-12-05 08:41:41 +0000364 default n
365 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200366 If you want to build a static binary, which does not use
367 or require any shared libraries, enable this option.
368 Static binaries are larger, but do not require functioning
369 dynamic libraries to be present, which is important if used
370 as a system rescue tool.
Eric Andersene5272072003-07-22 22:15:21 +0000371
Denis Vlasenko1da86d22008-06-04 11:28:24 +0000372config PIE
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200373 bool "Build position independent executable"
Denis Vlasenko1da86d22008-06-04 11:28:24 +0000374 default n
375 depends on !STATIC
376 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200377 Hardened code option. PIE binaries are loaded at a different
378 address at each invocation. This has some overhead,
379 particularly on x86-32 which is short on registers.
Gilles Espinasse26b80e82011-02-13 22:54:37 +0100380
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200381 Most people will leave this set to 'N'.
Denis Vlasenko1da86d22008-06-04 11:28:24 +0000382
Denis Vlasenkod2c450c2008-01-08 20:32:12 +0000383config NOMMU
384 bool "Force NOMMU build"
385 default n
386 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200387 Busybox tries to detect whether architecture it is being
388 built against supports MMU or not. If this detection fails,
389 or if you want to build NOMMU version of busybox for testing,
390 you may force NOMMU build here.
Denis Vlasenkod2c450c2008-01-08 20:32:12 +0000391
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200392 Most people will leave this set to 'N'.
Denis Vlasenkod2c450c2008-01-08 20:32:12 +0000393
Denis Vlasenkocc3f20b2008-06-23 22:31:52 +0000394# PIE can be made to work with BUILD_LIBBUSYBOX, but currently
395# build system does not support that
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000396config BUILD_LIBBUSYBOX
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000397 bool "Build shared libbusybox"
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000398 default n
Denis Vlasenkofc5e8062008-07-09 21:24:18 +0000399 depends on !FEATURE_PREFER_APPLETS && !PIE && !STATIC
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000400 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200401 Build a shared library libbusybox.so.N.N.N which contains all
402 busybox code.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000403
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200404 This feature allows every applet to be built as a really tiny
405 separate executable linked against the library:
406 |$ size 0_lib/l*
407 | text data bss dec hex filename
408 | 939 212 28 1179 49b 0_lib/last
409 | 939 212 28 1179 49b 0_lib/less
410 | 919138 8328 1556 929022 e2cfe 0_lib/libbusybox.so.1.N.M
Denys Vlasenko367a55c2017-07-15 14:52:26 +0200411
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200412 This is useful on NOMMU systems which are not capable
413 of sharing executables, but are capable of sharing code
414 in dynamic libraries.
Denys Vlasenko367a55c2017-07-15 14:52:26 +0200415
416config FEATURE_LIBBUSYBOX_STATIC
417 bool "Pull in all external references into libbusybox"
418 default n
419 depends on BUILD_LIBBUSYBOX
420 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200421 Make libbusybox library independent, not using or requiring
422 any other shared libraries.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000423
Denis Vlasenkof545be02007-10-07 17:06:26 +0000424config FEATURE_INDIVIDUAL
425 bool "Produce a binary for each applet, linked against libbusybox"
426 default y
Denis Vlasenkofc5e8062008-07-09 21:24:18 +0000427 depends on BUILD_LIBBUSYBOX
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000428 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200429 If your CPU architecture doesn't allow for sharing text/rodata
430 sections of running binaries, but allows for runtime dynamic
431 libraries, this option will allow you to reduce memory footprint
432 when you have many different applets running at once.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000433
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200434 If your CPU architecture allows for sharing text/rodata,
435 having single binary is more optimal.
Denis Vlasenkof545be02007-10-07 17:06:26 +0000436
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200437 Each applet will be a tiny program, dynamically linked
438 against libbusybox.so.N.N.N.
Denis Vlasenkof545be02007-10-07 17:06:26 +0000439
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200440 You need to have a working dynamic linker.
Denis Vlasenkof545be02007-10-07 17:06:26 +0000441
442config FEATURE_SHARED_BUSYBOX
443 bool "Produce additional busybox binary linked against libbusybox"
444 default y
Denis Vlasenkofc5e8062008-07-09 21:24:18 +0000445 depends on BUILD_LIBBUSYBOX
Eric Andersenc9f20d92002-12-05 08:41:41 +0000446 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200447 Build busybox, dynamically linked against libbusybox.so.N.N.N.
Denis Vlasenkof545be02007-10-07 17:06:26 +0000448
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200449 You need to have a working dynamic linker.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000450
Denis Vlasenkodef88982007-10-07 17:06:01 +0000451### config BUILD_AT_ONCE
452### bool "Compile all sources at once"
453### default n
454### help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200455### Normally each source-file is compiled with one invocation of
456### the compiler.
457### If you set this option, all sources are compiled at once.
458### This gives the compiler more opportunities to optimize which can
459### result in smaller and/or faster binaries.
Denis Vlasenkodef88982007-10-07 17:06:01 +0000460###
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200461### Setting this option will consume alot of memory, e.g. if you
462### enable all applets with all features, gcc uses more than 300MB
463### RAM during compilation of busybox.
Denis Vlasenkodef88982007-10-07 17:06:01 +0000464###
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200465### This option is most likely only beneficial for newer compilers
466### such as gcc-4.1 and above.
Denis Vlasenkodef88982007-10-07 17:06:01 +0000467###
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200468### Say 'N' unless you know what you are doing.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000469
Denis Vlasenkob8e653b2008-06-02 04:51:29 +0000470config CROSS_COMPILER_PREFIX
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200471 string "Cross compiler prefix"
Denis Vlasenkob8e653b2008-06-02 04:51:29 +0000472 default ""
473 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200474 If you want to build busybox with a cross compiler, then you
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200475 will need to set this to the cross-compiler prefix, for example,
476 "i386-uclibc-".
Bernhard Reutner-Fischer7d0d3e22008-08-22 08:25:26 +0000477
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200478 Note that CROSS_COMPILE environment variable or
479 "make CROSS_COMPILE=xxx ..." will override this selection.
Bernhard Reutner-Fischer7d0d3e22008-08-22 08:25:26 +0000480
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200481 Native builds leave this empty.
Denis Vlasenkob8e653b2008-06-02 04:51:29 +0000482
Rob Walkerbf634372012-03-07 12:25:53 +0100483config SYSROOT
484 string "Path to sysroot"
485 default ""
486 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200487 If you want to build busybox with a cross compiler, then you
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200488 might also need to specify where /usr/include and /usr/lib
489 will be found.
Rob Walkerbf634372012-03-07 12:25:53 +0100490
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200491 For example, busybox can be built against an installed
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200492 Android NDK, platform version 9, for ARM ABI with
Rob Walkerbf634372012-03-07 12:25:53 +0100493
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200494 CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
Rob Walkerbf634372012-03-07 12:25:53 +0100495
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200496 Native builds leave this empty.
Rob Walkerbf634372012-03-07 12:25:53 +0100497
Bernhard Reutner-Fischerf6107c72009-01-22 13:27:14 +0000498config EXTRA_CFLAGS
499 string "Additional CFLAGS"
500 default ""
501 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200502 Additional CFLAGS to pass to the compiler verbatim.
Bernhard Reutner-Fischerf6107c72009-01-22 13:27:14 +0000503
Rob Walkerbf634372012-03-07 12:25:53 +0100504config EXTRA_LDFLAGS
505 string "Additional LDFLAGS"
506 default ""
507 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200508 Additional LDFLAGS to pass to the linker verbatim.
Rob Walkerbf634372012-03-07 12:25:53 +0100509
510config EXTRA_LDLIBS
511 string "Additional LDLIBS"
512 default ""
513 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200514 Additional LDLIBS to pass to the linker with -l.
Rob Walkerbf634372012-03-07 12:25:53 +0100515
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200516config USE_PORTABLE_CODE
517 bool "Avoid using GCC-specific code constructs"
518 default n
519 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200520 Use this option if you are trying to compile busybox with
521 compiler other than gcc.
522 If you do use gcc, this option may needlessly increase code size.
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200523
Denys Vlasenko2c997022018-04-06 18:55:35 +0200524config STACK_OPTIMIZATION_386
525 bool "Use -mpreferred-stack-boundary=2 on i386 arch"
526 default y
527 help
528 This option makes for smaller code, but some libc versions
529 do not work with it (they use SSE instructions without
530 ensuring stack alignment).
531
Denys Vlasenko33602262016-11-24 22:08:12 +0100532comment 'Installation Options ("make install" behavior)'
Eric Andersenc9f20d92002-12-05 08:41:41 +0000533
Denys Vlasenko33602262016-11-24 22:08:12 +0100534choice
535 prompt "What kind of applet links to install"
536 default INSTALL_APPLET_SYMLINKS
537 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200538 Choose what kind of links to applets are created by "make install".
Denys Vlasenko33602262016-11-24 22:08:12 +0100539
540config INSTALL_APPLET_SYMLINKS
541 bool "as soft-links"
542 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200543 Install applets as soft-links to the busybox binary. This needs some
544 free inodes on the filesystem, but might help with filesystem
545 generators that can't cope with hard-links.
Denys Vlasenko33602262016-11-24 22:08:12 +0100546
547config INSTALL_APPLET_HARDLINKS
548 bool "as hard-links"
549 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200550 Install applets as hard-links to the busybox binary. This might
551 count on a filesystem with few inodes.
Denys Vlasenko33602262016-11-24 22:08:12 +0100552
553config INSTALL_APPLET_SCRIPT_WRAPPERS
554 bool "as script wrappers"
555 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200556 Install applets as script wrappers that call the busybox binary.
Denys Vlasenko33602262016-11-24 22:08:12 +0100557
558config INSTALL_APPLET_DONT
559 bool "not installed"
560 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200561 Do not install applet links. Useful when you plan to use
562 busybox --install for installing links, or plan to use
563 a standalone shell and thus don't need applet links.
Denys Vlasenko33602262016-11-24 22:08:12 +0100564
565endchoice
566
567choice
568 prompt "/bin/sh applet link"
569 default INSTALL_SH_APPLET_SYMLINK
570 depends on INSTALL_APPLET_SCRIPT_WRAPPERS
571 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200572 Choose how you install /bin/sh applet link.
Denys Vlasenko33602262016-11-24 22:08:12 +0100573
574config INSTALL_SH_APPLET_SYMLINK
575 bool "as soft-link"
576 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200577 Install /bin/sh applet as soft-link to the busybox binary.
Denys Vlasenko33602262016-11-24 22:08:12 +0100578
579config INSTALL_SH_APPLET_HARDLINK
580 bool "as hard-link"
581 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200582 Install /bin/sh applet as hard-link to the busybox binary.
Denys Vlasenko33602262016-11-24 22:08:12 +0100583
584config INSTALL_SH_APPLET_SCRIPT_WRAPPER
585 bool "as script wrapper"
586 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200587 Install /bin/sh applet as script wrapper that calls
588 the busybox binary.
Denys Vlasenko33602262016-11-24 22:08:12 +0100589
590endchoice
591
592config PREFIX
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200593 string "Destination path for 'make install'"
Denys Vlasenko33602262016-11-24 22:08:12 +0100594 default "./_install"
595 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200596 Where "make install" should install busybox binary and links.
Denys Vlasenko33602262016-11-24 22:08:12 +0100597
598comment 'Debugging Options'
Eric Andersenc9f20d92002-12-05 08:41:41 +0000599
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000600config DEBUG
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200601 bool "Build with debug information"
Eric Andersenc9f20d92002-12-05 08:41:41 +0000602 default n
603 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200604 Say Y here to compile with debug information.
605 This increases the size of the binary considerably, and
606 should only be used when doing development.
607
608 This adds -g option to gcc command line.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000609
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200610 Most people should answer N.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000611
Denis Vlasenkobd8390a2008-06-12 20:23:03 +0000612config DEBUG_PESSIMIZE
Denis Vlasenkoc185e292008-07-16 23:45:11 +0000613 bool "Disable compiler optimizations"
Denis Vlasenkobd8390a2008-06-12 20:23:03 +0000614 default n
615 depends on DEBUG
616 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200617 The compiler's optimization of source code can eliminate and reorder
618 code, resulting in an executable that's hard to understand when
619 stepping through it with a debugger. This switches it off, resulting
620 in a much bigger executable that more closely matches the source
621 code.
Denis Vlasenkobd8390a2008-06-12 20:23:03 +0000622
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200623 This replaces -Os/-O2 with -O0 in gcc command line.
624
Mike Frysinger43e56632016-02-12 22:12:47 -0500625config DEBUG_SANITIZE
626 bool "Enable runtime sanitizers (ASAN/LSAN/USAN/etc...)"
627 default n
628 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200629 Say Y here if you want to enable runtime sanitizers. These help
630 catch bad memory accesses (e.g. buffer overflows), but will make
631 the executable larger and slow down runtime a bit.
Mike Frysinger43e56632016-02-12 22:12:47 -0500632
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200633 This adds -fsanitize=foo options to gcc command line.
Denys Vlasenkof5604222017-01-10 14:58:54 +0100634
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200635 If you aren't developing/testing busybox, say N here.
Mike Frysinger43e56632016-02-12 22:12:47 -0500636
Bartosz Golaszewski3ed81cf2014-06-22 16:30:41 +0200637config UNIT_TEST
638 bool "Build unit tests"
639 default n
640 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200641 Say Y here if you want to build unit tests (both the framework and
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200642 test cases) as an applet. This results in bigger code, so you
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200643 probably don't want this option in production builds.
Bartosz Golaszewski3ed81cf2014-06-22 16:30:41 +0200644
Denis Vlasenkoe0eebc12007-01-27 13:44:53 +0000645config WERROR
646 bool "Abort compilation on any warning"
Rob Landleyc503df52006-05-09 22:08:56 +0000647 default n
Rob Landleyc503df52006-05-09 22:08:56 +0000648 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200649 This adds -Werror to gcc command line.
Denis Vlasenkoe0eebc12007-01-27 13:44:53 +0000650
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200651 Most people should answer N.
Denis Vlasenkoe0eebc12007-01-27 13:44:53 +0000652
James Byrne69374872019-07-02 11:35:03 +0200653config WARN_SIMPLE_MSG
654 bool "Warn about single parameter bb_xx_msg calls"
655 default n
656 help
657 This will cause warnings to be shown for any instances of
658 bb_error_msg(), bb_error_msg_and_die(), bb_perror_msg(),
659 bb_perror_msg_and_die(), bb_herror_msg() or bb_herror_msg_and_die()
660 being called with a single parameter. In these cases the equivalent
661 bb_simple_xx_msg function should be used instead.
662 Note that use of STRERROR_FMT may give false positives.
663
664 If you aren't developing busybox, say N here.
665
Eric Andersenf086ed82004-05-25 11:30:22 +0000666choice
667 prompt "Additional debugging library"
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000668 default NO_DEBUG_LIB
Eric Andersenc9f20d92002-12-05 08:41:41 +0000669 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200670 Using an additional debugging library will make busybox become
671 considerably larger and will cause it to run more slowly. You
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200672 should always leave this option disabled for production use.
Eric Andersenf086ed82004-05-25 11:30:22 +0000673
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200674 dmalloc support:
675 ----------------
676 This enables compiling with dmalloc ( http://dmalloc.com/ )
677 which is an excellent public domain mem leak and malloc problem
678 detector. To enable dmalloc, before running busybox you will
679 want to properly set your environment, for example:
680 export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
681 The 'debug=' value is generated using the following command
682 dmalloc -p log-stats -p log-non-free -p log-bad-space \
683 -p log-elapsed-time -p check-fence -p check-heap \
684 -p check-lists -p check-blank -p check-funcs -p realloc-copy \
685 -p allow-free-null
Eric Andersenc9f20d92002-12-05 08:41:41 +0000686
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200687 Electric-fence support:
688 -----------------------
689 This enables compiling with Electric-fence support. Electric
690 fence is another very useful malloc debugging library which uses
691 your computer's virtual memory hardware to detect illegal memory
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200692 accesses. This support will make busybox be considerably larger
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200693 and run slower, so you should leave this option disabled unless
694 you are hunting a hard to find memory problem.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000695
Eric Andersenf086ed82004-05-25 11:30:22 +0000696
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000697config NO_DEBUG_LIB
Eric Andersenf086ed82004-05-25 11:30:22 +0000698 bool "None"
699
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000700config DMALLOC
Eric Andersenf086ed82004-05-25 11:30:22 +0000701 bool "Dmalloc"
702
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000703config EFENCE
Eric Andersenf086ed82004-05-25 11:30:22 +0000704 bool "Electric-fence"
705
706endchoice
707
Mike Frysinger72d59db2006-03-10 23:17:17 +0000708source libbb/Config.in
709
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200710endmenu
711
Mike Frysinger72d59db2006-03-10 23:17:17 +0000712comment "Applets"
713
714source archival/Config.in
715source coreutils/Config.in
716source console-tools/Config.in
717source debianutils/Config.in
Denys Vlasenkoab77e812017-08-18 19:15:29 +0200718source klibc-utils/Config.in
Mike Frysinger72d59db2006-03-10 23:17:17 +0000719source editors/Config.in
720source findutils/Config.in
721source init/Config.in
722source loginutils/Config.in
723source e2fsprogs/Config.in
724source modutils/Config.in
725source util-linux/Config.in
726source miscutils/Config.in
727source networking/Config.in
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000728source printutils/Config.in
Denis Vlasenkob9d572a2008-11-06 23:41:38 +0000729source mailutils/Config.in
Mike Frysinger72d59db2006-03-10 23:17:17 +0000730source procps/Config.in
Denis Vlasenkofe544582006-10-03 15:57:40 +0000731source runit/Config.in
Denis Vlasenkod46d3c22007-02-06 19:28:50 +0000732source selinux/Config.in
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000733source shell/Config.in
734source sysklogd/Config.in