blob: db15871694acd850a330b94b2a98237a1192dc30 [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
Denys Vlasenkof5604222017-01-10 14:58:54 +010053#fixme: delete, create suboptions for applets which use this
54config FEATURE_AUTOWIDTH
55 bool "Calculate terminal & column widths"
56 default y
57 help
58 This option allows utilities such as 'ls', 'telnet' etc
59 to determine the width of the screen, which can allow them to
60 display additional text or avoid wrapping text onto the next line.
61 If you leave this disabled, your utilities will be especially
62 primitive and will be unable to determine the current screen width.
63
64#fixme: delete, create suboptions for applets which use this
65config FEATURE_USE_TERMIOS
66 bool "Use termios for one-stroke input"
67 default y
68 help
69 This option allows utilities such as 'top' to accept keyboard
70 commands. Without this option, they simply refresh display
71 after a fixed period.
72
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000073config SHOW_USAGE
Bernhard Reutner-Fischerb9f4cd82011-11-09 20:23:38 +010074 bool "Show applet usage messages"
Bernhard Reutner-Fischer81901a02006-03-31 18:43:55 +000075 default y
76 help
Bernhard Reutner-Fischerb9f4cd82011-11-09 20:23:38 +010077 Enabling this option, BusyBox applets will show terse help messages
78 when invoked with wrong arguments.
79 If you do not want to show any (helpful) usage message when
80 issuing wrong command syntax, you can say 'N' here,
81 saving approximately 7k.
Bernhard Reutner-Fischer81901a02006-03-31 18:43:55 +000082
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000083config FEATURE_VERBOSE_USAGE
Eric Andersenc9f20d92002-12-05 08:41:41 +000084 bool "Show verbose applet usage messages"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +020085 default y
Denys Vlasenko0e5ba082010-06-05 23:11:07 +020086 depends on SHOW_USAGE
Eric Andersenc9f20d92002-12-05 08:41:41 +000087 help
Bernhard Reutner-Fischerb9f4cd82011-11-09 20:23:38 +010088 All BusyBox applets will show verbose help messages when
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +000089 busybox is invoked with --help. This will add a lot of text to the
90 busybox binary. In the default configuration, this will add about
Eric Andersen53601822002-12-05 21:12:42 +000091 13k, but it can add much more depending on your configuration.
Eric Andersenc9f20d92002-12-05 08:41:41 +000092
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000093config FEATURE_COMPRESS_USAGE
Rob Landley7e21d5f2006-04-27 23:34:46 +000094 bool "Store applet usage messages in compressed form"
95 default y
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000096 depends on SHOW_USAGE
Rob Landley7e21d5f2006-04-27 23:34:46 +000097 help
Bernhard Reutner-Fischerb9f4cd82011-11-09 20:23:38 +010098 Store usage messages in .bz compressed form, uncompress them
99 on-the-fly when <applet> --help is called.
Rob Landley7e21d5f2006-04-27 23:34:46 +0000100
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000101 If you have a really tiny busybox with few applets enabled (and
102 bunzip2 isn't one of them), the overhead of the decompressor might
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000103 be noticeable. Also, if you run executables directly from ROM
104 and have very little memory, this might not be a win. Otherwise,
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000105 you probably want this.
106
Denys Vlasenko8e950682016-05-31 02:42:49 +0200107config BUSYBOX
108 bool "Include busybox applet"
109 default y
110 help
111 The busybox applet provides general help regarding busybox and
112 allows the included applets to be listed. It's also required
113 if applet links are to be installed at runtime.
114
115 If you can live without these features disabling this will save
116 some space.
117
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000118config FEATURE_INSTALLER
Eric Andersenc9f20d92002-12-05 08:41:41 +0000119 bool "Support --install [-s] to install applet links at runtime"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200120 default y
Denys Vlasenko8e950682016-05-31 02:42:49 +0200121 depends on BUSYBOX
Eric Andersenc9f20d92002-12-05 08:41:41 +0000122 help
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000123 Enable 'busybox --install [-s]' support. This will allow you to use
Eric Andersen53601822002-12-05 21:12:42 +0000124 busybox at runtime to create hard links or symlinks for all the
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000125 applets that are compiled into busybox.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000126
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200127config INSTALL_NO_USR
128 bool "Don't use /usr"
129 default n
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200130 help
Denys Vlasenkoc60e88a2010-12-05 23:11:15 +0100131 Disable use of /usr. busybox --install and "make install"
132 will install applets only to /bin and /sbin,
133 never to /usr/bin or /usr/sbin.
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200134
Bartosz Golaszewski265a74b2014-02-11 21:31:42 +0100135config PAM
Denys Vlasenkof5604222017-01-10 14:58:54 +0100136 bool "Support PAM (Pluggable Authentication Modules)"
Bartosz Golaszewski265a74b2014-02-11 21:31:42 +0100137 default n
138 help
139 Use PAM in some busybox applets (currently login and httpd) instead
140 of direct access to password database.
141
Denys Vlasenkof3b92d32009-06-19 12:10:38 +0200142config LONG_OPTS
Denys Vlasenkof5604222017-01-10 14:58:54 +0100143 bool "Support --long-options"
Bernhard Reutner-Fischer74704192006-06-16 14:03:23 +0000144 default y
Denis Vlasenkoc61852a2006-11-29 11:09:43 +0000145 help
146 Enable this if you want busybox applets to use the gnu --long-option
147 style, in addition to single character -a -b -c style options.
Bernhard Reutner-Fischer01d23ad2006-05-26 20:19:22 +0000148
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000149config FEATURE_DEVPTS
Eric Andersenc9f20d92002-12-05 08:41:41 +0000150 bool "Use the devpts filesystem for Unix98 PTYs"
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000151 default y
Eric Andersenc9f20d92002-12-05 08:41:41 +0000152 help
Eric Andersen53601822002-12-05 21:12:42 +0000153 Enable if you want BusyBox to use Unix98 PTY support. If enabled,
154 busybox will use /dev/ptmx for the master side of the pseudoterminal
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000155 and /dev/pts/<number> for the slave side. Otherwise, BSD style
Eric Andersen53601822002-12-05 21:12:42 +0000156 /dev/ttyp<number> will be used. To use this option, you should have
Rob Landleyd5b9b602006-05-31 23:23:42 +0000157 devpts mounted.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000158
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000159config FEATURE_CLEAN_UP
Eric Andersenc9f20d92002-12-05 08:41:41 +0000160 bool "Clean up all memory before exiting (usually not needed)"
161 default n
162 help
Rob Landley1ab4c3d2006-02-08 18:50:17 +0000163 As a size optimization, busybox normally exits without explicitly
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000164 freeing dynamically allocated memory or closing files. This saves
Rob Landley1ab4c3d2006-02-08 18:50:17 +0000165 space since the OS will clean up for us, but it can confuse debuggers
166 like valgrind, which report tons of memory and resource leaks.
167
168 Don't enable this unless you have a really good reason to clean
Eric Andersene5642112003-07-14 19:37:08 +0000169 things up manually.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000170
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200171config FEATURE_UTMP
172 bool "Support utmp file"
173 default y
174 help
175 The file /var/run/utmp is used to track who is currently logged in.
176 With this option on, certain applets (getty, login, telnetd etc)
177 will create and delete entries there.
178 "who" applet requires this option.
179
Denys Vlasenko8d0e0cd2011-01-25 23:21:46 +0100180config FEATURE_WTMP
181 bool "Support wtmp file"
182 default y
183 depends on FEATURE_UTMP
184 help
185 The file /var/run/wtmp is used to track when users have logged into
186 and logged out of the system.
187 With this option on, certain applets (getty, login, telnetd etc)
188 will append new entries there.
189 "last" applet requires this option.
190
Denis Vlasenko10457b92007-03-27 22:01:31 +0000191config FEATURE_PIDFILE
192 bool "Support writing pidfiles"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200193 default y
Denis Vlasenko10457b92007-03-27 22:01:31 +0000194 help
Denis Vlasenkobb23c062007-08-15 20:05:37 +0000195 This option makes some applets (e.g. crond, syslogd, inetd) write
Anthony G. Basile12677ac2012-12-10 14:49:39 -0500196 a pidfile at the configured PID_FILE_PATH. It has no effect
197 on applets which require pidfiles to run.
198
199config PID_FILE_PATH
200 string "Path to directory for pidfile"
201 default "/var/run"
202 depends on FEATURE_PIDFILE
203 help
204 This is the default path where pidfiles are created. Applets which
205 allow you to set the pidfile path on the command line will override
206 this value. The option has no effect on applets that require you to
207 specify a pidfile path.
Denis Vlasenko10457b92007-03-27 22:01:31 +0000208
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000209config FEATURE_SUID
Denys Vlasenkof5604222017-01-10 14:58:54 +0100210 bool "Support SUID/SGID handling"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200211 default y
Eric Andersenc9f20d92002-12-05 08:41:41 +0000212 help
Rob Landleyd5b9b602006-05-31 23:23:42 +0000213 With this option you can install the busybox binary belonging
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200214 to root with the suid bit set, enabling some applets to perform
215 root-level operations even when run by ordinary users
216 (for example, mounting of user mounts in fstab needs this).
217
Denys Vlasenko5ca853e2013-01-17 10:24:51 +0100218 Busybox will automatically drop privileges for applets
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200219 that don't need root access.
Rob Landleyd5b9b602006-05-31 23:23:42 +0000220
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000221 If you are really paranoid and don't want to do this, build two
Rob Landleyd5b9b602006-05-31 23:23:42 +0000222 busybox binaries with different applets in them (and the appropriate
223 symlinks pointing to each binary), and only set the suid bit on the
Denys Vlasenkod4d289a2010-10-12 04:18:05 +0200224 one that needs it.
225
Denys Vlasenko3b5acaa2011-01-18 13:52:48 +0100226 The applets which require root rights (need suid bit or
227 to be run by root) and will refuse to execute otherwise:
228 crontab, login, passwd, su, vlock, wall.
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000229
Denys Vlasenko3b5acaa2011-01-18 13:52:48 +0100230 The applets which will use root rights if they have them
231 (via suid bit, or because run by root), but would try to work
232 without root right nevertheless:
233 findfs, ping[6], traceroute[6], mount.
234
235 Note that if you DONT select this option, but DO make busybox
236 suid root, ALL applets will run under root, which is a huge
237 security hole (think "cp /some/file /etc/passwd").
Eric Andersenc9f20d92002-12-05 08:41:41 +0000238
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000239config FEATURE_SUID_CONFIG
Eric Andersenc9f20d92002-12-05 08:41:41 +0000240 bool "Runtime SUID/SGID configuration via /etc/busybox.conf"
Denys Vlasenkoe0238f82011-05-14 15:23:55 +0200241 default y
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000242 depends on FEATURE_SUID
Eric Andersenc9f20d92002-12-05 08:41:41 +0000243 help
Rob Landleyd5b9b602006-05-31 23:23:42 +0000244 Allow the SUID / SGID state of an applet to be determined at runtime
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000245 by checking /etc/busybox.conf. (This is sort of a poor man's sudo.)
Rob Landleyd5b9b602006-05-31 23:23:42 +0000246 The format of this file is as follows:
Eric Andersene5272072003-07-22 22:15:21 +0000247
Denys Vlasenkod83aff12011-05-16 13:53:19 +0200248 APPLET = [Ssx-][Ssx-][x-] [USER.GROUP]
Denys Vlasenko3770b6b2011-05-16 13:19:25 +0200249
Denys Vlasenkod83aff12011-05-16 13:53:19 +0200250 s: USER or GROUP is allowed to execute APPLET.
251 APPLET will run under USER or GROUP
252 (reagardless of who's running it).
253 S: USER or GROUP is NOT allowed to execute APPLET.
Denys Vlasenko3770b6b2011-05-16 13:19:25 +0200254 APPLET will run under USER or GROUP.
Denys Vlasenkod83aff12011-05-16 13:53:19 +0200255 This option is not very sensical.
256 x: USER/GROUP/others are allowed to execute APPLET.
Denys Vlasenko3770b6b2011-05-16 13:19:25 +0200257 No UID/GID change will be done when it is run.
Denys Vlasenkod83aff12011-05-16 13:53:19 +0200258 -: USER/GROUP/others are not allowed to execute APPLET.
Eric Andersen5043ea12005-06-23 19:15:40 +0000259
Eric Andersene5272072003-07-22 22:15:21 +0000260 An example might help:
261
262 [SUID]
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000263 su = ssx root.0 # applet su can be run by anyone and runs with
264 # euid=0/egid=0
Eric Andersene5272072003-07-22 22:15:21 +0000265 su = ssx # exactly the same
266
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000267 mount = sx- root.disk # applet mount can be run by root and members
Denys Vlasenkod83aff12011-05-16 13:53:19 +0200268 # of group disk (but not anyone else)
269 # and runs with euid=0 (egid is not changed)
Eric Andersene5272072003-07-22 22:15:21 +0000270
271 cp = --- # disable applet cp for everyone
272
Rob Landleyfdc4c202005-04-29 19:48:29 +0000273 The file has to be owned by user root, group root and has to be
274 writeable only by root:
Denis Vlasenko6cee58e2007-11-04 15:43:26 +0000275 (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
Rob Landleyfdc4c202005-04-29 19:48:29 +0000276 The busybox executable has to be owned by user root, group
277 root and has to be setuid root for this to work:
Denis Vlasenko6cee58e2007-11-04 15:43:26 +0000278 (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
Rob Landleyfdc4c202005-04-29 19:48:29 +0000279
Eric Andersene5272072003-07-22 22:15:21 +0000280 Robert 'sandman' Griebl has more information here:
281 <url: http://www.softforge.de/bb/suid.html >.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000282
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000283config FEATURE_SUID_CONFIG_QUIET
Eric Andersenc9f20d92002-12-05 08:41:41 +0000284 bool "Suppress warning message if /etc/busybox.conf is not readable"
Rob Landleyd5b9b602006-05-31 23:23:42 +0000285 default y
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000286 depends on FEATURE_SUID_CONFIG
Eric Andersenc9f20d92002-12-05 08:41:41 +0000287 help
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000288 /etc/busybox.conf should be readable by the user needing the SUID,
289 check this option to avoid users to be notified about missing
290 permissions.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000291
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000292config SELINUX
Eric Andersen9e480452003-07-03 10:07:04 +0000293 bool "Support NSA Security Enhanced Linux"
294 default n
Denys Vlasenkoe3b1a1f2011-02-26 22:24:08 +0100295 select PLATFORM_LINUX
Eric Andersen9e480452003-07-03 10:07:04 +0000296 help
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000297 Enable support for SELinux in applets ls, ps, and id. Also provide
Rob Landley24b0a952006-03-29 15:35:23 +0000298 the option of compiling in SELinux applets.
Eric Andersen9e480452003-07-03 10:07:04 +0000299
Rob Landley24b0a952006-03-29 15:35:23 +0000300 If you do not have a complete SELinux userland installed, this stuff
Denys Vlasenko18b699c2014-02-25 17:31:22 +0100301 will not compile. Specifially, libselinux 1.28 or better is
Rob Landley24b0a952006-03-29 15:35:23 +0000302 directly required by busybox. If the installation is located in a
303 non-standard directory, provide it by invoking make as follows:
304 CFLAGS=-I<libselinux-include-path> \
305 LDFLAGS=-L<libselinux-lib-path> \
306 make
Eric Andersen31d898f2004-02-05 00:18:26 +0000307
308 Most people will leave this set to 'N'.
309
Denis Vlasenko80d14be2007-04-10 23:03:30 +0000310config FEATURE_PREFER_APPLETS
Denis Vlasenko2f0c0d02007-01-21 00:41:04 +0000311 bool "exec prefers applets"
312 default n
313 help
314 This is an experimental option which directs applets about to
315 call 'exec' to try and find an applicable busybox applet before
Denis Vlasenko92c0b822007-05-08 17:27:17 +0000316 searching the PATH. This is typically done by exec'ing
317 /proc/self/exe.
318 This may affect shell, find -exec, xargs and similar applets.
319 They will use applets even if /bin/<applet> -> busybox link
320 is missing (or is not a link to busybox). However, this causes
321 problems in chroot jails without mounted /proc and with ps/top
322 (command name can be shown as 'exe' for applets started this way).
Denis Vlasenko2f0c0d02007-01-21 00:41:04 +0000323
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000324config BUSYBOX_EXEC_PATH
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000325 string "Path to BusyBox executable"
326 default "/proc/self/exe"
327 help
328 When Busybox applets need to run other busybox applets, BusyBox
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000329 sometimes needs to exec() itself. When the /proc filesystem is
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000330 mounted, /proc/self/exe always points to the currently running
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000331 executable. If you haven't got /proc, set this to wherever you
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000332 want to run BusyBox from.
333
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000334# These are auto-selected by other options
335
336config FEATURE_SYSLOG
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
340 # This option is auto-selected when you select any applet which may
341 # send its output to syslog. You do not need to select it manually.
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000342
343config FEATURE_HAVE_RPC
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000344 bool #No description makes it a hidden option
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000345 default n
Denis Vlasenko35a064b2008-11-06 00:49:59 +0000346 #help
347 # This is automatically selected if any of enabled applets need it.
348 # You do not need to select it manually.
Denis Vlasenkoa7825f22007-06-16 13:56:51 +0000349
Kang-Che Sung4d06b312017-01-07 15:16:46 +0800350config PLATFORM_LINUX
351 bool #No description makes it a hidden option
352 default n
353 #help
354 # For the most part, busybox requires only POSIX compatibility
355 # from the target system, but some applets and features use
356 # Linux-specific interfaces.
357 #
358 # This is automatically selected if any applet or feature requires
359 # Linux-specific interfaces. You do not need to select it manually.
360
Denys Vlasenko33602262016-11-24 22:08:12 +0100361comment 'Build Options'
Eric Andersenc9f20d92002-12-05 08:41:41 +0000362
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000363config STATIC
Eric Andersenc9f20d92002-12-05 08:41:41 +0000364 bool "Build BusyBox as a static binary (no shared libs)"
365 default n
366 help
Eric Andersenc7bda1c2004-03-15 08:29:22 +0000367 If you want to build a static BusyBox binary, which does not
368 use or require any shared libraries, then enable this option.
Eric Andersen88c916b2003-10-22 09:58:56 +0000369 This can cause BusyBox to be considerably larger, so you should
Eric Andersene5272072003-07-22 22:15:21 +0000370 leave this option false unless you have a good reason (i.e.
371 your target platform does not support shared libraries, or
372 you are building an initrd which doesn't need anything but
373 BusyBox, etc).
Eric Andersenc9f20d92002-12-05 08:41:41 +0000374
Eric Andersene5272072003-07-22 22:15:21 +0000375 Most people will leave this set to 'N'.
376
Denis Vlasenko1da86d22008-06-04 11:28:24 +0000377config PIE
378 bool "Build BusyBox as a position independent executable"
379 default n
380 depends on !STATIC
381 help
Gilles Espinasse26b80e82011-02-13 22:54:37 +0100382 Hardened code option. PIE binaries are loaded at a different
383 address at each invocation. This has some overhead,
384 particularly on x86-32 which is short on registers.
385
Denis Vlasenko1da86d22008-06-04 11:28:24 +0000386 Most people will leave this set to 'N'.
387
Denis Vlasenkod2c450c2008-01-08 20:32:12 +0000388config NOMMU
389 bool "Force NOMMU build"
390 default n
391 help
392 Busybox tries to detect whether architecture it is being
393 built against supports MMU or not. If this detection fails,
394 or if you want to build NOMMU version of busybox for testing,
395 you may force NOMMU build here.
396
397 Most people will leave this set to 'N'.
398
Denis Vlasenkocc3f20b2008-06-23 22:31:52 +0000399# PIE can be made to work with BUILD_LIBBUSYBOX, but currently
400# build system does not support that
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000401config BUILD_LIBBUSYBOX
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000402 bool "Build shared libbusybox"
Rob Landleyc7ddefc2006-06-14 01:24:33 +0000403 default n
Denis Vlasenkofc5e8062008-07-09 21:24:18 +0000404 depends on !FEATURE_PREFER_APPLETS && !PIE && !STATIC
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000405 help
Denis Vlasenkod62fd842007-10-07 20:46:34 +0000406 Build a shared library libbusybox.so.N.N.N which contains all
407 busybox code.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000408
Denis Vlasenkod62fd842007-10-07 20:46:34 +0000409 This feature allows every applet to be built as a tiny
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000410 separate executable. Enabling it for "one big busybox binary"
Denis Vlasenkod62fd842007-10-07 20:46:34 +0000411 approach serves no purpose and increases code size.
412 You should almost certainly say "no" to this.
Rob Landleyd6e50832006-06-15 15:04:53 +0000413
Denis Vlasenkodef88982007-10-07 17:06:01 +0000414### config FEATURE_FULL_LIBBUSYBOX
415### bool "Feature-complete libbusybox"
416### default n if !FEATURE_SHARED_BUSYBOX
417### depends on BUILD_LIBBUSYBOX
418### help
419### Build a libbusybox with the complete feature-set, disregarding
420### the actually selected config.
421###
422### Normally, libbusybox will only contain the features which are
423### used by busybox itself. If you plan to write a separate
424### standalone application which uses libbusybox say 'Y'.
425###
426### Note: libbusybox is GPL, not LGPL, and exports no stable API that
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000427### might act as a copyright barrier. We can and will modify the
Denis Vlasenkodef88982007-10-07 17:06:01 +0000428### exported function set between releases (even minor version number
429### changes), and happily break out-of-tree features.
430###
431### Say 'N' if in doubt.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000432
Denis Vlasenkof545be02007-10-07 17:06:26 +0000433config FEATURE_INDIVIDUAL
434 bool "Produce a binary for each applet, linked against libbusybox"
435 default y
Denis Vlasenkofc5e8062008-07-09 21:24:18 +0000436 depends on BUILD_LIBBUSYBOX
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000437 help
Denis Vlasenkof545be02007-10-07 17:06:26 +0000438 If your CPU architecture doesn't allow for sharing text/rodata
439 sections of running binaries, but allows for runtime dynamic
440 libraries, this option will allow you to reduce memory footprint
441 when you have many different applets running at once.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000442
Denis Vlasenkof545be02007-10-07 17:06:26 +0000443 If your CPU architecture allows for sharing text/rodata,
444 having single binary is more optimal.
445
446 Each applet will be a tiny program, dynamically linked
447 against libbusybox.so.N.N.N.
448
449 You need to have a working dynamic linker.
450
451config FEATURE_SHARED_BUSYBOX
452 bool "Produce additional busybox binary linked against libbusybox"
453 default y
Denis Vlasenkofc5e8062008-07-09 21:24:18 +0000454 depends on BUILD_LIBBUSYBOX
Eric Andersenc9f20d92002-12-05 08:41:41 +0000455 help
Denis Vlasenkof545be02007-10-07 17:06:26 +0000456 Build busybox, dynamically linked against libbusybox.so.N.N.N.
457
458 You need to have a working dynamic linker.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000459
Denis Vlasenkodef88982007-10-07 17:06:01 +0000460### config BUILD_AT_ONCE
461### bool "Compile all sources at once"
462### default n
463### help
464### Normally each source-file is compiled with one invocation of
465### the compiler.
466### If you set this option, all sources are compiled at once.
467### This gives the compiler more opportunities to optimize which can
468### result in smaller and/or faster binaries.
469###
470### Setting this option will consume alot of memory, e.g. if you
471### enable all applets with all features, gcc uses more than 300MB
472### RAM during compilation of busybox.
473###
474### This option is most likely only beneficial for newer compilers
475### such as gcc-4.1 and above.
476###
477### Say 'N' unless you know what you are doing.
Bernhard Reutner-Fischer2aba3952006-01-24 16:14:14 +0000478
Denis Vlasenkof545be02007-10-07 17:06:26 +0000479config LFS
480 bool "Build with Large File Support (for accessing files > 2 GB)"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200481 default y
Denis Vlasenkof545be02007-10-07 17:06:26 +0000482 help
483 If you want to build BusyBox with large file support, then enable
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000484 this option. This will have no effect if your kernel or your C
485 library lacks large file support for large files. Some of the
Denis Vlasenkof545be02007-10-07 17:06:26 +0000486 programs that can benefit from large file support include dd, gzip,
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000487 cp, mount, tar, and many others. If you want to access files larger
488 than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'.
Denis Vlasenkof545be02007-10-07 17:06:26 +0000489
Denis Vlasenkob8e653b2008-06-02 04:51:29 +0000490config CROSS_COMPILER_PREFIX
491 string "Cross Compiler prefix"
492 default ""
493 help
494 If you want to build BusyBox with a cross compiler, then you
495 will need to set this to the cross-compiler prefix, for example,
Bernhard Reutner-Fischer7d0d3e22008-08-22 08:25:26 +0000496 "i386-uclibc-".
497
498 Note that CROSS_COMPILE environment variable or
499 "make CROSS_COMPILE=xxx ..." will override this selection.
500
501 Native builds leave this empty.
Denis Vlasenkob8e653b2008-06-02 04:51:29 +0000502
Rob Walkerbf634372012-03-07 12:25:53 +0100503config SYSROOT
504 string "Path to sysroot"
505 default ""
506 help
507 If you want to build BusyBox with a cross compiler, then you
508 might also need to specify where /usr/include and /usr/lib
509 will be found.
510
511 For example, BusyBox can be built against an installed
512 Android NDK, platform version 9, for ARM ABI with
513
514 CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
515
516 Native builds leave this empty.
517
Bernhard Reutner-Fischerf6107c72009-01-22 13:27:14 +0000518config EXTRA_CFLAGS
519 string "Additional CFLAGS"
520 default ""
521 help
522 Additional CFLAGS to pass to the compiler verbatim.
523
Rob Walkerbf634372012-03-07 12:25:53 +0100524config EXTRA_LDFLAGS
525 string "Additional LDFLAGS"
526 default ""
527 help
528 Additional LDFLAGS to pass to the linker verbatim.
529
530config EXTRA_LDLIBS
531 string "Additional LDLIBS"
532 default ""
533 help
534 Additional LDLIBS to pass to the linker with -l.
535
Denys Vlasenko33602262016-11-24 22:08:12 +0100536comment 'Installation Options ("make install" behavior)'
Eric Andersenc9f20d92002-12-05 08:41:41 +0000537
Denys Vlasenko33602262016-11-24 22:08:12 +0100538choice
539 prompt "What kind of applet links to install"
540 default INSTALL_APPLET_SYMLINKS
541 help
542 Choose what kind of links to applets are created by "make install".
543
544config INSTALL_APPLET_SYMLINKS
545 bool "as soft-links"
546 help
547 Install applets as soft-links to the busybox binary. This needs some
548 free inodes on the filesystem, but might help with filesystem
549 generators that can't cope with hard-links.
550
551config INSTALL_APPLET_HARDLINKS
552 bool "as hard-links"
553 help
554 Install applets as hard-links to the busybox binary. This might
555 count on a filesystem with few inodes.
556
557config INSTALL_APPLET_SCRIPT_WRAPPERS
558 bool "as script wrappers"
559 help
560 Install applets as script wrappers that call the busybox binary.
561
562config INSTALL_APPLET_DONT
563 bool "not installed"
564 help
565 Do not install applet links. Useful when you plan to use
566 busybox --install for installing links, or plan to use
567 a standalone shell and thus don't need applet links.
568
569endchoice
570
571choice
572 prompt "/bin/sh applet link"
573 default INSTALL_SH_APPLET_SYMLINK
574 depends on INSTALL_APPLET_SCRIPT_WRAPPERS
575 help
576 Choose how you install /bin/sh applet link.
577
578config INSTALL_SH_APPLET_SYMLINK
579 bool "as soft-link"
580 help
581 Install /bin/sh applet as soft-link to the busybox binary.
582
583config INSTALL_SH_APPLET_HARDLINK
584 bool "as hard-link"
585 help
586 Install /bin/sh applet as hard-link to the busybox binary.
587
588config INSTALL_SH_APPLET_SCRIPT_WRAPPER
589 bool "as script wrapper"
590 help
591 Install /bin/sh applet as script wrapper that calls
592 the busybox binary.
593
594endchoice
595
596config PREFIX
597 string "BusyBox installation prefix"
598 default "./_install"
599 help
600 Define your directory to install BusyBox files/subdirs in.
601
602comment 'Debugging Options'
Eric Andersenc9f20d92002-12-05 08:41:41 +0000603
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000604config DEBUG
Rob Landleyc503df52006-05-09 22:08:56 +0000605 bool "Build BusyBox with extra Debugging symbols"
Eric Andersenc9f20d92002-12-05 08:41:41 +0000606 default n
607 help
Rob Landleyc503df52006-05-09 22:08:56 +0000608 Say Y here if you wish to examine BusyBox internals while applets are
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000609 running. This increases the size of the binary considerably, and
610 should only be used when doing development. If you are doing
Rob Landleyc503df52006-05-09 22:08:56 +0000611 development and want to debug BusyBox, answer Y.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000612
Eric Andersenf086ed82004-05-25 11:30:22 +0000613 Most people should answer N.
Eric Andersenc9f20d92002-12-05 08:41:41 +0000614
Denis Vlasenkobd8390a2008-06-12 20:23:03 +0000615config DEBUG_PESSIMIZE
Denis Vlasenkoc185e292008-07-16 23:45:11 +0000616 bool "Disable compiler optimizations"
Denis Vlasenkobd8390a2008-06-12 20:23:03 +0000617 default n
618 depends on DEBUG
619 help
620 The compiler's optimization of source code can eliminate and reorder
621 code, resulting in an executable that's hard to understand when
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000622 stepping through it with a debugger. This switches it off, resulting
Denis Vlasenkobd8390a2008-06-12 20:23:03 +0000623 in a much bigger executable that more closely matches the source
624 code.
625
Mike Frysinger43e56632016-02-12 22:12:47 -0500626config DEBUG_SANITIZE
627 bool "Enable runtime sanitizers (ASAN/LSAN/USAN/etc...)"
628 default n
629 help
630 Say Y here if you want to enable runtime sanitizers. These help
631 catch bad memory accesses (e.g. buffer overflows), but will make
632 the executable larger and slow down runtime a bit.
633
Denys Vlasenkof5604222017-01-10 14:58:54 +0100634 This adds -fsanitize=foo options to gcc command line.
635
Mike Frysinger43e56632016-02-12 22:12:47 -0500636 If you aren't developing/testing busybox, say N here.
637
Bartosz Golaszewski3ed81cf2014-06-22 16:30:41 +0200638config UNIT_TEST
639 bool "Build unit tests"
640 default n
641 help
642 Say Y here if you want to build unit tests (both the framework and
643 test cases) as a Busybox applet. This results in bigger code, so you
644 probably don't want this option in production builds.
645
Denis Vlasenkoe0eebc12007-01-27 13:44:53 +0000646config WERROR
647 bool "Abort compilation on any warning"
Rob Landleyc503df52006-05-09 22:08:56 +0000648 default n
Rob Landleyc503df52006-05-09 22:08:56 +0000649 help
Denys Vlasenkof5604222017-01-10 14:58:54 +0100650 This adds -Werror to gcc command line.
Denis Vlasenkoe0eebc12007-01-27 13:44:53 +0000651
652 Most people should answer N.
653
Eric Andersenf086ed82004-05-25 11:30:22 +0000654choice
655 prompt "Additional debugging library"
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000656 default NO_DEBUG_LIB
Eric Andersenc9f20d92002-12-05 08:41:41 +0000657 help
Eric Andersenf086ed82004-05-25 11:30:22 +0000658 Using an additional debugging library will make BusyBox become
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000659 considerable larger and will cause it to run more slowly. You
Eric Andersenf086ed82004-05-25 11:30:22 +0000660 should always leave this option disabled for production use.
661
662 dmalloc support:
663 ----------------
Eric Andersenc9f20d92002-12-05 08:41:41 +0000664 This enables compiling with dmalloc ( http://dmalloc.com/ )
665 which is an excellent public domain mem leak and malloc problem
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000666 detector. To enable dmalloc, before running busybox you will
Eric Andersenc9f20d92002-12-05 08:41:41 +0000667 want to properly set your environment, for example:
668 export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
669 The 'debug=' value is generated using the following command
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000670 dmalloc -p log-stats -p log-non-free -p log-bad-space \
671 -p log-elapsed-time -p check-fence -p check-heap \
672 -p check-lists -p check-blank -p check-funcs -p realloc-copy \
673 -p allow-free-null
Eric Andersenc9f20d92002-12-05 08:41:41 +0000674
Eric Andersenf086ed82004-05-25 11:30:22 +0000675 Electric-fence support:
676 -----------------------
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000677 This enables compiling with Electric-fence support. Electric
Eric Andersen88c916b2003-10-22 09:58:56 +0000678 fence is another very useful malloc debugging library which uses
Eric Andersenc7bda1c2004-03-15 08:29:22 +0000679 your computer's virtual memory hardware to detect illegal memory
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000680 accesses. This support will make BusyBox be considerable larger
Eric Andersenc7bda1c2004-03-15 08:29:22 +0000681 and run slower, so you should leave this option disabled unless
Eric Andersenc9f20d92002-12-05 08:41:41 +0000682 you are hunting a hard to find memory problem.
683
Eric Andersenf086ed82004-05-25 11:30:22 +0000684
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000685config NO_DEBUG_LIB
Eric Andersenf086ed82004-05-25 11:30:22 +0000686 bool "None"
687
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000688config DMALLOC
Eric Andersenf086ed82004-05-25 11:30:22 +0000689 bool "Dmalloc"
690
Denis Vlasenko7d219aa2006-10-05 10:17:08 +0000691config EFENCE
Eric Andersenf086ed82004-05-25 11:30:22 +0000692 bool "Electric-fence"
693
694endchoice
695
Eric Andersenc9f20d92002-12-05 08:41:41 +0000696endmenu
Mike Frysinger72d59db2006-03-10 23:17:17 +0000697
Mike Frysinger72d59db2006-03-10 23:17:17 +0000698source libbb/Config.in
699
700comment "Applets"
701
702source archival/Config.in
703source coreutils/Config.in
704source console-tools/Config.in
705source debianutils/Config.in
706source editors/Config.in
707source findutils/Config.in
708source init/Config.in
709source loginutils/Config.in
710source e2fsprogs/Config.in
711source modutils/Config.in
712source util-linux/Config.in
713source miscutils/Config.in
714source networking/Config.in
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000715source printutils/Config.in
Denis Vlasenkob9d572a2008-11-06 23:41:38 +0000716source mailutils/Config.in
Mike Frysinger72d59db2006-03-10 23:17:17 +0000717source procps/Config.in
Denis Vlasenkofe544582006-10-03 15:57:40 +0000718source runit/Config.in
Denis Vlasenkod46d3c22007-02-06 19:28:50 +0000719source selinux/Config.in
Bernhard Reutner-Fischeraa2a1c02008-10-24 19:48:47 +0000720source shell/Config.in
721source sysklogd/Config.in