9da4e8cb5a9c21ccf44667e040b9bc6d4ab35436
[oweals/busybox.git] / Config.in
1 #
2 # For a description of the syntax of this configuration file,
3 # see scripts/kbuild/config-language.txt.
4 #
5
6 mainmenu "BusyBox Configuration"
7
8 config HAVE_DOT_CONFIG
9         bool
10         default y
11
12 menu "Busybox Settings"
13
14 menu "General Configuration"
15
16 config CONFIG_NITPICK
17         bool "See lots more (probably unnecessary) configuration options."
18         default n
19         help
20           Some BusyBox applets have more configuration options than anyone
21           will ever care about.  To avoid drowining people in complexity, most
22           of the applet features that can be set to a sane default value are
23           hidden, unless you hit the above switch.
24
25           This is better than to telling people to edit the busybox source
26           code, but not by much.
27
28           See http://en.wikipedia.org/wiki/Fibber_McGee_and_Molly#The_Closet
29
30           You have been warned.
31
32 choice
33         prompt "Buffer allocation policy"
34         default CONFIG_FEATURE_BUFFERS_USE_MALLOC
35         help
36           There are 3 ways BusyBox can handle buffer allocations:
37           - Use malloc. This costs code size for the call to xmalloc.
38           - Put them on stack. For some very small machines with limited stack
39             space, this can be deadly.  For most folks, this works just fine.
40           - Put them in BSS. This works beautifully for computers with a real
41             MMU (and OS support), but wastes runtime RAM for uCLinux. This
42             behavior was the only one available for BusyBox versions 0.48 and
43             earlier.
44
45 config CONFIG_FEATURE_BUFFERS_USE_MALLOC
46         bool "Allocate with Malloc"
47
48 config CONFIG_FEATURE_BUFFERS_GO_ON_STACK
49         bool "Allocate on the Stack"
50
51 config CONFIG_FEATURE_BUFFERS_GO_IN_BSS
52         bool "Allocate in the .bss section"
53
54 endchoice
55
56 config CONFIG_SHOW_USAGE
57         bool "Show terse applet usage messages"
58         default y
59         help
60           All BusyBox applets will show help messages when invoked with
61           wrong arguments. You can turn off printing these terse usage
62           messages if you say no here.
63           This will save you up to 7k.
64
65 config CONFIG_FEATURE_VERBOSE_USAGE
66         bool "Show verbose applet usage messages"
67         default n
68         select CONFIG_SHOW_USAGE
69         help
70           All BusyBox applets will show more verbose help messages when
71           busybox is invoked with --help.  This will add a lot of text to the
72           busybox binary.  In the default configuration, this will add about
73           13k, but it can add much more depending on your configuration.
74
75 config CONFIG_FEATURE_COMPRESS_USAGE
76         bool "Store applet usage messages in compressed form"
77         default y
78         depends on CONFIG_SHOW_USAGE
79         help
80           Store usage messages in compressed form, uncompress them on-the-fly
81           when <applet> --help is called.
82
83 config CONFIG_FEATURE_INSTALLER
84         bool "Support --install [-s] to install applet links at runtime"
85         default n
86         help
87           Enable 'busybox --install [-s]' support.  This will allow you to use
88           busybox at runtime to create hard links or symlinks for all the
89           applets that are compiled into busybox.  This feature requires the
90           /proc filesystem.
91
92 config CONFIG_LOCALE_SUPPORT
93         bool "Enable locale support (system needs locale for this to work)"
94         default n
95         help
96           Enable this if your system has locale support and you would like
97           busybox to support locale settings.
98
99 config CONFIG_GETOPT_LONG
100         bool "Enable support for --long-options"
101         default n
102         depends on !CONFIG_NO_GETOPT_LONG
103         help
104           Enable this if you want busybox applets to use the gnu --long-option
105           style, in addition to single character -a -b -c style options.
106
107 config CONFIG_FEATURE_DEVFS
108         bool "Use devfs names for devices"
109         default n
110         help
111           This tells busybox to look for names like /dev/loop/0 instead of
112           /dev/loop0.  If your /dev directory has normal names instead of
113           devfs names, you don't want this.
114
115           This is obsolete and will be going away someday.  Consider it
116           deprecated.
117
118 config CONFIG_FEATURE_DEVPTS
119         bool "Use the devpts filesystem for Unix98 PTYs"
120         default y if CONFIG_FEATURE_DEVFS
121         help
122           Enable if you want BusyBox to use Unix98 PTY support. If enabled,
123           busybox will use /dev/ptmx for the master side of the pseudoterminal
124           and /dev/pts/<number> for the slave side.  Otherwise, BSD style
125           /dev/ttyp<number> will be used. To use this option, you should have
126           devpts mounted.
127
128 config CONFIG_FEATURE_CLEAN_UP
129         bool "Clean up all memory before exiting (usually not needed)"
130         default n
131         help
132           As a size optimization, busybox normally exits without explicitly
133           freeing dynamically allocated memory or closing files.  This saves
134           space since the OS will clean up for us, but it can confuse debuggers
135           like valgrind, which report tons of memory and resource leaks.
136
137           Don't enable this unless you have a really good reason to clean
138           things up manually.
139
140 config CONFIG_FEATURE_SUID
141         bool "Support for SUID/SGID handling"
142         default n
143         help
144           With this option you can install the busybox binary belonging
145           to root with the suid bit set, and it'll and it'll automatically drop
146           priviledges for applets that don't need root access.
147
148           If you're really paranoid and don't want to do this, build two
149           busybox binaries with different applets in them (and the appropriate
150           symlinks pointing to each binary), and only set the suid bit on the
151           one that needs it.  The applets currently marked to need the suid bit
152           are login, passwd, su, ping, traceroute, crontab, dnsd, ipcrm, ipcs,
153           and vlock.
154
155 config CONFIG_FEATURE_SUID_CONFIG
156         bool "Runtime SUID/SGID configuration via /etc/busybox.conf"
157         default n if CONFIG_FEATURE_SUID
158         depends on CONFIG_FEATURE_SUID
159         help
160           Allow the SUID / SGID state of an applet to be determined at runtime
161           by checking /etc/busybox.conf.  (This is sort of a poor man's sudo.)
162           The format of this file is as follows:
163
164           <applet> = [Ssx-][Ssx-][x-] (<username>|<uid>).(<groupname>|<gid>)
165
166           An example might help:
167
168           [SUID]
169           su = ssx root.0 # applet su can be run by anyone and runs with euid=0/egid=0
170           su = ssx        # exactly the same
171
172           mount = sx- root.disk # applet mount can be run by root and members of group disk
173                                 # and runs with euid=0
174
175           cp = --- # disable applet cp for everyone
176
177           The file has to be owned by user root, group root and has to be
178           writeable only by root:
179                 (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
180           The busybox executable has to be owned by user root, group
181           root and has to be setuid root for this to work:
182                 (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
183
184           Robert 'sandman' Griebl has more information here:
185           <url: http://www.softforge.de/bb/suid.html >.
186
187 config CONFIG_FEATURE_SUID_CONFIG_QUIET
188         bool "Suppress warning message if /etc/busybox.conf is not readable"
189         default y
190         depends on CONFIG_FEATURE_SUID_CONFIG
191         help
192           /etc/busybox.conf should be readable by the user needing the SUID, check
193           this option to avoid users to be notified about missing permissions.
194
195 config CONFIG_SELINUX
196         bool "Support NSA Security Enhanced Linux"
197         default n
198         help
199           Enable support for SELinux in applets ls, ps, and id.  Also provide
200           the option of compiling in SELinux applets.
201
202           If you do not have a complete SELinux userland installed, this stuff
203           will not compile. Go visit
204                 http://www.nsa.gov/selinux/index.html
205           to download the necessary stuff to allow busybox to compile with
206           this option enabled. Specifially, libselinux 1.28 or better is
207           directly required by busybox. If the installation is located in a
208           non-standard directory, provide it by invoking make as follows:
209                 CFLAGS=-I<libselinux-include-path> \
210                 LDFLAGS=-L<libselinux-lib-path> \
211                 make
212
213           Most people will leave this set to 'N'.
214
215 endmenu
216
217 menu 'Build Options'
218
219 config CONFIG_STATIC
220         bool "Build BusyBox as a static binary (no shared libs)"
221         default n
222         help
223           If you want to build a static BusyBox binary, which does not
224           use or require any shared libraries, then enable this option.
225           This can cause BusyBox to be considerably larger, so you should
226           leave this option false unless you have a good reason (i.e.
227           your target platform does not support shared libraries, or
228           you are building an initrd which doesn't need anything but
229           BusyBox, etc).
230
231           Most people will leave this set to 'N'.
232
233 config CONFIG_BUILD_LIBBUSYBOX
234         bool "Build shared libbusybox"
235         default y
236         help
237           Build a shared library libbusybox.so which contains all
238           libraries used inside busybox.
239
240 config CONFIG_FEATURE_FULL_LIBBUSYBOX
241         bool "Feature-complete libbusybox"
242         default n if !CONFIG_FEATURE_SHARED_BUSYBOX
243         depends on CONFIG_BUILD_LIBBUSYBOX
244         help
245           Build a libbusybox with the complete feature-set, disregarding
246           the actually selected config.
247
248           Normally, libbusybox will only contain the features which are
249           used by busybox itself. If you plan to write a separate
250           standalone application which uses libbusybox say 'Y'.
251
252           Note: libbusybox is GPL, not LGPL, and exports no stable API that
253           might act as a copyright barrier.  We can and will modify the
254           exported function set between releases (even minor version number
255           changes), and happily break out-of-tree features.
256
257           Say 'N' if in doubt.
258
259 config CONFIG_FEATURE_SHARED_BUSYBOX
260         bool "Use shared libbusybox for busybox"
261         default y if CONFIG_BUILD_LIBBUSYBOX
262         depends on !CONFIG_STATIC && CONFIG_BUILD_LIBBUSYBOX
263         help
264           Use libbusybox.so also for busybox itself.
265           You need to have a working dynamic linker to use this variant.
266
267 config CONFIG_LFS
268         bool "Build with Large File Support (for accessing files > 2 GB)"
269         default n
270         select FDISK_SUPPORT_LARGE_DISKS
271         help
272           If you want to build BusyBox with large file support, then enable
273           this option.  This will have no effect if your kernel or your C
274           library lacks large file support for large files.  Some of the
275           programs that can benefit from large file support include dd, gzip,
276           cp, mount, tar, and many others.  If you want to access files larger
277           than 2 Gigabytes, enable this option.  Otherwise, leave it set to 'N'.
278
279 config USING_CROSS_COMPILER
280         bool "Do you want to build BusyBox with a Cross Compiler?"
281         default n
282         help
283           Do you want to build BusyBox with a Cross Compiler?  If so,
284           then enable this option.  Otherwise leave it set to 'N'.
285
286 config CROSS_COMPILER_PREFIX
287         string "Cross Compiler prefix"
288         default "/usr/i386-linux-uclibc/bin/i386-uclibc-"
289         depends on USING_CROSS_COMPILER
290         help
291           If you want to build BusyBox with a cross compiler, then you
292           will need to set this to the cross-compiler prefix.  For example,
293           if my cross-compiler is /usr/i386-linux-uclibc/bin/i386-uclibc-gcc
294           then I would enter '/usr/i386-linux-uclibc/bin/i386-uclibc-' here,
295           which will ensure the correct compiler is used.
296
297 config EXTRA_CFLAGS_OPTIONS
298         string "Any extra CFLAGS options for the compiler?"
299         default ""
300         help
301           Do you want to pass any extra CFLAGS options to the compiler as
302           you build BusyBox? If so, this is the option for you...  For example,
303           if you want to add some simple compiler switches (like -march=i686),
304           or check for warnings using -Werror, just those options here.
305
306 config CONFIG_BUILD_AT_ONCE
307         bool "Compile all sources at once"
308         default n
309         help
310           Normally each source-file is compiled with one invocation of
311           the compiler.
312           If you set this option, all sources are compiled at once.
313           This gives the compiler more opportunities to optimize which can
314           result in smaller and/or faster binaries.
315
316           Setting this option will consume alot of memory, e.g. if you
317           enable all applets with all features, gcc uses more than 300MB
318           RAM during compilation of busybox.
319
320           This option is most likely only beneficial for newer compilers
321           such as gcc-4.1 and above.
322
323           Say 'N' unless you know what you are doing.
324
325 endmenu
326
327 menu 'Debugging Options'
328
329 config CONFIG_DEBUG
330         bool "Build BusyBox with extra Debugging symbols"
331         default n
332         help
333           Say Y here if you wish to examine BusyBox internals while applets are
334           running.  This increases the size of the binary considerably, and
335           should only be used when doing development.  If you are doing
336           development and want to debug BusyBox, answer Y.
337
338           Most people should answer N.
339
340 config CONFIG_DEBUG_PESSIMIZE
341         bool "Disable compiler optimizations."
342         default n
343         depends on CONFIG_DEBUG
344         help
345           The compiler's optimization of source code can eliminate and reorder
346           code, resulting in an executable that's hard to understand when
347           stepping through it with a debugger.  This switches it off, resulting
348           in a much bigger executable that more closely matches the source
349           code.
350
351 choice
352         prompt "Additional debugging library"
353         default CONFIG_NO_DEBUG_LIB
354         depends on CONFIG_DEBUG
355         help
356           Using an additional debugging library will make BusyBox become
357           considerable larger and will cause it to run more slowly.  You
358           should always leave this option disabled for production use.
359
360           dmalloc support:
361           ----------------
362           This enables compiling with dmalloc ( http://dmalloc.com/ )
363           which is an excellent public domain mem leak and malloc problem
364           detector.  To enable dmalloc, before running busybox you will
365           want to properly set your environment, for example:
366             export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
367           The 'debug=' value is generated using the following command
368             dmalloc -p log-stats -p log-non-free -p log-bad-space -p log-elapsed-time \
369                -p check-fence -p check-heap -p check-lists -p check-blank \
370                -p check-funcs -p realloc-copy -p allow-free-null
371
372           Electric-fence support:
373           -----------------------
374           This enables compiling with Electric-fence support.  Electric
375           fence is another very useful malloc debugging library which uses
376           your computer's virtual memory hardware to detect illegal memory
377           accesses.  This support will make BusyBox be considerable larger
378           and run slower, so you should leave this option disabled unless
379           you are hunting a hard to find memory problem.
380
381
382 config CONFIG_NO_DEBUG_LIB
383         bool "None"
384
385 config CONFIG_DMALLOC
386         bool "Dmalloc"
387
388 config CONFIG_EFENCE
389         bool "Electric-fence"
390
391 endchoice
392
393 config CONFIG_DEBUG_YANK_SUSv2
394         bool "Disable obsolete features removed before SUSv3?"
395         default y
396         help
397           This option will disable backwards compatibility with SuSv2,
398           specifically, old-style numeric options ('command -1 <file>')
399           will not be supported in head, tail, and fold.  (Note: should
400           yank from renice too.)
401
402 endmenu
403
404 menu 'Installation Options'
405
406 config CONFIG_INSTALL_NO_USR
407         bool "Don't use /usr"
408         default n
409         help
410           Disable use of /usr. Don't activate this option if you don't know
411           that you really want this behaviour.
412
413 choice
414        prompt "Applets links"
415        default CONFIG_INSTALL_APPLET_SYMLINKS
416        help
417          Choose how you install applets links.
418
419 config CONFIG_INSTALL_APPLET_SYMLINKS
420        bool "as soft-links"
421        help
422          Install applets as soft-links to the busybox binary. This needs some
423          free inodes on the filesystem, but might help with filesystem
424          generators that can't cope with hard-links.
425
426 config CONFIG_INSTALL_APPLET_HARDLINKS
427        bool "as hard-links"
428        help
429          Install applets as hard-links to the busybox binary. This might count
430          on a filesystem with few inodes.
431
432 config CONFIG_INSTALL_APPLET_DONT
433        bool
434        prompt "not installed"
435        depends on CONFIG_FEATURE_INSTALLER || CONFIG_FEATURE_SH_STANDALONE_SHELL
436        help
437          Do not install applets links. Usefull when using the -install feature
438          or a standalone shell for rescue pruposes.
439
440 endchoice
441
442 config PREFIX
443         string "BusyBox installation prefix"
444         default "./_install"
445         help
446           Define your directory to install BusyBox files/subdirs in.
447
448 endmenu
449
450 source libbb/Config.in
451
452 endmenu
453
454 comment "Applets"
455
456 source archival/Config.in
457 source coreutils/Config.in
458 source console-tools/Config.in
459 source debianutils/Config.in
460 source editors/Config.in
461 source findutils/Config.in
462 source init/Config.in
463 source loginutils/Config.in
464 source e2fsprogs/Config.in
465 source modutils/Config.in
466 source util-linux/Config.in
467 source miscutils/Config.in
468 source networking/Config.in
469 source procps/Config.in
470 source shell/Config.in
471 source sysklogd/Config.in