Big cleanup in config help and description
[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 config DESKTOP
15         bool "Enable options for full-blown desktop systems"
16         default y
17         help
18           Enable options and features which are not essential.
19           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
25           tools, you can unselect this option for smaller code size.
26
27 config 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
36 config 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
45 config 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
53 #fixme: delete, create suboptions for applets which use this
54 config 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
65 config 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
73 config SHOW_USAGE
74         bool "Show applet usage messages"
75         default y
76         help
77           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.
82
83 config FEATURE_VERBOSE_USAGE
84         bool "Show verbose applet usage messages"
85         default y
86         depends on SHOW_USAGE
87         help
88           All BusyBox applets will show verbose help messages when
89           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
91           13k, but it can add much more depending on your configuration.
92
93 config FEATURE_COMPRESS_USAGE
94         bool "Store applet usage messages in compressed form"
95         default y
96         depends on SHOW_USAGE
97         help
98           Store usage messages in .bz compressed form, uncompress them
99           on-the-fly when <applet> --help is called.
100
101           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
103           be noticeable. Also, if you run executables directly from ROM
104           and have very little memory, this might not be a win. Otherwise,
105           you probably want this.
106
107 config 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
118 config FEATURE_INSTALLER
119         bool "Support --install [-s] to install applet links at runtime"
120         default y
121         depends on BUSYBOX
122         help
123           Enable 'busybox --install [-s]' support. This will allow you to use
124           busybox at runtime to create hard links or symlinks for all the
125           applets that are compiled into busybox.
126
127 config INSTALL_NO_USR
128         bool "Don't use /usr"
129         default n
130         help
131           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.
134
135 config PAM
136         bool "Support PAM (Pluggable Authentication Modules)"
137         default n
138         help
139           Use PAM in some busybox applets (currently login and httpd) instead
140           of direct access to password database.
141
142 config LONG_OPTS
143         bool "Support --long-options"
144         default y
145         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.
148
149 config FEATURE_DEVPTS
150         bool "Use the devpts filesystem for Unix98 PTYs"
151         default y
152         help
153           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
155           and /dev/pts/<number> for the slave side. Otherwise, BSD style
156           /dev/ttyp<number> will be used. To use this option, you should have
157           devpts mounted.
158
159 config FEATURE_CLEAN_UP
160         bool "Clean up all memory before exiting (usually not needed)"
161         default n
162         help
163           As a size optimization, busybox normally exits without explicitly
164           freeing dynamically allocated memory or closing files. This saves
165           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
169           things up manually.
170
171 config 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
180 config 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
191 config FEATURE_PIDFILE
192         bool "Support writing pidfiles"
193         default y
194         help
195           This option makes some applets (e.g. crond, syslogd, inetd) write
196           a pidfile at the configured PID_FILE_PATH.  It has no effect
197           on applets which require pidfiles to run.
198
199 config 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.
208
209 config FEATURE_SUID
210         bool "Support SUID/SGID handling"
211         default y
212         help
213           With this option you can install the busybox binary belonging
214           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
218           Busybox will automatically drop privileges for applets
219           that don't need root access.
220
221           If you are really paranoid and don't want to do this, build two
222           busybox binaries with different applets in them (and the appropriate
223           symlinks pointing to each binary), and only set the suid bit on the
224           one that needs it.
225
226           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.
229
230           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").
238
239 config FEATURE_SUID_CONFIG
240         bool "Runtime SUID/SGID configuration via /etc/busybox.conf"
241         default y
242         depends on FEATURE_SUID
243         help
244           Allow the SUID / SGID state of an applet to be determined at runtime
245           by checking /etc/busybox.conf. (This is sort of a poor man's sudo.)
246           The format of this file is as follows:
247
248           APPLET = [Ssx-][Ssx-][x-] [USER.GROUP]
249
250           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.
254              APPLET will run under USER or GROUP.
255              This option is not very sensical.
256           x: USER/GROUP/others are allowed to execute APPLET.
257              No UID/GID change will be done when it is run.
258           -: USER/GROUP/others are not allowed to execute APPLET.
259
260           An example might help:
261
262           [SUID]
263           su = ssx root.0 # applet su can be run by anyone and runs with
264                           # euid=0/egid=0
265           su = ssx        # exactly the same
266
267           mount = sx- root.disk # applet mount can be run by root and members
268                                 # of group disk (but not anyone else)
269                                 # and runs with euid=0 (egid is not changed)
270
271           cp = --- # disable applet cp for everyone
272
273           The file has to be owned by user root, group root and has to be
274           writeable only by root:
275                 (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
276           The busybox executable has to be owned by user root, group
277           root and has to be setuid root for this to work:
278                 (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
279
280           Robert 'sandman' Griebl has more information here:
281           <url: http://www.softforge.de/bb/suid.html >.
282
283 config FEATURE_SUID_CONFIG_QUIET
284         bool "Suppress warning message if /etc/busybox.conf is not readable"
285         default y
286         depends on FEATURE_SUID_CONFIG
287         help
288           /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.
291
292 config SELINUX
293         bool "Support NSA Security Enhanced Linux"
294         default n
295         select PLATFORM_LINUX
296         help
297           Enable support for SELinux in applets ls, ps, and id. Also provide
298           the option of compiling in SELinux applets.
299
300           If you do not have a complete SELinux userland installed, this stuff
301           will not compile.  Specifially, libselinux 1.28 or better is
302           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
307
308           Most people will leave this set to 'N'.
309
310 config FEATURE_PREFER_APPLETS
311         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
316           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).
323
324 config BUSYBOX_EXEC_PATH
325         string "Path to BusyBox executable"
326         default "/proc/self/exe"
327         help
328           When Busybox applets need to run other busybox applets, BusyBox
329           sometimes needs to exec() itself. When the /proc filesystem is
330           mounted, /proc/self/exe always points to the currently running
331           executable. If you haven't got /proc, set this to wherever you
332           want to run BusyBox from.
333
334 # These are auto-selected by other options
335
336 config FEATURE_SYSLOG
337         bool #No description makes it a hidden option
338         default n
339         #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.
342
343 config FEATURE_HAVE_RPC
344         bool #No description makes it a hidden option
345         default n
346         #help
347         #  This is automatically selected if any of enabled applets need it.
348         #  You do not need to select it manually.
349
350 config 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
361 comment 'Build Options'
362
363 config STATIC
364         bool "Build BusyBox as a static binary (no shared libs)"
365         default n
366         help
367           If you want to build a static BusyBox binary, which does not
368           use or require any shared libraries, then enable this option.
369           This can cause BusyBox to be considerably larger, so you should
370           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).
374
375           Most people will leave this set to 'N'.
376
377 config PIE
378         bool "Build BusyBox as a position independent executable"
379         default n
380         depends on !STATIC
381         help
382           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
386           Most people will leave this set to 'N'.
387
388 config 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
399 # PIE can be made to work with BUILD_LIBBUSYBOX, but currently
400 # build system does not support that
401 config BUILD_LIBBUSYBOX
402         bool "Build shared libbusybox"
403         default n
404         depends on !FEATURE_PREFER_APPLETS && !PIE && !STATIC
405         help
406           Build a shared library libbusybox.so.N.N.N which contains all
407           busybox code.
408
409           This feature allows every applet to be built as a tiny
410           separate executable. Enabling it for "one big busybox binary"
411           approach serves no purpose and increases code size.
412           You should almost certainly say "no" to this.
413
414 ### 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
427 ###       might act as a copyright barrier. We can and will modify the
428 ###       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.
432
433 config FEATURE_INDIVIDUAL
434         bool "Produce a binary for each applet, linked against libbusybox"
435         default y
436         depends on BUILD_LIBBUSYBOX
437         help
438           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.
442
443           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
451 config FEATURE_SHARED_BUSYBOX
452         bool "Produce additional busybox binary linked against libbusybox"
453         default y
454         depends on BUILD_LIBBUSYBOX
455         help
456           Build busybox, dynamically linked against libbusybox.so.N.N.N.
457
458           You need to have a working dynamic linker.
459
460 ### 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.
478
479 config LFS
480         bool "Build with Large File Support (for accessing files > 2 GB)"
481         default y
482         help
483           If you want to build BusyBox with large file support, then enable
484           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
486           programs that can benefit from large file support include dd, gzip,
487           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'.
489
490 config 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,
496           "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.
502
503 config 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
518 config EXTRA_CFLAGS
519         string "Additional CFLAGS"
520         default ""
521         help
522           Additional CFLAGS to pass to the compiler verbatim.
523
524 config EXTRA_LDFLAGS
525         string "Additional LDFLAGS"
526         default ""
527         help
528           Additional LDFLAGS to pass to the linker verbatim.
529
530 config EXTRA_LDLIBS
531         string "Additional LDLIBS"
532         default ""
533         help
534           Additional LDLIBS to pass to the linker with -l.
535
536 comment 'Installation Options ("make install" behavior)'
537
538 choice
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
544 config 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
551 config 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
557 config INSTALL_APPLET_SCRIPT_WRAPPERS
558         bool "as script wrappers"
559         help
560           Install applets as script wrappers that call the busybox binary.
561
562 config 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
569 endchoice
570
571 choice
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
578 config INSTALL_SH_APPLET_SYMLINK
579         bool "as soft-link"
580         help
581           Install /bin/sh applet as soft-link to the busybox binary.
582
583 config INSTALL_SH_APPLET_HARDLINK
584         bool "as hard-link"
585         help
586           Install /bin/sh applet as hard-link to the busybox binary.
587
588 config 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
594 endchoice
595
596 config PREFIX
597         string "BusyBox installation prefix"
598         default "./_install"
599         help
600           Define your directory to install BusyBox files/subdirs in.
601
602 comment 'Debugging Options'
603
604 config DEBUG
605         bool "Build BusyBox with extra Debugging symbols"
606         default n
607         help
608           Say Y here if you wish to examine BusyBox internals while applets are
609           running. This increases the size of the binary considerably, and
610           should only be used when doing development. If you are doing
611           development and want to debug BusyBox, answer Y.
612
613           Most people should answer N.
614
615 config DEBUG_PESSIMIZE
616         bool "Disable compiler optimizations"
617         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
622           stepping through it with a debugger. This switches it off, resulting
623           in a much bigger executable that more closely matches the source
624           code.
625
626 config 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
634           This adds -fsanitize=foo options to gcc command line.
635
636           If you aren't developing/testing busybox, say N here.
637
638 config 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
646 config WERROR
647         bool "Abort compilation on any warning"
648         default n
649         help
650           This adds -Werror to gcc command line.
651
652           Most people should answer N.
653
654 choice
655         prompt "Additional debugging library"
656         default NO_DEBUG_LIB
657         help
658           Using an additional debugging library will make BusyBox become
659           considerable larger and will cause it to run more slowly. You
660           should always leave this option disabled for production use.
661
662           dmalloc support:
663           ----------------
664           This enables compiling with dmalloc ( http://dmalloc.com/ )
665           which is an excellent public domain mem leak and malloc problem
666           detector. To enable dmalloc, before running busybox you will
667           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
670             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
674
675           Electric-fence support:
676           -----------------------
677           This enables compiling with Electric-fence support. Electric
678           fence is another very useful malloc debugging library which uses
679           your computer's virtual memory hardware to detect illegal memory
680           accesses. This support will make BusyBox be considerable larger
681           and run slower, so you should leave this option disabled unless
682           you are hunting a hard to find memory problem.
683
684
685 config NO_DEBUG_LIB
686         bool "None"
687
688 config DMALLOC
689         bool "Dmalloc"
690
691 config EFENCE
692         bool "Electric-fence"
693
694 endchoice
695
696 endmenu
697
698 source libbb/Config.in
699
700 comment "Applets"
701
702 source archival/Config.in
703 source coreutils/Config.in
704 source console-tools/Config.in
705 source debianutils/Config.in
706 source editors/Config.in
707 source findutils/Config.in
708 source init/Config.in
709 source loginutils/Config.in
710 source e2fsprogs/Config.in
711 source modutils/Config.in
712 source util-linux/Config.in
713 source miscutils/Config.in
714 source networking/Config.in
715 source printutils/Config.in
716 source mailutils/Config.in
717 source procps/Config.in
718 source runit/Config.in
719 source selinux/Config.in
720 source shell/Config.in
721 source sysklogd/Config.in