blob: c1cc591f37f1a07fa59bfb447f1037b45a666f91 [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
6mainmenu "BusyBox Configuration"
7
Eric Andersen068b6b02002-12-13 22:53:28 +00008config HAVE_DOT_CONFIG
9 bool
10 default y
11
Rob Landley9dc69132006-03-13 02:52:23 +000012menu "Busybox 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 Vlasenko72089cf2017-07-21 09:50:55 +020060 Enabling this option, BusyBox applets will show terse help messages
61 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 Vlasenko72089cf2017-07-21 09:50:55 +020071 All BusyBox applets will show verbose help messages when
72 busybox is invoked with --help. This will add a lot of text to the
73 busybox binary. In the default configuration, this will add about
74 13k, but it can add much more depending on your configuration.
Eric Andersenc9f20d92002-12-05 08:41:41 +000075
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000076config FEATURE_COMPRESS_USAGE
Rob Landley7e21d5f2006-04-27 23:34:46 +000077 bool "Store applet usage messages in compressed form"
78 default y
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000079 depends on SHOW_USAGE
Rob Landley7e21d5f2006-04-27 23:34:46 +000080 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020081 Store usage messages in .bz compressed form, uncompress them
82 on-the-fly when <applet> --help is called.
Rob Landley7e21d5f2006-04-27 23:34:46 +000083
Denys Vlasenko72089cf2017-07-21 09:50:55 +020084 If you have a really tiny busybox with few applets enabled (and
85 bunzip2 isn't one of them), the overhead of the decompressor might
86 be noticeable. Also, if you run executables directly from ROM
87 and have very little memory, this might not be a win. Otherwise,
88 you probably want this.
Rob Landleyc7ddefc2006-06-14 01:24:33 +000089
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +020090config LFS
Denys Vlasenko2c8929c2017-07-15 21:14:16 +020091 bool "Support files > 2 GB"
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +020092 default y
93 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +020094 If you want to build BusyBox with large file support, then enable
95 this option. This will have no effect if your kernel or your C
96 library lacks large file support for large files. Some of the
97 programs that can benefit from large file support include dd, gzip,
98 cp, mount, tar, and many others. If you want to access files larger
99 than 2 Gigabytes, enable this option.
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200100
Bartosz Golaszewski265a74b2014-02-11 21:31:42 +0100101config PAM
Denys Vlasenkof5604222017-01-10 14:58:54 +0100102 bool "Support PAM (Pluggable Authentication Modules)"
Bartosz Golaszewski265a74b2014-02-11 21:31:42 +0100103 default n
104 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200105 Use PAM in some busybox applets (currently login and httpd) instead
106 of direct access to password database.
Bartosz Golaszewski265a74b2014-02-11 21:31:42 +0100107
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000108config FEATURE_DEVPTS
Eric Andersenc9f20d92002-12-05 08:41:41 +0000109 bool "Use the devpts filesystem for Unix98 PTYs"
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000110 default y
Eric Andersenc9f20d92002-12-05 08:41:41 +0000111 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200112 Enable if you want BusyBox to use Unix98 PTY support. If enabled,
113 busybox will use /dev/ptmx for the master side of the pseudoterminal
114 and /dev/pts/<number> for the slave side. Otherwise, BSD style
115 /dev/ttyp<number> will be used. To use this option, you should have
116 devpts mounted.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000117
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200118config FEATURE_UTMP
119 bool "Support utmp file"
120 default y
121 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200122 The file /var/run/utmp is used to track who is currently logged in.
123 With this option on, certain applets (getty, login, telnetd etc)
124 will create and delete entries there.
125 "who" applet requires this option.
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200126
Denys Vlasenko8d0e0cd2011-01-25 23:21:46 +0100127config FEATURE_WTMP
128 bool "Support wtmp file"
129 default y
130 depends on FEATURE_UTMP
131 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200132 The file /var/run/wtmp is used to track when users have logged into
133 and logged out of the system.
134 With this option on, certain applets (getty, login, telnetd etc)
135 will append new entries there.
136 "last" applet requires this option.
Denys Vlasenko8d0e0cd2011-01-25 23:21:46 +0100137
Denis Vlasenko10457b92007-03-27 22:01:31 +0000138config FEATURE_PIDFILE
139 bool "Support writing pidfiles"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200140 default y
Denis Vlasenko10457b92007-03-27 22:01:31 +0000141 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200142 This option makes some applets (e.g. crond, syslogd, inetd) write
143 a pidfile at the configured PID_FILE_PATH. It has no effect
144 on applets which require pidfiles to run.
Anthony G. Basile12677ac2012-12-10 14:49:39 -0500145
146config PID_FILE_PATH
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200147 string "Directory for pidfiles"
Anthony G. Basile12677ac2012-12-10 14:49:39 -0500148 default "/var/run"
149 depends on FEATURE_PIDFILE
150 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200151 This is the default path where pidfiles are created. Applets which
152 allow you to set the pidfile path on the command line will override
153 this value. The option has no effect on applets that require you to
154 specify a pidfile path.
Denis Vlasenko10457b92007-03-27 22:01:31 +0000155
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200156config BUSYBOX
157 bool "Include busybox applet"
158 default y
159 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200160 The busybox applet provides general help regarding busybox and
161 allows the included applets to be listed. It's also required
162 if applet links are to be installed at runtime. If you unselect
163 this option, running busybox without any arguments will give
164 just a cryptic error message:
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200165
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200166 $ busybox
167 busybox: applet not found
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200168
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200169 Running "busybox APPLET [ARGS...]" will still work, of course.
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200170
171config FEATURE_INSTALLER
172 bool "Support --install [-s] to install applet links at runtime"
173 default y
174 depends on BUSYBOX
175 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200176 Enable 'busybox --install [-s]' support. This will allow you to use
177 busybox at runtime to create hard links or symlinks for all the
178 applets that are compiled into busybox.
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200179
180config INSTALL_NO_USR
181 bool "Don't use /usr"
182 default n
183 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200184 Disable use of /usr. busybox --install and "make install"
185 will install applets only to /bin and /sbin,
186 never to /usr/bin or /usr/sbin.
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200187
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000188config FEATURE_SUID
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200189 bool "Drop SUID state for most applets"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200190 default y
Eric Andersenc9f20d92002-12-05 08:41:41 +0000191 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200192 With this option you can install the busybox binary belonging
193 to root with the suid bit set, enabling some applets to perform
194 root-level operations even when run by ordinary users
195 (for example, mounting of user mounts in fstab needs this).
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200196
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200197 With this option enabled, Busybox drops privileges for applets
198 that don't need root access, before entering their main() function.
Rob Landleyd5b9b602006-05-31 23:23:42 +0000199
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200200 If you are really paranoid and don't want even initial busybox code
201 to run under root for evey applet, build two busybox binaries with
202 different applets in them (and the appropriate symlinks pointing
203 to each binary), and only set the suid bit on the one that needs it.
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200204
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200205 Some applets which require root rights (need suid bit on the binary
206 or to be run by root) and will refuse to execute otherwise:
207 crontab, login, passwd, su, vlock, wall.
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000208
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200209 The applets which will use root rights if they have them
210 (via suid bit, or because run by root), but would try to work
211 without root right nevertheless:
212 findfs, ping[6], traceroute[6], mount.
Denys Vlasenko3b5acaa2011-01-18 13:52:48 +0100213
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200214 Note that if you DO NOT select this option, but DO make busybox
215 suid root, ALL applets will run under root, which is a huge
216 security hole (think "cp /some/file /etc/passwd").
Eric Andersenc9f20d92002-12-05 08:41:41 +0000217
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000218config FEATURE_SUID_CONFIG
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200219 bool "Enable SUID configuration via /etc/busybox.conf"
Denys Vlasenkoe0238f82011-05-14 15:23:55 +0200220 default y
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000221 depends on FEATURE_SUID
Eric Andersenc9f20d92002-12-05 08:41:41 +0000222 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200223 Allow the SUID/SGID state of an applet to be determined at runtime
224 by checking /etc/busybox.conf. (This is sort of a poor man's sudo.)
225 The format of this file is as follows:
Eric Andersene5272072003-07-22 22:15:21 +0000226
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200227 APPLET = [Ssx-][Ssx-][x-] [USER.GROUP]
Denys Vlasenko3770b6b2011-05-16 13:19:25 +0200228
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200229 s: USER or GROUP is allowed to execute APPLET.
230 APPLET will run under USER or GROUP
231 (regardless of who's running it).
232 S: USER or GROUP is NOT allowed to execute APPLET.
233 APPLET will run under USER or GROUP.
234 This option is not very sensical.
235 x: USER/GROUP/others are allowed to execute APPLET.
236 No UID/GID change will be done when it is run.
237 -: USER/GROUP/others are not allowed to execute APPLET.
Eric Andersen5043ea12005-06-23 19:15:40 +0000238
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200239 An example might help:
Eric Andersene5272072003-07-22 22:15:21 +0000240
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200241 |[SUID]
242 |su = ssx root.0 # applet su can be run by anyone and runs with
243 | # euid=0,egid=0
244 |su = ssx # exactly the same
245 |
246 |mount = sx- root.disk # applet mount can be run by root and members
247 | # of group disk (but not anyone else)
248 | # and runs with euid=0 (egid is not changed)
249 |
250 |cp = --- # disable applet cp for everyone
Eric Andersene5272072003-07-22 22:15:21 +0000251
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200252 The file has to be owned by user root, group root and has to be
253 writeable only by root:
254 (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
255 The busybox executable has to be owned by user root, group
256 root and has to be setuid root for this to work:
257 (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
Eric Andersene5272072003-07-22 22:15:21 +0000258
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200259 Robert 'sandman' Griebl has more information here:
260 <url: http://www.softforge.de/bb/suid.html >.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000261
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000262config FEATURE_SUID_CONFIG_QUIET
Eric Andersenc9f20d92002-12-05 08:41:41 +0000263 bool "Suppress warning message if /etc/busybox.conf is not readable"
Rob Landleyd5b9b602006-05-31 23:23:42 +0000264 default y
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000265 depends on FEATURE_SUID_CONFIG
Eric Andersenc9f20d92002-12-05 08:41:41 +0000266 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200267 /etc/busybox.conf should be readable by the user needing the SUID,
268 check this option to avoid users to be notified about missing
269 permissions.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000270
Denis Vlasenko80d14be2007-04-10 23:03:30 +0000271config FEATURE_PREFER_APPLETS
Denis Vlasenko2f0c0d02007-01-21 00:41:04 +0000272 bool "exec prefers applets"
273 default n
274 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200275 This is an experimental option which directs applets about to
276 call 'exec' to try and find an applicable busybox applet before
277 searching the PATH. This is typically done by exec'ing
278 /proc/self/exe.
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200279
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200280 This may affect shell, find -exec, xargs and similar applets.
281 They will use applets even if /bin/APPLET -> busybox link
282 is missing (or is not a link to busybox). However, this causes
283 problems in chroot jails without mounted /proc and with ps/top
284 (command name can be shown as 'exe' for applets started this way).
Denis Vlasenko2f0c0d02007-01-21 00:41:04 +0000285
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000286config BUSYBOX_EXEC_PATH
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000287 string "Path to BusyBox executable"
288 default "/proc/self/exe"
289 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200290 When Busybox applets need to run other busybox applets, BusyBox
291 sometimes needs to exec() itself. When the /proc filesystem is
292 mounted, /proc/self/exe always points to the currently running
293 executable. If you haven't got /proc, set this to wherever you
294 want to run BusyBox from.
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000295
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200296config SELINUX
297 bool "Support NSA Security Enhanced Linux"
298 default n
299 select PLATFORM_LINUX
300 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200301 Enable support for SELinux in applets ls, ps, and id. Also provide
302 the option of compiling in SELinux applets.
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200303
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200304 If you do not have a complete SELinux userland installed, this stuff
305 will not compile. Specifially, libselinux 1.28 or better is
306 directly required by busybox. If the installation is located in a
307 non-standard directory, provide it by invoking make as follows:
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200308
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200309 CFLAGS=-I<libselinux-include-path> \
310 LDFLAGS=-L<libselinux-lib-path> \
311 make
312
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200313 Most people will leave this set to 'N'.
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200314
315config FEATURE_CLEAN_UP
316 bool "Clean up all memory before exiting (usually not needed)"
317 default n
318 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200319 As a size optimization, busybox normally exits without explicitly
320 freeing dynamically allocated memory or closing files. This saves
321 space since the OS will clean up for us, but it can confuse debuggers
322 like valgrind, which report tons of memory and resource leaks.
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200323
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200324 Don't enable this unless you have a really good reason to clean
325 things up manually.
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200326
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000327# These are auto-selected by other options
328
329config FEATURE_SYSLOG
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000330 bool #No description makes it a hidden option
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000331 default n
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000332 #help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200333 #This option is auto-selected when you select any applet which may
334 #send its output to syslog. You do not need to select it manually.
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000335
336config FEATURE_HAVE_RPC
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000337 bool #No description makes it a hidden option
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000338 default n
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000339 #help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200340 #This is automatically selected if any of enabled applets need it.
341 #You do not need to select it manually.
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000342
Kang-Che Sung4d06b312017-01-07 15:16:46 +0800343config PLATFORM_LINUX
344 bool #No description makes it a hidden option
345 default n
346 #help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200347 #For the most part, busybox requires only POSIX compatibility
348 #from the target system, but some applets and features use
349 #Linux-specific interfaces.
Kang-Che Sung4d06b312017-01-07 15:16:46 +0800350 #
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200351 #This is automatically selected if any applet or feature requires
352 #Linux-specific interfaces. You do not need to select it manually.
Kang-Che Sung4d06b312017-01-07 15:16:46 +0800353
Denys Vlasenko33602262016-11-24 22:08:12 +0100354comment 'Build Options'
Eric Andersenc9f20d92002-12-05 08:41:41 +0000355
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000356config STATIC
Eric Andersenc9f20d92002-12-05 08:41:41 +0000357 bool "Build BusyBox as a static binary (no shared libs)"
358 default n
359 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200360 If you want to build a static BusyBox binary, which does not
361 use or require any shared libraries, then enable this option.
362 This can cause BusyBox to be considerably larger, so you should
363 leave this option false unless you have a good reason (i.e.
364 your target platform does not support shared libraries, or
365 you are building an initrd which doesn't need anything but
366 BusyBox, etc).
Eric Andersenc9f20d92002-12-05 08:41:41 +0000367
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200368 Most people will leave this set to 'N'.
Eric Andersene5272072003-07-22 22:15:21 +0000369
Denis Vlasenko1da86d22008-06-04 11:28:24 +0000370config PIE
371 bool "Build BusyBox as a position independent executable"
372 default n
373 depends on !STATIC
374 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200375 Hardened code option. PIE binaries are loaded at a different
376 address at each invocation. This has some overhead,
377 particularly on x86-32 which is short on registers.
Gilles Espinasse26b80e82011-02-13 22:54:37 +0100378
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200379 Most people will leave this set to 'N'.
Denis Vlasenko1da86d22008-06-04 11:28:24 +0000380
Denis Vlasenkod2c450c2008-01-08 20:32:12 +0000381config NOMMU
382 bool "Force NOMMU build"
383 default n
384 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200385 Busybox tries to detect whether architecture it is being
386 built against supports MMU or not. If this detection fails,
387 or if you want to build NOMMU version of busybox for testing,
388 you may force NOMMU build here.
Denis Vlasenkod2c450c2008-01-08 20:32:12 +0000389
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200390 Most people will leave this set to 'N'.
Denis Vlasenkod2c450c2008-01-08 20:32:12 +0000391
Denis Vlasenkocc3f20b2008-06-23 22:31:52 +0000392# PIE can be made to work with BUILD_LIBBUSYBOX, but currently
393# build system does not support that
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000394config BUILD_LIBBUSYBOX
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000395 bool "Build shared libbusybox"
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000396 default n
Denis Vlasenkofc5e8062008-07-09 21:24:18 +0000397 depends on !FEATURE_PREFER_APPLETS && !PIE && !STATIC
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000398 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200399 Build a shared library libbusybox.so.N.N.N which contains all
400 busybox code.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000401
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200402 This feature allows every applet to be built as a really tiny
403 separate executable linked against the library:
404 |$ size 0_lib/l*
405 | text data bss dec hex filename
406 | 939 212 28 1179 49b 0_lib/last
407 | 939 212 28 1179 49b 0_lib/less
408 | 919138 8328 1556 929022 e2cfe 0_lib/libbusybox.so.1.N.M
Denys Vlasenko367a55c2017-07-15 14:52:26 +0200409
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200410 This is useful on NOMMU systems which are not capable
411 of sharing executables, but are capable of sharing code
412 in dynamic libraries.
Denys Vlasenko367a55c2017-07-15 14:52:26 +0200413
414config FEATURE_LIBBUSYBOX_STATIC
415 bool "Pull in all external references into libbusybox"
416 default n
417 depends on BUILD_LIBBUSYBOX
418 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200419 Make libbusybox library independent, not using or requiring
420 any other shared libraries.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000421
Denis Vlasenkof545be02007-10-07 17:06:26 +0000422config FEATURE_INDIVIDUAL
423 bool "Produce a binary for each applet, linked against libbusybox"
424 default y
Denis Vlasenkofc5e8062008-07-09 21:24:18 +0000425 depends on BUILD_LIBBUSYBOX
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000426 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200427 If your CPU architecture doesn't allow for sharing text/rodata
428 sections of running binaries, but allows for runtime dynamic
429 libraries, this option will allow you to reduce memory footprint
430 when you have many different applets running at once.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000431
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200432 If your CPU architecture allows for sharing text/rodata,
433 having single binary is more optimal.
Denis Vlasenkof545be02007-10-07 17:06:26 +0000434
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200435 Each applet will be a tiny program, dynamically linked
436 against libbusybox.so.N.N.N.
Denis Vlasenkof545be02007-10-07 17:06:26 +0000437
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200438 You need to have a working dynamic linker.
Denis Vlasenkof545be02007-10-07 17:06:26 +0000439
440config FEATURE_SHARED_BUSYBOX
441 bool "Produce additional busybox binary linked against libbusybox"
442 default y
Denis Vlasenkofc5e8062008-07-09 21:24:18 +0000443 depends on BUILD_LIBBUSYBOX
Eric Andersenc9f20d92002-12-05 08:41:41 +0000444 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200445 Build busybox, dynamically linked against libbusybox.so.N.N.N.
Denis Vlasenkof545be02007-10-07 17:06:26 +0000446
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200447 You need to have a working dynamic linker.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000448
Denis Vlasenkodef88982007-10-07 17:06:01 +0000449### config BUILD_AT_ONCE
450### bool "Compile all sources at once"
451### default n
452### help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200453### Normally each source-file is compiled with one invocation of
454### the compiler.
455### If you set this option, all sources are compiled at once.
456### This gives the compiler more opportunities to optimize which can
457### result in smaller and/or faster binaries.
Denis Vlasenkodef88982007-10-07 17:06:01 +0000458###
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200459### Setting this option will consume alot of memory, e.g. if you
460### enable all applets with all features, gcc uses more than 300MB
461### RAM during compilation of busybox.
Denis Vlasenkodef88982007-10-07 17:06:01 +0000462###
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200463### This option is most likely only beneficial for newer compilers
464### such as gcc-4.1 and above.
Denis Vlasenkodef88982007-10-07 17:06:01 +0000465###
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200466### Say 'N' unless you know what you are doing.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000467
Denis Vlasenkob8e653b2008-06-02 04:51:29 +0000468config CROSS_COMPILER_PREFIX
469 string "Cross Compiler prefix"
470 default ""
471 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200472 If you want to build BusyBox with a cross compiler, then you
473 will need to set this to the cross-compiler prefix, for example,
474 "i386-uclibc-".
Bernhard Reutner-Fischer7d0d3e22008-08-22 08:25:26 +0000475
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200476 Note that CROSS_COMPILE environment variable or
477 "make CROSS_COMPILE=xxx ..." will override this selection.
Bernhard Reutner-Fischer7d0d3e22008-08-22 08:25:26 +0000478
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200479 Native builds leave this empty.
Denis Vlasenkob8e653b2008-06-02 04:51:29 +0000480
Rob Walkerbf634372012-03-07 12:25:53 +0100481config SYSROOT
482 string "Path to sysroot"
483 default ""
484 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200485 If you want to build BusyBox with a cross compiler, then you
486 might also need to specify where /usr/include and /usr/lib
487 will be found.
Rob Walkerbf634372012-03-07 12:25:53 +0100488
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200489 For example, BusyBox can be built against an installed
490 Android NDK, platform version 9, for ARM ABI with
Rob Walkerbf634372012-03-07 12:25:53 +0100491
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200492 CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
Rob Walkerbf634372012-03-07 12:25:53 +0100493
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200494 Native builds leave this empty.
Rob Walkerbf634372012-03-07 12:25:53 +0100495
Bernhard Reutner-Fischerf6107c72009-01-22 13:27:14 +0000496config EXTRA_CFLAGS
497 string "Additional CFLAGS"
498 default ""
499 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200500 Additional CFLAGS to pass to the compiler verbatim.
Bernhard Reutner-Fischerf6107c72009-01-22 13:27:14 +0000501
Rob Walkerbf634372012-03-07 12:25:53 +0100502config EXTRA_LDFLAGS
503 string "Additional LDFLAGS"
504 default ""
505 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200506 Additional LDFLAGS to pass to the linker verbatim.
Rob Walkerbf634372012-03-07 12:25:53 +0100507
508config EXTRA_LDLIBS
509 string "Additional LDLIBS"
510 default ""
511 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200512 Additional LDLIBS to pass to the linker with -l.
Rob Walkerbf634372012-03-07 12:25:53 +0100513
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200514config USE_PORTABLE_CODE
515 bool "Avoid using GCC-specific code constructs"
516 default n
517 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200518 Use this option if you are trying to compile busybox with
519 compiler other than gcc.
520 If you do use gcc, this option may needlessly increase code size.
Denys Vlasenko2c8929c2017-07-15 21:14:16 +0200521
Denys Vlasenko33602262016-11-24 22:08:12 +0100522comment 'Installation Options ("make install" behavior)'
Eric Andersenc9f20d92002-12-05 08:41:41 +0000523
Denys Vlasenko33602262016-11-24 22:08:12 +0100524choice
525 prompt "What kind of applet links to install"
526 default INSTALL_APPLET_SYMLINKS
527 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200528 Choose what kind of links to applets are created by "make install".
Denys Vlasenko33602262016-11-24 22:08:12 +0100529
530config INSTALL_APPLET_SYMLINKS
531 bool "as soft-links"
532 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200533 Install applets as soft-links to the busybox binary. This needs some
534 free inodes on the filesystem, but might help with filesystem
535 generators that can't cope with hard-links.
Denys Vlasenko33602262016-11-24 22:08:12 +0100536
537config INSTALL_APPLET_HARDLINKS
538 bool "as hard-links"
539 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200540 Install applets as hard-links to the busybox binary. This might
541 count on a filesystem with few inodes.
Denys Vlasenko33602262016-11-24 22:08:12 +0100542
543config INSTALL_APPLET_SCRIPT_WRAPPERS
544 bool "as script wrappers"
545 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200546 Install applets as script wrappers that call the busybox binary.
Denys Vlasenko33602262016-11-24 22:08:12 +0100547
548config INSTALL_APPLET_DONT
549 bool "not installed"
550 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200551 Do not install applet links. Useful when you plan to use
552 busybox --install for installing links, or plan to use
553 a standalone shell and thus don't need applet links.
Denys Vlasenko33602262016-11-24 22:08:12 +0100554
555endchoice
556
557choice
558 prompt "/bin/sh applet link"
559 default INSTALL_SH_APPLET_SYMLINK
560 depends on INSTALL_APPLET_SCRIPT_WRAPPERS
561 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200562 Choose how you install /bin/sh applet link.
Denys Vlasenko33602262016-11-24 22:08:12 +0100563
564config INSTALL_SH_APPLET_SYMLINK
565 bool "as soft-link"
566 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200567 Install /bin/sh applet as soft-link to the busybox binary.
Denys Vlasenko33602262016-11-24 22:08:12 +0100568
569config INSTALL_SH_APPLET_HARDLINK
570 bool "as hard-link"
571 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200572 Install /bin/sh applet as hard-link to the busybox binary.
Denys Vlasenko33602262016-11-24 22:08:12 +0100573
574config INSTALL_SH_APPLET_SCRIPT_WRAPPER
575 bool "as script wrapper"
576 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200577 Install /bin/sh applet as script wrapper that calls
578 the busybox binary.
Denys Vlasenko33602262016-11-24 22:08:12 +0100579
580endchoice
581
582config PREFIX
583 string "BusyBox installation prefix"
584 default "./_install"
585 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200586 Define your directory to install BusyBox files/subdirs in.
Denys Vlasenko33602262016-11-24 22:08:12 +0100587
588comment 'Debugging Options'
Eric Andersenc9f20d92002-12-05 08:41:41 +0000589
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000590config DEBUG
Rob Landleyc503df52006-05-09 22:08:56 +0000591 bool "Build BusyBox with extra Debugging symbols"
Eric Andersenc9f20d92002-12-05 08:41:41 +0000592 default n
593 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200594 Say Y here if you wish to examine BusyBox internals while applets are
595 running. This increases the size of the binary considerably, and
596 should only be used when doing development. If you are doing
597 development and want to debug BusyBox, answer Y.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000598
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200599 Most people should answer N.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000600
Denis Vlasenkobd8390a2008-06-12 20:23:03 +0000601config DEBUG_PESSIMIZE
Denis Vlasenkoc185e292008-07-16 23:45:11 +0000602 bool "Disable compiler optimizations"
Denis Vlasenkobd8390a2008-06-12 20:23:03 +0000603 default n
604 depends on DEBUG
605 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200606 The compiler's optimization of source code can eliminate and reorder
607 code, resulting in an executable that's hard to understand when
608 stepping through it with a debugger. This switches it off, resulting
609 in a much bigger executable that more closely matches the source
610 code.
Denis Vlasenkobd8390a2008-06-12 20:23:03 +0000611
Mike Frysinger43e56632016-02-12 22:12:47 -0500612config DEBUG_SANITIZE
613 bool "Enable runtime sanitizers (ASAN/LSAN/USAN/etc...)"
614 default n
615 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200616 Say Y here if you want to enable runtime sanitizers. These help
617 catch bad memory accesses (e.g. buffer overflows), but will make
618 the executable larger and slow down runtime a bit.
Mike Frysinger43e56632016-02-12 22:12:47 -0500619
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200620 This adds -fsanitize=foo options to gcc command line.
Denys Vlasenkof5604222017-01-10 14:58:54 +0100621
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200622 If you aren't developing/testing busybox, say N here.
Mike Frysinger43e56632016-02-12 22:12:47 -0500623
Bartosz Golaszewski3ed81cf2014-06-22 16:30:41 +0200624config UNIT_TEST
625 bool "Build unit tests"
626 default n
627 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200628 Say Y here if you want to build unit tests (both the framework and
629 test cases) as a Busybox applet. This results in bigger code, so you
630 probably don't want this option in production builds.
Bartosz Golaszewski3ed81cf2014-06-22 16:30:41 +0200631
Denis Vlasenkoe0eebc12007-01-27 13:44:53 +0000632config WERROR
633 bool "Abort compilation on any warning"
Rob Landleyc503df52006-05-09 22:08:56 +0000634 default n
Rob Landleyc503df52006-05-09 22:08:56 +0000635 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200636 This adds -Werror to gcc command line.
Denis Vlasenkoe0eebc12007-01-27 13:44:53 +0000637
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200638 Most people should answer N.
Denis Vlasenkoe0eebc12007-01-27 13:44:53 +0000639
Eric Andersenf086ed82004-05-25 11:30:22 +0000640choice
641 prompt "Additional debugging library"
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000642 default NO_DEBUG_LIB
Eric Andersenc9f20d92002-12-05 08:41:41 +0000643 help
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200644 Using an additional debugging library will make BusyBox become
645 considerable larger and will cause it to run more slowly. You
646 should always leave this option disabled for production use.
Eric Andersenf086ed82004-05-25 11:30:22 +0000647
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200648 dmalloc support:
649 ----------------
650 This enables compiling with dmalloc ( http://dmalloc.com/ )
651 which is an excellent public domain mem leak and malloc problem
652 detector. To enable dmalloc, before running busybox you will
653 want to properly set your environment, for example:
654 export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
655 The 'debug=' value is generated using the following command
656 dmalloc -p log-stats -p log-non-free -p log-bad-space \
657 -p log-elapsed-time -p check-fence -p check-heap \
658 -p check-lists -p check-blank -p check-funcs -p realloc-copy \
659 -p allow-free-null
Eric Andersenc9f20d92002-12-05 08:41:41 +0000660
Denys Vlasenko72089cf2017-07-21 09:50:55 +0200661 Electric-fence support:
662 -----------------------
663 This enables compiling with Electric-fence support. Electric
664 fence is another very useful malloc debugging library which uses
665 your computer's virtual memory hardware to detect illegal memory
666 accesses. This support will make BusyBox be considerable larger
667 and run slower, so you should leave this option disabled unless
668 you are hunting a hard to find memory problem.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000669
Eric Andersenf086ed82004-05-25 11:30:22 +0000670
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000671config NO_DEBUG_LIB
Eric Andersenf086ed82004-05-25 11:30:22 +0000672 bool "None"
673
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000674config DMALLOC
Eric Andersenf086ed82004-05-25 11:30:22 +0000675 bool "Dmalloc"
676
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000677config EFENCE
Eric Andersenf086ed82004-05-25 11:30:22 +0000678 bool "Electric-fence"
679
680endchoice
681
Mike Frysinger72d59db2006-03-10 23:17:17 +0000682source libbb/Config.in
683
Denys Vlasenkoa3df2fa2017-07-15 20:49:32 +0200684endmenu
685
Mike Frysinger72d59db2006-03-10 23:17:17 +0000686comment "Applets"
687
688source archival/Config.in
689source coreutils/Config.in
690source console-tools/Config.in
691source debianutils/Config.in
692source editors/Config.in
693source findutils/Config.in
694source init/Config.in
695source loginutils/Config.in
696source e2fsprogs/Config.in
697source modutils/Config.in
698source util-linux/Config.in
699source miscutils/Config.in
700source networking/Config.in
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000701source printutils/Config.in
Denis Vlasenkob9d572a2008-11-06 23:41:38 +0000702source mailutils/Config.in
Mike Frysinger72d59db2006-03-10 23:17:17 +0000703source procps/Config.in
Denis Vlasenkofe544582006-10-03 15:57:40 +0000704source runit/Config.in
Denis Vlasenkod46d3c22007-02-06 19:28:50 +0000705source selinux/Config.in
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000706source shell/Config.in
707source sysklogd/Config.in