blob: cfb3aa0ee255ec36158cebf8f0a0442476d8238e [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
Bernhard Reutner-Fischer68532b32006-11-17 12:47:50 +000015 bool "Enable options for full-blown desktop systems"
Denys Vlasenkoba085c62010-07-21 08:58:11 +020016 default y
Denis Vlasenko97a8dd32006-10-01 15:55:11 +000017 help
18 Enable options and features which are not essential.
Denys Vlasenko33602262016-11-24 22:08:12 +010019 Select this if you plan to use busybox on full-blown desktop machine
20 with common Linux distro, which needs higher level of command-line
21 compatibility.
22
23 If you are preparing your build to be used on an embedded box
24 where you have tighter control over the entire set of userspace
Denys Vlasenkof5604222017-01-10 14:58:54 +010025 tools, you can unselect this option for smaller code size.
Denis Vlasenko97a8dd32006-10-01 15:55:11 +000026
Denis Vlasenko3fd15e12008-08-09 16:15:14 +000027config EXTRA_COMPAT
28 bool "Provide compatible behavior for rare corner cases (bigger code)"
29 default n
30 help
31 This option makes grep, sed etc handle rare corner cases
32 (embedded NUL bytes and such). This makes code bigger and uses
33 some GNU extensions in libc. You probably only need this option
34 if you plan to run busybox on desktop.
35
Denys Vlasenkoa8df4c02009-10-19 18:56:26 +020036config INCLUDE_SUSv2
37 bool "Enable obsolete features removed before SUSv3"
38 default y
39 help
40 This option will enable backwards compatibility with SuSv2,
41 specifically, old-style numeric options ('command -1 <file>')
42 will be supported in head, tail, and fold. (Note: should
43 affect renice too.)
44
Denys Vlasenkoaa7da732009-09-13 14:57:24 +020045config USE_PORTABLE_CODE
46 bool "Avoid using GCC-specific code constructs"
47 default n
48 help
49 Use this option if you are trying to compile busybox with
50 compiler other than gcc.
51 If you do use gcc, this option may needlessly increase code size.
52
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000053config SHOW_USAGE
Bernhard Reutner-Fischerb9f4cd82011-11-09 20:23:38 +010054 bool "Show applet usage messages"
Bernhard Reutner-Fischer81901a02006-03-31 18:43:55 +000055 default y
56 help
Bernhard Reutner-Fischerb9f4cd82011-11-09 20:23:38 +010057 Enabling this option, BusyBox applets will show terse help messages
58 when invoked with wrong arguments.
59 If you do not want to show any (helpful) usage message when
60 issuing wrong command syntax, you can say 'N' here,
61 saving approximately 7k.
Bernhard Reutner-Fischer81901a02006-03-31 18:43:55 +000062
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000063config FEATURE_VERBOSE_USAGE
Eric Andersenc9f20d92002-12-05 08:41:41 +000064 bool "Show verbose applet usage messages"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +020065 default y
Denys Vlasenko0e5ba082010-06-05 23:11:07 +020066 depends on SHOW_USAGE
Eric Andersenc9f20d92002-12-05 08:41:41 +000067 help
Bernhard Reutner-Fischerb9f4cd82011-11-09 20:23:38 +010068 All BusyBox applets will show verbose help messages when
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +000069 busybox is invoked with --help. This will add a lot of text to the
70 busybox binary. In the default configuration, this will add about
Eric Andersen53601822002-12-05 21:12:42 +000071 13k, but it can add much more depending on your configuration.
Eric Andersenc9f20d92002-12-05 08:41:41 +000072
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000073config FEATURE_COMPRESS_USAGE
Rob Landley7e21d5f2006-04-27 23:34:46 +000074 bool "Store applet usage messages in compressed form"
75 default y
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000076 depends on SHOW_USAGE
Rob Landley7e21d5f2006-04-27 23:34:46 +000077 help
Bernhard Reutner-Fischerb9f4cd82011-11-09 20:23:38 +010078 Store usage messages in .bz compressed form, uncompress them
79 on-the-fly when <applet> --help is called.
Rob Landley7e21d5f2006-04-27 23:34:46 +000080
Rob Landleyc7ddefc2006-06-14 01:24:33 +000081 If you have a really tiny busybox with few applets enabled (and
82 bunzip2 isn't one of them), the overhead of the decompressor might
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +000083 be noticeable. Also, if you run executables directly from ROM
84 and have very little memory, this might not be a win. Otherwise,
Rob Landleyc7ddefc2006-06-14 01:24:33 +000085 you probably want this.
86
Denys Vlasenko8e950682016-05-31 02:42:49 +020087config BUSYBOX
88 bool "Include busybox applet"
89 default y
90 help
91 The busybox applet provides general help regarding busybox and
92 allows the included applets to be listed. It's also required
93 if applet links are to be installed at runtime.
94
95 If you can live without these features disabling this will save
96 some space.
97
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000098config FEATURE_INSTALLER
Eric Andersenc9f20d92002-12-05 08:41:41 +000099 bool "Support --install [-s] to install applet links at runtime"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200100 default y
Denys Vlasenko8e950682016-05-31 02:42:49 +0200101 depends on BUSYBOX
Eric Andersenc9f20d92002-12-05 08:41:41 +0000102 help
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000103 Enable 'busybox --install [-s]' support. This will allow you to use
Eric Andersen53601822002-12-05 21:12:42 +0000104 busybox at runtime to create hard links or symlinks for all the
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000105 applets that are compiled into busybox.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000106
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200107config INSTALL_NO_USR
108 bool "Don't use /usr"
109 default n
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200110 help
Denys Vlasenkoc60e88a2010-12-05 23:11:15 +0100111 Disable use of /usr. busybox --install and "make install"
112 will install applets only to /bin and /sbin,
113 never to /usr/bin or /usr/sbin.
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200114
Bartosz Golaszewski265a74b2014-02-11 21:31:42 +0100115config PAM
Denys Vlasenkof5604222017-01-10 14:58:54 +0100116 bool "Support PAM (Pluggable Authentication Modules)"
Bartosz Golaszewski265a74b2014-02-11 21:31:42 +0100117 default n
118 help
119 Use PAM in some busybox applets (currently login and httpd) instead
120 of direct access to password database.
121
Denys Vlasenkof3b92d32009-06-19 12:10:38 +0200122config LONG_OPTS
Denys Vlasenkof5604222017-01-10 14:58:54 +0100123 bool "Support --long-options"
Bernhard Reutner-Fischer74704192006-06-16 14:03:23 +0000124 default y
Denis Vlasenkoc61852a2006-11-29 11:09:43 +0000125 help
126 Enable this if you want busybox applets to use the gnu --long-option
127 style, in addition to single character -a -b -c style options.
Bernhard Reutner-Fischer01d23ad2006-05-26 20:19:22 +0000128
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000129config FEATURE_DEVPTS
Eric Andersenc9f20d92002-12-05 08:41:41 +0000130 bool "Use the devpts filesystem for Unix98 PTYs"
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000131 default y
Eric Andersenc9f20d92002-12-05 08:41:41 +0000132 help
Eric Andersen53601822002-12-05 21:12:42 +0000133 Enable if you want BusyBox to use Unix98 PTY support. If enabled,
134 busybox will use /dev/ptmx for the master side of the pseudoterminal
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000135 and /dev/pts/<number> for the slave side. Otherwise, BSD style
Eric Andersen53601822002-12-05 21:12:42 +0000136 /dev/ttyp<number> will be used. To use this option, you should have
Rob Landleyd5b9b602006-05-31 23:23:42 +0000137 devpts mounted.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000138
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000139config FEATURE_CLEAN_UP
Eric Andersenc9f20d92002-12-05 08:41:41 +0000140 bool "Clean up all memory before exiting (usually not needed)"
141 default n
142 help
Rob Landley1ab4c3d2006-02-08 18:50:17 +0000143 As a size optimization, busybox normally exits without explicitly
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000144 freeing dynamically allocated memory or closing files. This saves
Rob Landley1ab4c3d2006-02-08 18:50:17 +0000145 space since the OS will clean up for us, but it can confuse debuggers
146 like valgrind, which report tons of memory and resource leaks.
147
148 Don't enable this unless you have a really good reason to clean
Eric Andersene5642112003-07-14 19:37:08 +0000149 things up manually.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000150
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200151config FEATURE_UTMP
152 bool "Support utmp file"
153 default y
154 help
155 The file /var/run/utmp is used to track who is currently logged in.
156 With this option on, certain applets (getty, login, telnetd etc)
157 will create and delete entries there.
158 "who" applet requires this option.
159
Denys Vlasenko8d0e0cd2011-01-25 23:21:46 +0100160config FEATURE_WTMP
161 bool "Support wtmp file"
162 default y
163 depends on FEATURE_UTMP
164 help
165 The file /var/run/wtmp is used to track when users have logged into
166 and logged out of the system.
167 With this option on, certain applets (getty, login, telnetd etc)
168 will append new entries there.
169 "last" applet requires this option.
170
Denis Vlasenko10457b92007-03-27 22:01:31 +0000171config FEATURE_PIDFILE
172 bool "Support writing pidfiles"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200173 default y
Denis Vlasenko10457b92007-03-27 22:01:31 +0000174 help
Denis Vlasenkobb23c062007-08-15 20:05:37 +0000175 This option makes some applets (e.g. crond, syslogd, inetd) write
Anthony G. Basile12677ac2012-12-10 14:49:39 -0500176 a pidfile at the configured PID_FILE_PATH. It has no effect
177 on applets which require pidfiles to run.
178
179config PID_FILE_PATH
180 string "Path to directory for pidfile"
181 default "/var/run"
182 depends on FEATURE_PIDFILE
183 help
184 This is the default path where pidfiles are created. Applets which
185 allow you to set the pidfile path on the command line will override
186 this value. The option has no effect on applets that require you to
187 specify a pidfile path.
Denis Vlasenko10457b92007-03-27 22:01:31 +0000188
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000189config FEATURE_SUID
Denys Vlasenkof5604222017-01-10 14:58:54 +0100190 bool "Support SUID/SGID handling"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200191 default y
Eric Andersenc9f20d92002-12-05 08:41:41 +0000192 help
Rob Landleyd5b9b602006-05-31 23:23:42 +0000193 With this option you can install the busybox binary belonging
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200194 to root with the suid bit set, enabling some applets to perform
195 root-level operations even when run by ordinary users
196 (for example, mounting of user mounts in fstab needs this).
197
Denys Vlasenko5ca853e2013-01-17 10:24:51 +0100198 Busybox will automatically drop privileges for applets
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200199 that don't need root access.
Rob Landleyd5b9b602006-05-31 23:23:42 +0000200
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000201 If you are really paranoid and don't want to do this, build two
Rob Landleyd5b9b602006-05-31 23:23:42 +0000202 busybox binaries with different applets in them (and the appropriate
203 symlinks pointing to each binary), and only set the suid bit on the
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200204 one that needs it.
205
Denys Vlasenko3b5acaa2011-01-18 13:52:48 +0100206 The applets which require root rights (need suid bit or
207 to be run by root) and will refuse to execute otherwise:
208 crontab, login, passwd, su, vlock, wall.
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000209
Denys Vlasenko3b5acaa2011-01-18 13:52:48 +0100210 The applets which will use root rights if they have them
211 (via suid bit, or because run by root), but would try to work
212 without root right nevertheless:
213 findfs, ping[6], traceroute[6], mount.
214
215 Note that if you DONT select this option, but DO make busybox
216 suid root, ALL applets will run under root, which is a huge
217 security hole (think "cp /some/file /etc/passwd").
Eric Andersenc9f20d92002-12-05 08:41:41 +0000218
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000219config FEATURE_SUID_CONFIG
Eric Andersenc9f20d92002-12-05 08:41:41 +0000220 bool "Runtime SUID/SGID configuration via /etc/busybox.conf"
Denys Vlasenkoe0238f82011-05-14 15:23:55 +0200221 default y
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000222 depends on FEATURE_SUID
Eric Andersenc9f20d92002-12-05 08:41:41 +0000223 help
Rob Landleyd5b9b602006-05-31 23:23:42 +0000224 Allow the SUID / SGID state of an applet to be determined at runtime
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000225 by checking /etc/busybox.conf. (This is sort of a poor man's sudo.)
Rob Landleyd5b9b602006-05-31 23:23:42 +0000226 The format of this file is as follows:
Eric Andersene5272072003-07-22 22:15:21 +0000227
Denys Vlasenkod83aff12011-05-16 13:53:19 +0200228 APPLET = [Ssx-][Ssx-][x-] [USER.GROUP]
Denys Vlasenko3770b6b2011-05-16 13:19:25 +0200229
Denys Vlasenkod83aff12011-05-16 13:53:19 +0200230 s: USER or GROUP is allowed to execute APPLET.
231 APPLET will run under USER or GROUP
232 (reagardless of who's running it).
233 S: USER or GROUP is NOT allowed to execute APPLET.
Denys Vlasenko3770b6b2011-05-16 13:19:25 +0200234 APPLET will run under USER or GROUP.
Denys Vlasenkod83aff12011-05-16 13:53:19 +0200235 This option is not very sensical.
236 x: USER/GROUP/others are allowed to execute APPLET.
Denys Vlasenko3770b6b2011-05-16 13:19:25 +0200237 No UID/GID change will be done when it is run.
Denys Vlasenkod83aff12011-05-16 13:53:19 +0200238 -: USER/GROUP/others are not allowed to execute APPLET.
Eric Andersen5043ea12005-06-23 19:15:40 +0000239
Eric Andersene5272072003-07-22 22:15:21 +0000240 An example might help:
241
242 [SUID]
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000243 su = ssx root.0 # applet su can be run by anyone and runs with
244 # euid=0/egid=0
Eric Andersene5272072003-07-22 22:15:21 +0000245 su = ssx # exactly the same
246
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000247 mount = sx- root.disk # applet mount can be run by root and members
Denys Vlasenkod83aff12011-05-16 13:53:19 +0200248 # of group disk (but not anyone else)
249 # and runs with euid=0 (egid is not changed)
Eric Andersene5272072003-07-22 22:15:21 +0000250
251 cp = --- # disable applet cp for everyone
252
Rob Landleyfdc4c202005-04-29 19:48:29 +0000253 The file has to be owned by user root, group root and has to be
254 writeable only by root:
Denis Vlasenko6cee58e2007-11-04 15:43:26 +0000255 (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
Rob Landleyfdc4c202005-04-29 19:48:29 +0000256 The busybox executable has to be owned by user root, group
257 root and has to be setuid root for this to work:
Denis Vlasenko6cee58e2007-11-04 15:43:26 +0000258 (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
Rob Landleyfdc4c202005-04-29 19:48:29 +0000259
Eric Andersene5272072003-07-22 22:15:21 +0000260 Robert 'sandman' Griebl has more information here:
261 <url: http://www.softforge.de/bb/suid.html >.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000262
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000263config FEATURE_SUID_CONFIG_QUIET
Eric Andersenc9f20d92002-12-05 08:41:41 +0000264 bool "Suppress warning message if /etc/busybox.conf is not readable"
Rob Landleyd5b9b602006-05-31 23:23:42 +0000265 default y
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000266 depends on FEATURE_SUID_CONFIG
Eric Andersenc9f20d92002-12-05 08:41:41 +0000267 help
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000268 /etc/busybox.conf should be readable by the user needing the SUID,
269 check this option to avoid users to be notified about missing
270 permissions.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000271
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000272config SELINUX
Eric Andersen9e480452003-07-03 10:07:04 +0000273 bool "Support NSA Security Enhanced Linux"
274 default n
Denys Vlasenkoe3b1a1f2011-02-26 22:24:08 +0100275 select PLATFORM_LINUX
Eric Andersen9e480452003-07-03 10:07:04 +0000276 help
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000277 Enable support for SELinux in applets ls, ps, and id. Also provide
Rob Landley24b0a952006-03-29 15:35:23 +0000278 the option of compiling in SELinux applets.
Eric Andersen9e480452003-07-03 10:07:04 +0000279
Rob Landley24b0a952006-03-29 15:35:23 +0000280 If you do not have a complete SELinux userland installed, this stuff
Denys Vlasenko18b699c2014-02-25 17:31:22 +0100281 will not compile. Specifially, libselinux 1.28 or better is
Rob Landley24b0a952006-03-29 15:35:23 +0000282 directly required by busybox. If the installation is located in a
283 non-standard directory, provide it by invoking make as follows:
284 CFLAGS=-I<libselinux-include-path> \
285 LDFLAGS=-L<libselinux-lib-path> \
286 make
Eric Andersen31d898f2004-02-05 00:18:26 +0000287
288 Most people will leave this set to 'N'.
289
Denis Vlasenko80d14be2007-04-10 23:03:30 +0000290config FEATURE_PREFER_APPLETS
Denis Vlasenko2f0c0d02007-01-21 00:41:04 +0000291 bool "exec prefers applets"
292 default n
293 help
294 This is an experimental option which directs applets about to
295 call 'exec' to try and find an applicable busybox applet before
Denis Vlasenko92c0b822007-05-08 17:27:17 +0000296 searching the PATH. This is typically done by exec'ing
297 /proc/self/exe.
298 This may affect shell, find -exec, xargs and similar applets.
299 They will use applets even if /bin/<applet> -> busybox link
300 is missing (or is not a link to busybox). However, this causes
301 problems in chroot jails without mounted /proc and with ps/top
302 (command name can be shown as 'exe' for applets started this way).
Denis Vlasenko2f0c0d02007-01-21 00:41:04 +0000303
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000304config BUSYBOX_EXEC_PATH
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000305 string "Path to BusyBox executable"
306 default "/proc/self/exe"
307 help
308 When Busybox applets need to run other busybox applets, BusyBox
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000309 sometimes needs to exec() itself. When the /proc filesystem is
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000310 mounted, /proc/self/exe always points to the currently running
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000311 executable. If you haven't got /proc, set this to wherever you
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000312 want to run BusyBox from.
313
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000314# These are auto-selected by other options
315
316config FEATURE_SYSLOG
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000317 bool #No description makes it a hidden option
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000318 default n
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000319 #help
320 # This option is auto-selected when you select any applet which may
321 # send its output to syslog. You do not need to select it manually.
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000322
323config FEATURE_HAVE_RPC
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000324 bool #No description makes it a hidden option
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000325 default n
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000326 #help
327 # This is automatically selected if any of enabled applets need it.
328 # You do not need to select it manually.
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000329
Kang-Che Sung4d06b312017-01-07 15:16:46 +0800330config PLATFORM_LINUX
331 bool #No description makes it a hidden option
332 default n
333 #help
334 # For the most part, busybox requires only POSIX compatibility
335 # from the target system, but some applets and features use
336 # Linux-specific interfaces.
337 #
338 # This is automatically selected if any applet or feature requires
339 # Linux-specific interfaces. You do not need to select it manually.
340
Denys Vlasenko33602262016-11-24 22:08:12 +0100341comment 'Build Options'
Eric Andersenc9f20d92002-12-05 08:41:41 +0000342
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000343config STATIC
Eric Andersenc9f20d92002-12-05 08:41:41 +0000344 bool "Build BusyBox as a static binary (no shared libs)"
345 default n
346 help
Eric Andersenc7bda1c2004-03-15 08:29:22 +0000347 If you want to build a static BusyBox binary, which does not
348 use or require any shared libraries, then enable this option.
Eric Andersen88c916b2003-10-22 09:58:56 +0000349 This can cause BusyBox to be considerably larger, so you should
Eric Andersene5272072003-07-22 22:15:21 +0000350 leave this option false unless you have a good reason (i.e.
351 your target platform does not support shared libraries, or
352 you are building an initrd which doesn't need anything but
353 BusyBox, etc).
Eric Andersenc9f20d92002-12-05 08:41:41 +0000354
Eric Andersene5272072003-07-22 22:15:21 +0000355 Most people will leave this set to 'N'.
356
Denis Vlasenko1da86d22008-06-04 11:28:24 +0000357config PIE
358 bool "Build BusyBox as a position independent executable"
359 default n
360 depends on !STATIC
361 help
Gilles Espinasse26b80e82011-02-13 22:54:37 +0100362 Hardened code option. PIE binaries are loaded at a different
363 address at each invocation. This has some overhead,
364 particularly on x86-32 which is short on registers.
365
Denis Vlasenko1da86d22008-06-04 11:28:24 +0000366 Most people will leave this set to 'N'.
367
Denis Vlasenkod2c450c2008-01-08 20:32:12 +0000368config NOMMU
369 bool "Force NOMMU build"
370 default n
371 help
372 Busybox tries to detect whether architecture it is being
373 built against supports MMU or not. If this detection fails,
374 or if you want to build NOMMU version of busybox for testing,
375 you may force NOMMU build here.
376
377 Most people will leave this set to 'N'.
378
Denis Vlasenkocc3f20b2008-06-23 22:31:52 +0000379# PIE can be made to work with BUILD_LIBBUSYBOX, but currently
380# build system does not support that
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000381config BUILD_LIBBUSYBOX
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000382 bool "Build shared libbusybox"
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000383 default n
Denis Vlasenkofc5e8062008-07-09 21:24:18 +0000384 depends on !FEATURE_PREFER_APPLETS && !PIE && !STATIC
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000385 help
Denis Vlasenkod62fd842007-10-07 20:46:34 +0000386 Build a shared library libbusybox.so.N.N.N which contains all
387 busybox code.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000388
Denis Vlasenkod62fd842007-10-07 20:46:34 +0000389 This feature allows every applet to be built as a tiny
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000390 separate executable. Enabling it for "one big busybox binary"
Denis Vlasenkod62fd842007-10-07 20:46:34 +0000391 approach serves no purpose and increases code size.
392 You should almost certainly say "no" to this.
Rob Landleyd6e50832006-06-15 15:04:53 +0000393
Denis Vlasenkodef88982007-10-07 17:06:01 +0000394### config FEATURE_FULL_LIBBUSYBOX
395### bool "Feature-complete libbusybox"
396### default n if !FEATURE_SHARED_BUSYBOX
397### depends on BUILD_LIBBUSYBOX
398### help
399### Build a libbusybox with the complete feature-set, disregarding
400### the actually selected config.
401###
402### Normally, libbusybox will only contain the features which are
403### used by busybox itself. If you plan to write a separate
404### standalone application which uses libbusybox say 'Y'.
405###
406### Note: libbusybox is GPL, not LGPL, and exports no stable API that
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000407### might act as a copyright barrier. We can and will modify the
Denis Vlasenkodef88982007-10-07 17:06:01 +0000408### exported function set between releases (even minor version number
409### changes), and happily break out-of-tree features.
410###
411### Say 'N' if in doubt.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000412
Denis Vlasenkof545be02007-10-07 17:06:26 +0000413config FEATURE_INDIVIDUAL
414 bool "Produce a binary for each applet, linked against libbusybox"
415 default y
Denis Vlasenkofc5e8062008-07-09 21:24:18 +0000416 depends on BUILD_LIBBUSYBOX
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000417 help
Denis Vlasenkof545be02007-10-07 17:06:26 +0000418 If your CPU architecture doesn't allow for sharing text/rodata
419 sections of running binaries, but allows for runtime dynamic
420 libraries, this option will allow you to reduce memory footprint
421 when you have many different applets running at once.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000422
Denis Vlasenkof545be02007-10-07 17:06:26 +0000423 If your CPU architecture allows for sharing text/rodata,
424 having single binary is more optimal.
425
426 Each applet will be a tiny program, dynamically linked
427 against libbusybox.so.N.N.N.
428
429 You need to have a working dynamic linker.
430
431config FEATURE_SHARED_BUSYBOX
432 bool "Produce additional busybox binary linked against libbusybox"
433 default y
Denis Vlasenkofc5e8062008-07-09 21:24:18 +0000434 depends on BUILD_LIBBUSYBOX
Eric Andersenc9f20d92002-12-05 08:41:41 +0000435 help
Denis Vlasenkof545be02007-10-07 17:06:26 +0000436 Build busybox, dynamically linked against libbusybox.so.N.N.N.
437
438 You need to have a working dynamic linker.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000439
Denis Vlasenkodef88982007-10-07 17:06:01 +0000440### config BUILD_AT_ONCE
441### bool "Compile all sources at once"
442### default n
443### help
444### Normally each source-file is compiled with one invocation of
445### the compiler.
446### If you set this option, all sources are compiled at once.
447### This gives the compiler more opportunities to optimize which can
448### result in smaller and/or faster binaries.
449###
450### Setting this option will consume alot of memory, e.g. if you
451### enable all applets with all features, gcc uses more than 300MB
452### RAM during compilation of busybox.
453###
454### This option is most likely only beneficial for newer compilers
455### such as gcc-4.1 and above.
456###
457### Say 'N' unless you know what you are doing.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000458
Denis Vlasenkof545be02007-10-07 17:06:26 +0000459config LFS
460 bool "Build with Large File Support (for accessing files > 2 GB)"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200461 default y
Denis Vlasenkof545be02007-10-07 17:06:26 +0000462 help
463 If you want to build BusyBox with large file support, then enable
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000464 this option. This will have no effect if your kernel or your C
465 library lacks large file support for large files. Some of the
Denis Vlasenkof545be02007-10-07 17:06:26 +0000466 programs that can benefit from large file support include dd, gzip,
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000467 cp, mount, tar, and many others. If you want to access files larger
468 than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'.
Denis Vlasenkof545be02007-10-07 17:06:26 +0000469
Denis Vlasenkob8e653b2008-06-02 04:51:29 +0000470config CROSS_COMPILER_PREFIX
471 string "Cross Compiler prefix"
472 default ""
473 help
474 If you want to build BusyBox with a cross compiler, then you
475 will need to set this to the cross-compiler prefix, for example,
Bernhard Reutner-Fischer7d0d3e22008-08-22 08:25:26 +0000476 "i386-uclibc-".
477
478 Note that CROSS_COMPILE environment variable or
479 "make CROSS_COMPILE=xxx ..." will override this selection.
480
481 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
487 If you want to build BusyBox with a cross compiler, then you
488 might also need to specify where /usr/include and /usr/lib
489 will be found.
490
491 For example, BusyBox can be built against an installed
492 Android NDK, platform version 9, for ARM ABI with
493
494 CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
495
496 Native builds leave this empty.
497
Bernhard Reutner-Fischerf6107c72009-01-22 13:27:14 +0000498config EXTRA_CFLAGS
499 string "Additional CFLAGS"
500 default ""
501 help
502 Additional CFLAGS to pass to the compiler verbatim.
503
Rob Walkerbf634372012-03-07 12:25:53 +0100504config EXTRA_LDFLAGS
505 string "Additional LDFLAGS"
506 default ""
507 help
508 Additional LDFLAGS to pass to the linker verbatim.
509
510config EXTRA_LDLIBS
511 string "Additional LDLIBS"
512 default ""
513 help
514 Additional LDLIBS to pass to the linker with -l.
515
Denys Vlasenko33602262016-11-24 22:08:12 +0100516comment 'Installation Options ("make install" behavior)'
Eric Andersenc9f20d92002-12-05 08:41:41 +0000517
Denys Vlasenko33602262016-11-24 22:08:12 +0100518choice
519 prompt "What kind of applet links to install"
520 default INSTALL_APPLET_SYMLINKS
521 help
522 Choose what kind of links to applets are created by "make install".
523
524config INSTALL_APPLET_SYMLINKS
525 bool "as soft-links"
526 help
527 Install applets as soft-links to the busybox binary. This needs some
528 free inodes on the filesystem, but might help with filesystem
529 generators that can't cope with hard-links.
530
531config INSTALL_APPLET_HARDLINKS
532 bool "as hard-links"
533 help
534 Install applets as hard-links to the busybox binary. This might
535 count on a filesystem with few inodes.
536
537config INSTALL_APPLET_SCRIPT_WRAPPERS
538 bool "as script wrappers"
539 help
540 Install applets as script wrappers that call the busybox binary.
541
542config INSTALL_APPLET_DONT
543 bool "not installed"
544 help
545 Do not install applet links. Useful when you plan to use
546 busybox --install for installing links, or plan to use
547 a standalone shell and thus don't need applet links.
548
549endchoice
550
551choice
552 prompt "/bin/sh applet link"
553 default INSTALL_SH_APPLET_SYMLINK
554 depends on INSTALL_APPLET_SCRIPT_WRAPPERS
555 help
556 Choose how you install /bin/sh applet link.
557
558config INSTALL_SH_APPLET_SYMLINK
559 bool "as soft-link"
560 help
561 Install /bin/sh applet as soft-link to the busybox binary.
562
563config INSTALL_SH_APPLET_HARDLINK
564 bool "as hard-link"
565 help
566 Install /bin/sh applet as hard-link to the busybox binary.
567
568config INSTALL_SH_APPLET_SCRIPT_WRAPPER
569 bool "as script wrapper"
570 help
571 Install /bin/sh applet as script wrapper that calls
572 the busybox binary.
573
574endchoice
575
576config PREFIX
577 string "BusyBox installation prefix"
578 default "./_install"
579 help
580 Define your directory to install BusyBox files/subdirs in.
581
582comment 'Debugging Options'
Eric Andersenc9f20d92002-12-05 08:41:41 +0000583
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000584config DEBUG
Rob Landleyc503df52006-05-09 22:08:56 +0000585 bool "Build BusyBox with extra Debugging symbols"
Eric Andersenc9f20d92002-12-05 08:41:41 +0000586 default n
587 help
Rob Landleyc503df52006-05-09 22:08:56 +0000588 Say Y here if you wish to examine BusyBox internals while applets are
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000589 running. This increases the size of the binary considerably, and
590 should only be used when doing development. If you are doing
Rob Landleyc503df52006-05-09 22:08:56 +0000591 development and want to debug BusyBox, answer Y.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000592
Eric Andersenf086ed82004-05-25 11:30:22 +0000593 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
600 The compiler's optimization of source code can eliminate and reorder
601 code, resulting in an executable that's hard to understand when
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000602 stepping through it with a debugger. This switches it off, resulting
Denis Vlasenkobd8390a2008-06-12 20:23:03 +0000603 in a much bigger executable that more closely matches the source
604 code.
605
Mike Frysinger43e56632016-02-12 22:12:47 -0500606config DEBUG_SANITIZE
607 bool "Enable runtime sanitizers (ASAN/LSAN/USAN/etc...)"
608 default n
609 help
610 Say Y here if you want to enable runtime sanitizers. These help
611 catch bad memory accesses (e.g. buffer overflows), but will make
612 the executable larger and slow down runtime a bit.
613
Denys Vlasenkof5604222017-01-10 14:58:54 +0100614 This adds -fsanitize=foo options to gcc command line.
615
Mike Frysinger43e56632016-02-12 22:12:47 -0500616 If you aren't developing/testing busybox, say N here.
617
Bartosz Golaszewski3ed81cf2014-06-22 16:30:41 +0200618config UNIT_TEST
619 bool "Build unit tests"
620 default n
621 help
622 Say Y here if you want to build unit tests (both the framework and
623 test cases) as a Busybox applet. This results in bigger code, so you
624 probably don't want this option in production builds.
625
Denis Vlasenkoe0eebc12007-01-27 13:44:53 +0000626config WERROR
627 bool "Abort compilation on any warning"
Rob Landleyc503df52006-05-09 22:08:56 +0000628 default n
Rob Landleyc503df52006-05-09 22:08:56 +0000629 help
Denys Vlasenkof5604222017-01-10 14:58:54 +0100630 This adds -Werror to gcc command line.
Denis Vlasenkoe0eebc12007-01-27 13:44:53 +0000631
632 Most people should answer N.
633
Eric Andersenf086ed82004-05-25 11:30:22 +0000634choice
635 prompt "Additional debugging library"
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000636 default NO_DEBUG_LIB
Eric Andersenc9f20d92002-12-05 08:41:41 +0000637 help
Eric Andersenf086ed82004-05-25 11:30:22 +0000638 Using an additional debugging library will make BusyBox become
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000639 considerable larger and will cause it to run more slowly. You
Eric Andersenf086ed82004-05-25 11:30:22 +0000640 should always leave this option disabled for production use.
641
642 dmalloc support:
643 ----------------
Eric Andersenc9f20d92002-12-05 08:41:41 +0000644 This enables compiling with dmalloc ( http://dmalloc.com/ )
645 which is an excellent public domain mem leak and malloc problem
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000646 detector. To enable dmalloc, before running busybox you will
Eric Andersenc9f20d92002-12-05 08:41:41 +0000647 want to properly set your environment, for example:
648 export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
649 The 'debug=' value is generated using the following command
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000650 dmalloc -p log-stats -p log-non-free -p log-bad-space \
651 -p log-elapsed-time -p check-fence -p check-heap \
652 -p check-lists -p check-blank -p check-funcs -p realloc-copy \
653 -p allow-free-null
Eric Andersenc9f20d92002-12-05 08:41:41 +0000654
Eric Andersenf086ed82004-05-25 11:30:22 +0000655 Electric-fence support:
656 -----------------------
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000657 This enables compiling with Electric-fence support. Electric
Eric Andersen88c916b2003-10-22 09:58:56 +0000658 fence is another very useful malloc debugging library which uses
Eric Andersenc7bda1c2004-03-15 08:29:22 +0000659 your computer's virtual memory hardware to detect illegal memory
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000660 accesses. This support will make BusyBox be considerable larger
Eric Andersenc7bda1c2004-03-15 08:29:22 +0000661 and run slower, so you should leave this option disabled unless
Eric Andersenc9f20d92002-12-05 08:41:41 +0000662 you are hunting a hard to find memory problem.
663
Eric Andersenf086ed82004-05-25 11:30:22 +0000664
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000665config NO_DEBUG_LIB
Eric Andersenf086ed82004-05-25 11:30:22 +0000666 bool "None"
667
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000668config DMALLOC
Eric Andersenf086ed82004-05-25 11:30:22 +0000669 bool "Dmalloc"
670
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000671config EFENCE
Eric Andersenf086ed82004-05-25 11:30:22 +0000672 bool "Electric-fence"
673
674endchoice
675
Eric Andersenc9f20d92002-12-05 08:41:41 +0000676endmenu
Mike Frysinger72d59db2006-03-10 23:17:17 +0000677
Mike Frysinger72d59db2006-03-10 23:17:17 +0000678source libbb/Config.in
679
680comment "Applets"
681
682source archival/Config.in
683source coreutils/Config.in
684source console-tools/Config.in
685source debianutils/Config.in
686source editors/Config.in
687source findutils/Config.in
688source init/Config.in
689source loginutils/Config.in
690source e2fsprogs/Config.in
691source modutils/Config.in
692source util-linux/Config.in
693source miscutils/Config.in
694source networking/Config.in
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000695source printutils/Config.in
Denis Vlasenkob9d572a2008-11-06 23:41:38 +0000696source mailutils/Config.in
Mike Frysinger72d59db2006-03-10 23:17:17 +0000697source procps/Config.in
Denis Vlasenkofe544582006-10-03 15:57:40 +0000698source runit/Config.in
Denis Vlasenkod46d3c22007-02-06 19:28:50 +0000699source selinux/Config.in
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000700source shell/Config.in
701source sysklogd/Config.in