blob: acd3cb883b8197596459de469b0588445390e99f [file] [log] [blame]
Eric Andersenc9f20d92002-12-05 08:41:41 +00001#
2# For a description of the syntax of this configuration file,
3# see scripts/kbuild/config-language.txt.
4#
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 Vlasenko2c8929c2017-07-15 21:14:16 +020015 bool "Enable compatibility for full-blown desktop systems"
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 Vlasenkoa8df4c02009-10-19 18:56:26 +020040config INCLUDE_SUSv2
41 bool "Enable obsolete features removed before SUSv3"
42 default y
43 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020044 This option will enable backwards compatibility with SuSv2,
45 specifically, old-style numeric options ('command -1 <file>')
46 will be supported in head, tail, and fold. (Note: should
47 affect renice too.)
Denys Vlasenkoa8df4c02009-10-19 18:56:26 +020048
Denys Vlasenko2c8929c2017-07-15 21:14:16 +020049config LONG_OPTS
50 bool "Support --long-options"
51 default y
Denys Vlasenkoaa7da732009-09-13 14:57:24 +020052 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020053 Enable this if you want busybox applets to use the gnu --long-option
54 style, in addition to single character -a -b -c style options.
Denys Vlasenkoaa7da732009-09-13 14:57:24 +020055
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000056config SHOW_USAGE
Bernhard Reutner-Fischerb9f4cd82011-11-09 20:23:38 +010057 bool "Show applet usage messages"
Bernhard Reutner-Fischer81901a02006-03-31 18:43:55 +000058 default y
59 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +020060 Enabling this option, applets will show terse help messages
Denys Vlasenko72089cf2017-07-21 09:50:55 +020061 when invoked with wrong arguments.
62 If you do not want to show any (helpful) usage message when
63 issuing wrong command syntax, you can say 'N' here,
64 saving approximately 7k.
Bernhard Reutner-Fischer81901a02006-03-31 18:43:55 +000065
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000066config FEATURE_VERBOSE_USAGE
Eric Andersenc9f20d92002-12-05 08:41:41 +000067 bool "Show verbose applet usage messages"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +020068 default y
Denys Vlasenko0e5ba082010-06-05 23:11:07 +020069 depends on SHOW_USAGE
Eric Andersenc9f20d92002-12-05 08:41:41 +000070 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +020071 All applets will show verbose help messages when invoked with --help.
72 This will add a lot of text to the binary.
Eric Andersenc9f20d92002-12-05 08:41:41 +000073
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000074config FEATURE_COMPRESS_USAGE
Rob Landley7e21d5f2006-04-27 23:34:46 +000075 bool "Store applet usage messages in compressed form"
76 default y
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000077 depends on SHOW_USAGE
Rob Landley7e21d5f2006-04-27 23:34:46 +000078 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +020079 Store usage messages in .bz2 compressed form, uncompress them
80 on-the-fly when "APPLET --help" is run.
Rob Landley7e21d5f2006-04-27 23:34:46 +000081
Denys Vlasenko72089cf2017-07-21 09:50:55 +020082 If you have a really tiny busybox with few applets enabled (and
83 bunzip2 isn't one of them), the overhead of the decompressor might
84 be noticeable. Also, if you run executables directly from ROM
85 and have very little memory, this might not be a win. Otherwise,
86 you probably want this.
Rob Landleyc7ddefc2006-06-14 01:24:33 +000087
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +020088config LFS
Denys Vlasenko2c8929c2017-07-15 21:14:16 +020089 bool "Support files > 2 GB"
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +020090 default y
91 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +020092 If you need to work with large files, enable this option.
93 This will have no effect if your kernel or your C
Denys Vlasenko72089cf2017-07-21 09:50:55 +020094 library lacks large file support for large files. Some of the
95 programs that can benefit from large file support include dd, gzip,
Denys Vlasenko86d5bf42017-07-27 02:59:13 +020096 cp, mount, tar.
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +020097
Bartosz Golaszewski265a74b2014-02-11 21:31:42 +010098config PAM
Denys Vlasenkof5604222017-01-10 14:58:54 +010099 bool "Support PAM (Pluggable Authentication Modules)"
Bartosz Golaszewski265a74b2014-02-11 21:31:42 +0100100 default n
101 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200102 Use PAM in some applets (currently login and httpd) instead
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200103 of direct access to password database.
Bartosz Golaszewski265a74b2014-02-11 21:31:42 +0100104
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000105config FEATURE_DEVPTS
Eric Andersenc9f20d92002-12-05 08:41:41 +0000106 bool "Use the devpts filesystem for Unix98 PTYs"
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000107 default y
Eric Andersenc9f20d92002-12-05 08:41:41 +0000108 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200109 Enable if you want to use Unix98 PTY support. If enabled,
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200110 busybox will use /dev/ptmx for the master side of the pseudoterminal
111 and /dev/pts/<number> for the slave side. Otherwise, BSD style
112 /dev/ttyp<number> will be used. To use this option, you should have
113 devpts mounted.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000114
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200115config FEATURE_UTMP
116 bool "Support utmp file"
117 default y
118 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200119 The file /var/run/utmp is used to track who is currently logged in.
120 With this option on, certain applets (getty, login, telnetd etc)
121 will create and delete entries there.
122 "who" applet requires this option.
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200123
Denys Vlasenko8d0e0cd2011-01-25 23:21:46 +0100124config FEATURE_WTMP
125 bool "Support wtmp file"
126 default y
127 depends on FEATURE_UTMP
128 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200129 The file /var/run/wtmp is used to track when users have logged into
130 and logged out of the system.
131 With this option on, certain applets (getty, login, telnetd etc)
132 will append new entries there.
133 "last" applet requires this option.
Denys Vlasenko8d0e0cd2011-01-25 23:21:46 +0100134
Denis Vlasenko10457b92007-03-27 22:01:31 +0000135config FEATURE_PIDFILE
136 bool "Support writing pidfiles"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200137 default y
Denis Vlasenko10457b92007-03-27 22:01:31 +0000138 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200139 This option makes some applets (e.g. crond, syslogd, inetd) write
140 a pidfile at the configured PID_FILE_PATH. It has no effect
141 on applets which require pidfiles to run.
Anthony G. Basile12677ac2012-12-10 14:49:39 -0500142
143config PID_FILE_PATH
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200144 string "Directory for pidfiles"
Anthony G. Basile12677ac2012-12-10 14:49:39 -0500145 default "/var/run"
146 depends on FEATURE_PIDFILE
147 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200148 This is the default path where pidfiles are created. Applets which
149 allow you to set the pidfile path on the command line will override
150 this value. The option has no effect on applets that require you to
151 specify a pidfile path.
Denis Vlasenko10457b92007-03-27 22:01:31 +0000152
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200153config BUSYBOX
154 bool "Include busybox applet"
155 default y
156 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200157 The busybox applet provides general help message and allows
158 the included applets to be listed. It also provides
159 optional --install command to create applet links. If you unselect
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200160 this option, running busybox without any arguments will give
161 just a cryptic error message:
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200162
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200163 $ busybox
164 busybox: applet not found
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200165
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200166 Running "busybox APPLET [ARGS...]" will still work, of course.
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200167
168config FEATURE_INSTALLER
169 bool "Support --install [-s] to install applet links at runtime"
170 default y
171 depends on BUSYBOX
172 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200173 Enable 'busybox --install [-s]' support. This will allow you to use
174 busybox at runtime to create hard links or symlinks for all the
175 applets that are compiled into busybox.
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200176
177config INSTALL_NO_USR
178 bool "Don't use /usr"
179 default n
180 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200181 Disable use of /usr. "busybox --install" and "make install"
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200182 will install applets only to /bin and /sbin,
183 never to /usr/bin or /usr/sbin.
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200184
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000185config FEATURE_SUID
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200186 bool "Drop SUID state for most applets"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200187 default y
Eric Andersenc9f20d92002-12-05 08:41:41 +0000188 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200189 With this option you can install the busybox binary belonging
190 to root with the suid bit set, enabling some applets to perform
191 root-level operations even when run by ordinary users
192 (for example, mounting of user mounts in fstab needs this).
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200193
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200194 With this option enabled, busybox drops privileges for applets
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200195 that don't need root access, before entering their main() function.
Rob Landleyd5b9b602006-05-31 23:23:42 +0000196
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200197 If you are really paranoid and don't want even initial busybox code
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200198 to run under root for every applet, build two busybox binaries with
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200199 different applets in them (and the appropriate symlinks pointing
200 to each binary), and only set the suid bit on the one that needs it.
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200201
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200202 Some applets which require root rights (need suid bit on the binary
203 or to be run by root) and will refuse to execute otherwise:
204 crontab, login, passwd, su, vlock, wall.
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000205
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200206 The applets which will use root rights if they have them
207 (via suid bit, or because run by root), but would try to work
208 without root right nevertheless:
209 findfs, ping[6], traceroute[6], mount.
Denys Vlasenko3b5acaa2011-01-18 13:52:48 +0100210
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200211 Note that if you DO NOT select this option, but DO make busybox
212 suid root, ALL applets will run under root, which is a huge
213 security hole (think "cp /some/file /etc/passwd").
Eric Andersenc9f20d92002-12-05 08:41:41 +0000214
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000215config FEATURE_SUID_CONFIG
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200216 bool "Enable SUID configuration via /etc/busybox.conf"
Denys Vlasenkoe0238f82011-05-14 15:23:55 +0200217 default y
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000218 depends on FEATURE_SUID
Eric Andersenc9f20d92002-12-05 08:41:41 +0000219 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200220 Allow the SUID/SGID state of an applet to be determined at runtime
221 by checking /etc/busybox.conf. (This is sort of a poor man's sudo.)
222 The format of this file is as follows:
Eric Andersene5272072003-07-22 22:15:21 +0000223
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200224 APPLET = [Ssx-][Ssx-][x-] [USER.GROUP]
Denys Vlasenko3770b6b2011-05-16 13:19:25 +0200225
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200226 s: USER or GROUP is allowed to execute APPLET.
227 APPLET will run under USER or GROUP
228 (regardless of who's running it).
229 S: USER or GROUP is NOT allowed to execute APPLET.
230 APPLET will run under USER or GROUP.
231 This option is not very sensical.
232 x: USER/GROUP/others are allowed to execute APPLET.
233 No UID/GID change will be done when it is run.
234 -: USER/GROUP/others are not allowed to execute APPLET.
Eric Andersen5043ea12005-06-23 19:15:40 +0000235
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200236 An example might help:
Eric Andersene5272072003-07-22 22:15:21 +0000237
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200238 |[SUID]
239 |su = ssx root.0 # applet su can be run by anyone and runs with
240 | # euid=0,egid=0
241 |su = ssx # exactly the same
242 |
243 |mount = sx- root.disk # applet mount can be run by root and members
244 | # of group disk (but not anyone else)
245 | # and runs with euid=0 (egid is not changed)
246 |
247 |cp = --- # disable applet cp for everyone
Eric Andersene5272072003-07-22 22:15:21 +0000248
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200249 The file has to be owned by user root, group root and has to be
250 writeable only by root:
251 (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
252 The busybox executable has to be owned by user root, group
253 root and has to be setuid root for this to work:
254 (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
Eric Andersene5272072003-07-22 22:15:21 +0000255
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200256 Robert 'sandman' Griebl has more information here:
257 <url: http://www.softforge.de/bb/suid.html >.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000258
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000259config FEATURE_SUID_CONFIG_QUIET
Eric Andersenc9f20d92002-12-05 08:41:41 +0000260 bool "Suppress warning message if /etc/busybox.conf is not readable"
Rob Landleyd5b9b602006-05-31 23:23:42 +0000261 default y
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000262 depends on FEATURE_SUID_CONFIG
Eric Andersenc9f20d92002-12-05 08:41:41 +0000263 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200264 /etc/busybox.conf should be readable by the user needing the SUID,
265 check this option to avoid users to be notified about missing
266 permissions.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000267
Denis Vlasenko80d14be2007-04-10 23:03:30 +0000268config FEATURE_PREFER_APPLETS
Denis Vlasenko2f0c0d02007-01-21 00:41:04 +0000269 bool "exec prefers applets"
270 default n
271 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200272 This is an experimental option which directs applets about to
273 call 'exec' to try and find an applicable busybox applet before
274 searching the PATH. This is typically done by exec'ing
275 /proc/self/exe.
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200276
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200277 This may affect shell, find -exec, xargs and similar applets.
278 They will use applets even if /bin/APPLET -> busybox link
279 is missing (or is not a link to busybox). However, this causes
280 problems in chroot jails without mounted /proc and with ps/top
281 (command name can be shown as 'exe' for applets started this way).
Denis Vlasenko2f0c0d02007-01-21 00:41:04 +0000282
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000283config BUSYBOX_EXEC_PATH
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200284 string "Path to busybox executable"
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000285 default "/proc/self/exe"
286 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200287 When applets need to run other applets, busybox
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200288 sometimes needs to exec() itself. When the /proc filesystem is
289 mounted, /proc/self/exe always points to the currently running
290 executable. If you haven't got /proc, set this to wherever you
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200291 want to run busybox from.
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000292
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200293config SELINUX
294 bool "Support NSA Security Enhanced Linux"
295 default n
296 select PLATFORM_LINUX
297 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200298 Enable support for SELinux in applets ls, ps, and id. Also provide
299 the option of compiling in SELinux applets.
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200300
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200301 If you do not have a complete SELinux userland installed, this stuff
302 will not compile. Specifially, libselinux 1.28 or better is
303 directly required by busybox. If the installation is located in a
304 non-standard directory, provide it by invoking make as follows:
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200305
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200306 CFLAGS=-I<libselinux-include-path> \
307 LDFLAGS=-L<libselinux-lib-path> \
308 make
309
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200310 Most people will leave this set to 'N'.
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200311
312config FEATURE_CLEAN_UP
313 bool "Clean up all memory before exiting (usually not needed)"
314 default n
315 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200316 As a size optimization, busybox normally exits without explicitly
317 freeing dynamically allocated memory or closing files. This saves
318 space since the OS will clean up for us, but it can confuse debuggers
319 like valgrind, which report tons of memory and resource leaks.
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200320
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200321 Don't enable this unless you have a really good reason to clean
322 things up manually.
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200323
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000324# These are auto-selected by other options
325
326config FEATURE_SYSLOG
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000327 bool #No description makes it a hidden option
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000328 default n
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000329 #help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200330 #This option is auto-selected when you select any applet which may
331 #send its output to syslog. You do not need to select it manually.
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000332
333config FEATURE_HAVE_RPC
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000334 bool #No description makes it a hidden option
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000335 default n
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000336 #help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200337 #This is automatically selected if any of enabled applets need it.
338 #You do not need to select it manually.
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000339
Kang-Che Sung4d06b312017-01-07 15:16:46 +0800340config PLATFORM_LINUX
341 bool #No description makes it a hidden option
342 default n
343 #help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200344 #For the most part, busybox requires only POSIX compatibility
345 #from the target system, but some applets and features use
346 #Linux-specific interfaces.
Kang-Che Sung4d06b312017-01-07 15:16:46 +0800347 #
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200348 #This is automatically selected if any applet or feature requires
349 #Linux-specific interfaces. You do not need to select it manually.
Kang-Che Sung4d06b312017-01-07 15:16:46 +0800350
Denys Vlasenko33602262016-11-24 22:08:12 +0100351comment 'Build Options'
Eric Andersenc9f20d92002-12-05 08:41:41 +0000352
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000353config STATIC
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200354 bool "Build static binary (no shared libs)"
Eric Andersenc9f20d92002-12-05 08:41:41 +0000355 default n
356 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200357 If you want to build a static binary, which does not use
358 or require any shared libraries, enable this option.
359 Static binaries are larger, but do not require functioning
360 dynamic libraries to be present, which is important if used
361 as a system rescue tool.
Eric Andersene5272072003-07-22 22:15:21 +0000362
Denis Vlasenko1da86d22008-06-04 11:28:24 +0000363config PIE
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200364 bool "Build position independent executable"
Denis Vlasenko1da86d22008-06-04 11:28:24 +0000365 default n
366 depends on !STATIC
367 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200368 Hardened code option. PIE binaries are loaded at a different
369 address at each invocation. This has some overhead,
370 particularly on x86-32 which is short on registers.
Gilles Espinasse26b80e82011-02-13 22:54:37 +0100371
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200372 Most people will leave this set to 'N'.
Denis Vlasenko1da86d22008-06-04 11:28:24 +0000373
Denis Vlasenkod2c450c2008-01-08 20:32:12 +0000374config NOMMU
375 bool "Force NOMMU build"
376 default n
377 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200378 Busybox tries to detect whether architecture it is being
379 built against supports MMU or not. If this detection fails,
380 or if you want to build NOMMU version of busybox for testing,
381 you may force NOMMU build here.
Denis Vlasenkod2c450c2008-01-08 20:32:12 +0000382
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200383 Most people will leave this set to 'N'.
Denis Vlasenkod2c450c2008-01-08 20:32:12 +0000384
Denis Vlasenkocc3f20b2008-06-23 22:31:52 +0000385# PIE can be made to work with BUILD_LIBBUSYBOX, but currently
386# build system does not support that
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000387config BUILD_LIBBUSYBOX
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000388 bool "Build shared libbusybox"
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000389 default n
Denis Vlasenkofc5e8062008-07-09 21:24:18 +0000390 depends on !FEATURE_PREFER_APPLETS && !PIE && !STATIC
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000391 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200392 Build a shared library libbusybox.so.N.N.N which contains all
393 busybox code.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000394
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200395 This feature allows every applet to be built as a really tiny
396 separate executable linked against the library:
397 |$ size 0_lib/l*
398 | text data bss dec hex filename
399 | 939 212 28 1179 49b 0_lib/last
400 | 939 212 28 1179 49b 0_lib/less
401 | 919138 8328 1556 929022 e2cfe 0_lib/libbusybox.so.1.N.M
Denys Vlasenko367a55c2017-07-15 14:52:26 +0200402
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200403 This is useful on NOMMU systems which are not capable
404 of sharing executables, but are capable of sharing code
405 in dynamic libraries.
Denys Vlasenko367a55c2017-07-15 14:52:26 +0200406
407config FEATURE_LIBBUSYBOX_STATIC
408 bool "Pull in all external references into libbusybox"
409 default n
410 depends on BUILD_LIBBUSYBOX
411 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200412 Make libbusybox library independent, not using or requiring
413 any other shared libraries.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000414
Denis Vlasenkof545be02007-10-07 17:06:26 +0000415config FEATURE_INDIVIDUAL
416 bool "Produce a binary for each applet, linked against libbusybox"
417 default y
Denis Vlasenkofc5e8062008-07-09 21:24:18 +0000418 depends on BUILD_LIBBUSYBOX
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000419 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200420 If your CPU architecture doesn't allow for sharing text/rodata
421 sections of running binaries, but allows for runtime dynamic
422 libraries, this option will allow you to reduce memory footprint
423 when you have many different applets running at once.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000424
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200425 If your CPU architecture allows for sharing text/rodata,
426 having single binary is more optimal.
Denis Vlasenkof545be02007-10-07 17:06:26 +0000427
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200428 Each applet will be a tiny program, dynamically linked
429 against libbusybox.so.N.N.N.
Denis Vlasenkof545be02007-10-07 17:06:26 +0000430
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200431 You need to have a working dynamic linker.
Denis Vlasenkof545be02007-10-07 17:06:26 +0000432
433config FEATURE_SHARED_BUSYBOX
434 bool "Produce additional busybox binary linked against libbusybox"
435 default y
Denis Vlasenkofc5e8062008-07-09 21:24:18 +0000436 depends on BUILD_LIBBUSYBOX
Eric Andersenc9f20d92002-12-05 08:41:41 +0000437 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200438 Build busybox, dynamically linked 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.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000441
Denis Vlasenkodef88982007-10-07 17:06:01 +0000442### config BUILD_AT_ONCE
443### bool "Compile all sources at once"
444### default n
445### help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200446### Normally each source-file is compiled with one invocation of
447### the compiler.
448### If you set this option, all sources are compiled at once.
449### This gives the compiler more opportunities to optimize which can
450### result in smaller and/or faster binaries.
Denis Vlasenkodef88982007-10-07 17:06:01 +0000451###
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200452### Setting this option will consume alot of memory, e.g. if you
453### enable all applets with all features, gcc uses more than 300MB
454### RAM during compilation of busybox.
Denis Vlasenkodef88982007-10-07 17:06:01 +0000455###
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200456### This option is most likely only beneficial for newer compilers
457### such as gcc-4.1 and above.
Denis Vlasenkodef88982007-10-07 17:06:01 +0000458###
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200459### Say 'N' unless you know what you are doing.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000460
Denis Vlasenkob8e653b2008-06-02 04:51:29 +0000461config CROSS_COMPILER_PREFIX
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200462 string "Cross compiler prefix"
Denis Vlasenkob8e653b2008-06-02 04:51:29 +0000463 default ""
464 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200465 If you want to build busybox with a cross compiler, then you
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200466 will need to set this to the cross-compiler prefix, for example,
467 "i386-uclibc-".
Bernhard Reutner-Fischer7d0d3e22008-08-22 08:25:26 +0000468
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200469 Note that CROSS_COMPILE environment variable or
470 "make CROSS_COMPILE=xxx ..." will override this selection.
Bernhard Reutner-Fischer7d0d3e22008-08-22 08:25:26 +0000471
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200472 Native builds leave this empty.
Denis Vlasenkob8e653b2008-06-02 04:51:29 +0000473
Rob Walkerbf634372012-03-07 12:25:53 +0100474config SYSROOT
475 string "Path to sysroot"
476 default ""
477 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200478 If you want to build busybox with a cross compiler, then you
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200479 might also need to specify where /usr/include and /usr/lib
480 will be found.
Rob Walkerbf634372012-03-07 12:25:53 +0100481
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200482 For example, busybox can be built against an installed
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200483 Android NDK, platform version 9, for ARM ABI with
Rob Walkerbf634372012-03-07 12:25:53 +0100484
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200485 CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
Rob Walkerbf634372012-03-07 12:25:53 +0100486
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200487 Native builds leave this empty.
Rob Walkerbf634372012-03-07 12:25:53 +0100488
Bernhard Reutner-Fischerf6107c72009-01-22 13:27:14 +0000489config EXTRA_CFLAGS
490 string "Additional CFLAGS"
491 default ""
492 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200493 Additional CFLAGS to pass to the compiler verbatim.
Bernhard Reutner-Fischerf6107c72009-01-22 13:27:14 +0000494
Rob Walkerbf634372012-03-07 12:25:53 +0100495config EXTRA_LDFLAGS
496 string "Additional LDFLAGS"
497 default ""
498 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200499 Additional LDFLAGS to pass to the linker verbatim.
Rob Walkerbf634372012-03-07 12:25:53 +0100500
501config EXTRA_LDLIBS
502 string "Additional LDLIBS"
503 default ""
504 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200505 Additional LDLIBS to pass to the linker with -l.
Rob Walkerbf634372012-03-07 12:25:53 +0100506
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200507config USE_PORTABLE_CODE
508 bool "Avoid using GCC-specific code constructs"
509 default n
510 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200511 Use this option if you are trying to compile busybox with
512 compiler other than gcc.
513 If you do use gcc, this option may needlessly increase code size.
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200514
Denys Vlasenko33602262016-11-24 22:08:12 +0100515comment 'Installation Options ("make install" behavior)'
Eric Andersenc9f20d92002-12-05 08:41:41 +0000516
Denys Vlasenko33602262016-11-24 22:08:12 +0100517choice
518 prompt "What kind of applet links to install"
519 default INSTALL_APPLET_SYMLINKS
520 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200521 Choose what kind of links to applets are created by "make install".
Denys Vlasenko33602262016-11-24 22:08:12 +0100522
523config INSTALL_APPLET_SYMLINKS
524 bool "as soft-links"
525 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200526 Install applets as soft-links to the busybox binary. This needs some
527 free inodes on the filesystem, but might help with filesystem
528 generators that can't cope with hard-links.
Denys Vlasenko33602262016-11-24 22:08:12 +0100529
530config INSTALL_APPLET_HARDLINKS
531 bool "as hard-links"
532 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200533 Install applets as hard-links to the busybox binary. This might
534 count on a filesystem with few inodes.
Denys Vlasenko33602262016-11-24 22:08:12 +0100535
536config INSTALL_APPLET_SCRIPT_WRAPPERS
537 bool "as script wrappers"
538 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200539 Install applets as script wrappers that call the busybox binary.
Denys Vlasenko33602262016-11-24 22:08:12 +0100540
541config INSTALL_APPLET_DONT
542 bool "not installed"
543 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200544 Do not install applet links. Useful when you plan to use
545 busybox --install for installing links, or plan to use
546 a standalone shell and thus don't need applet links.
Denys Vlasenko33602262016-11-24 22:08:12 +0100547
548endchoice
549
550choice
551 prompt "/bin/sh applet link"
552 default INSTALL_SH_APPLET_SYMLINK
553 depends on INSTALL_APPLET_SCRIPT_WRAPPERS
554 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200555 Choose how you install /bin/sh applet link.
Denys Vlasenko33602262016-11-24 22:08:12 +0100556
557config INSTALL_SH_APPLET_SYMLINK
558 bool "as soft-link"
559 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200560 Install /bin/sh applet as soft-link to the busybox binary.
Denys Vlasenko33602262016-11-24 22:08:12 +0100561
562config INSTALL_SH_APPLET_HARDLINK
563 bool "as hard-link"
564 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200565 Install /bin/sh applet as hard-link to the busybox binary.
Denys Vlasenko33602262016-11-24 22:08:12 +0100566
567config INSTALL_SH_APPLET_SCRIPT_WRAPPER
568 bool "as script wrapper"
569 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200570 Install /bin/sh applet as script wrapper that calls
571 the busybox binary.
Denys Vlasenko33602262016-11-24 22:08:12 +0100572
573endchoice
574
575config PREFIX
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200576 string "Destination path for 'make install'"
Denys Vlasenko33602262016-11-24 22:08:12 +0100577 default "./_install"
578 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200579 Where "make install" should install busybox binary and links.
Denys Vlasenko33602262016-11-24 22:08:12 +0100580
581comment 'Debugging Options'
Eric Andersenc9f20d92002-12-05 08:41:41 +0000582
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000583config DEBUG
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200584 bool "Build with debug information"
Eric Andersenc9f20d92002-12-05 08:41:41 +0000585 default n
586 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200587 Say Y here to compile with debug information.
588 This increases the size of the binary considerably, and
589 should only be used when doing development.
590
591 This adds -g option to gcc command line.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000592
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200593 Most people should answer N.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000594
Denis Vlasenkobd8390a2008-06-12 20:23:03 +0000595config DEBUG_PESSIMIZE
Denis Vlasenkoc185e292008-07-16 23:45:11 +0000596 bool "Disable compiler optimizations"
Denis Vlasenkobd8390a2008-06-12 20:23:03 +0000597 default n
598 depends on DEBUG
599 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200600 The compiler's optimization of source code can eliminate and reorder
601 code, resulting in an executable that's hard to understand when
602 stepping through it with a debugger. This switches it off, resulting
603 in a much bigger executable that more closely matches the source
604 code.
Denis Vlasenkobd8390a2008-06-12 20:23:03 +0000605
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200606 This replaces -Os/-O2 with -O0 in gcc command line.
607
Mike Frysinger43e56632016-02-12 22:12:47 -0500608config DEBUG_SANITIZE
609 bool "Enable runtime sanitizers (ASAN/LSAN/USAN/etc...)"
610 default n
611 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200612 Say Y here if you want to enable runtime sanitizers. These help
613 catch bad memory accesses (e.g. buffer overflows), but will make
614 the executable larger and slow down runtime a bit.
Mike Frysinger43e56632016-02-12 22:12:47 -0500615
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200616 This adds -fsanitize=foo options to gcc command line.
Denys Vlasenkof5604222017-01-10 14:58:54 +0100617
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200618 If you aren't developing/testing busybox, say N here.
Mike Frysinger43e56632016-02-12 22:12:47 -0500619
Bartosz Golaszewski3ed81cf2014-06-22 16:30:41 +0200620config UNIT_TEST
621 bool "Build unit tests"
622 default n
623 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200624 Say Y here if you want to build unit tests (both the framework and
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200625 test cases) as an applet. This results in bigger code, so you
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200626 probably don't want this option in production builds.
Bartosz Golaszewski3ed81cf2014-06-22 16:30:41 +0200627
Denis Vlasenkoe0eebc12007-01-27 13:44:53 +0000628config WERROR
629 bool "Abort compilation on any warning"
Rob Landleyc503df52006-05-09 22:08:56 +0000630 default n
Rob Landleyc503df52006-05-09 22:08:56 +0000631 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200632 This adds -Werror to gcc command line.
Denis Vlasenkoe0eebc12007-01-27 13:44:53 +0000633
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200634 Most people should answer N.
Denis Vlasenkoe0eebc12007-01-27 13:44:53 +0000635
Eric Andersenf086ed82004-05-25 11:30:22 +0000636choice
637 prompt "Additional debugging library"
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000638 default NO_DEBUG_LIB
Eric Andersenc9f20d92002-12-05 08:41:41 +0000639 help
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200640 Using an additional debugging library will make busybox become
641 considerably larger and will cause it to run more slowly. You
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200642 should always leave this option disabled for production use.
Eric Andersenf086ed82004-05-25 11:30:22 +0000643
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200644 dmalloc support:
645 ----------------
646 This enables compiling with dmalloc ( http://dmalloc.com/ )
647 which is an excellent public domain mem leak and malloc problem
648 detector. To enable dmalloc, before running busybox you will
649 want to properly set your environment, for example:
650 export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
651 The 'debug=' value is generated using the following command
652 dmalloc -p log-stats -p log-non-free -p log-bad-space \
653 -p log-elapsed-time -p check-fence -p check-heap \
654 -p check-lists -p check-blank -p check-funcs -p realloc-copy \
655 -p allow-free-null
Eric Andersenc9f20d92002-12-05 08:41:41 +0000656
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200657 Electric-fence support:
658 -----------------------
659 This enables compiling with Electric-fence support. Electric
660 fence is another very useful malloc debugging library which uses
661 your computer's virtual memory hardware to detect illegal memory
Denys Vlasenko86d5bf42017-07-27 02:59:13 +0200662 accesses. This support will make busybox be considerably larger
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200663 and run slower, so you should leave this option disabled unless
664 you are hunting a hard to find memory problem.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000665
Eric Andersenf086ed82004-05-25 11:30:22 +0000666
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000667config NO_DEBUG_LIB
Eric Andersenf086ed82004-05-25 11:30:22 +0000668 bool "None"
669
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000670config DMALLOC
Eric Andersenf086ed82004-05-25 11:30:22 +0000671 bool "Dmalloc"
672
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000673config EFENCE
Eric Andersenf086ed82004-05-25 11:30:22 +0000674 bool "Electric-fence"
675
676endchoice
677
Mike Frysinger72d59db2006-03-10 23:17:17 +0000678source libbb/Config.in
679
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200680endmenu
681
Mike Frysinger72d59db2006-03-10 23:17:17 +0000682comment "Applets"
683
684source archival/Config.in
685source coreutils/Config.in
686source console-tools/Config.in
687source debianutils/Config.in
688source editors/Config.in
689source findutils/Config.in
690source init/Config.in
691source loginutils/Config.in
692source e2fsprogs/Config.in
693source modutils/Config.in
694source util-linux/Config.in
695source miscutils/Config.in
696source networking/Config.in
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000697source printutils/Config.in
Denis Vlasenkob9d572a2008-11-06 23:41:38 +0000698source mailutils/Config.in
Mike Frysinger72d59db2006-03-10 23:17:17 +0000699source procps/Config.in
Denis Vlasenkofe544582006-10-03 15:57:40 +0000700source runit/Config.in
Denis Vlasenkod46d3c22007-02-06 19:28:50 +0000701source selinux/Config.in
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000702source shell/Config.in
703source sysklogd/Config.in