3d1759e21e7f347e59fd4d396d1b4b28628a0b11
[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 config PLATFORM_LINUX
54         bool "Enable Linux-specific applets and features"
55         default y
56         help
57           For the most part, busybox requires only POSIX compatibility
58           from the target system, but some applets and features use
59           Linux-specific interfaces.
60
61           Answering 'N' here will disable such applets and hide the
62           corresponding configuration options.
63
64 choice
65         prompt "Buffer allocation policy"
66         default FEATURE_BUFFERS_USE_MALLOC
67         help
68           There are 3 ways BusyBox can handle buffer allocations:
69           - Use malloc. This costs code size for the call to xmalloc.
70           - Put them on stack. For some very small machines with limited stack
71             space, this can be deadly. For most folks, this works just fine.
72           - Put them in BSS. This works beautifully for computers with a real
73             MMU (and OS support), but wastes runtime RAM for uCLinux. This
74             behavior was the only one available for BusyBox versions 0.48 and
75             earlier.
76
77 config FEATURE_BUFFERS_USE_MALLOC
78         bool "Allocate with Malloc"
79
80 config FEATURE_BUFFERS_GO_ON_STACK
81         bool "Allocate on the Stack"
82
83 config FEATURE_BUFFERS_GO_IN_BSS
84         bool "Allocate in the .bss section"
85
86 endchoice
87
88 config SHOW_USAGE
89         bool "Show applet usage messages"
90         default y
91         help
92           Enabling this option, BusyBox applets will show terse help messages
93           when invoked with wrong arguments.
94           If you do not want to show any (helpful) usage message when
95           issuing wrong command syntax, you can say 'N' here,
96           saving approximately 7k.
97
98 config FEATURE_VERBOSE_USAGE
99         bool "Show verbose applet usage messages"
100         default y
101         depends on SHOW_USAGE
102         help
103           All BusyBox applets will show verbose help messages when
104           busybox is invoked with --help. This will add a lot of text to the
105           busybox binary. In the default configuration, this will add about
106           13k, but it can add much more depending on your configuration.
107
108 config FEATURE_COMPRESS_USAGE
109         bool "Store applet usage messages in compressed form"
110         default y
111         depends on SHOW_USAGE
112         help
113           Store usage messages in .bz compressed form, uncompress them
114           on-the-fly when <applet> --help is called.
115
116           If you have a really tiny busybox with few applets enabled (and
117           bunzip2 isn't one of them), the overhead of the decompressor might
118           be noticeable. Also, if you run executables directly from ROM
119           and have very little memory, this might not be a win. Otherwise,
120           you probably want this.
121
122 config BUSYBOX
123         bool "Include busybox applet"
124         default y
125         help
126           The busybox applet provides general help regarding busybox and
127           allows the included applets to be listed.  It's also required
128           if applet links are to be installed at runtime.
129
130           If you can live without these features disabling this will save
131           some space.
132
133 config FEATURE_INSTALLER
134         bool "Support --install [-s] to install applet links at runtime"
135         default y
136         depends on BUSYBOX
137         help
138           Enable 'busybox --install [-s]' support. This will allow you to use
139           busybox at runtime to create hard links or symlinks for all the
140           applets that are compiled into busybox.
141
142 config INSTALL_NO_USR
143         bool "Don't use /usr"
144         default n
145         help
146           Disable use of /usr. busybox --install and "make install"
147           will install applets only to /bin and /sbin,
148           never to /usr/bin or /usr/sbin.
149
150 config PAM
151         bool "Support for PAM (Pluggable Authentication Modules)"
152         default n
153         help
154           Use PAM in some busybox applets (currently login and httpd) instead
155           of direct access to password database.
156
157 config LONG_OPTS
158         bool "Support for --long-options"
159         default y
160         help
161           Enable this if you want busybox applets to use the gnu --long-option
162           style, in addition to single character -a -b -c style options.
163
164 config FEATURE_DEVPTS
165         bool "Use the devpts filesystem for Unix98 PTYs"
166         default y
167         help
168           Enable if you want BusyBox to use Unix98 PTY support. If enabled,
169           busybox will use /dev/ptmx for the master side of the pseudoterminal
170           and /dev/pts/<number> for the slave side. Otherwise, BSD style
171           /dev/ttyp<number> will be used. To use this option, you should have
172           devpts mounted.
173
174 config FEATURE_CLEAN_UP
175         bool "Clean up all memory before exiting (usually not needed)"
176         default n
177         help
178           As a size optimization, busybox normally exits without explicitly
179           freeing dynamically allocated memory or closing files. This saves
180           space since the OS will clean up for us, but it can confuse debuggers
181           like valgrind, which report tons of memory and resource leaks.
182
183           Don't enable this unless you have a really good reason to clean
184           things up manually.
185
186 config FEATURE_UTMP
187         bool "Support utmp file"
188         default y
189         help
190           The file /var/run/utmp is used to track who is currently logged in.
191           With this option on, certain applets (getty, login, telnetd etc)
192           will create and delete entries there.
193           "who" applet requires this option.
194
195 config FEATURE_WTMP
196         bool "Support wtmp file"
197         default y
198         depends on FEATURE_UTMP
199         help
200           The file /var/run/wtmp is used to track when users have logged into
201           and logged out of the system.
202           With this option on, certain applets (getty, login, telnetd etc)
203           will append new entries there.
204           "last" applet requires this option.
205
206 config FEATURE_PIDFILE
207         bool "Support writing pidfiles"
208         default y
209         help
210           This option makes some applets (e.g. crond, syslogd, inetd) write
211           a pidfile at the configured PID_FILE_PATH.  It has no effect
212           on applets which require pidfiles to run.
213
214 config PID_FILE_PATH
215         string "Path to directory for pidfile"
216         default "/var/run"
217         depends on FEATURE_PIDFILE
218         help
219           This is the default path where pidfiles are created.  Applets which
220           allow you to set the pidfile path on the command line will override
221           this value.  The option has no effect on applets that require you to
222           specify a pidfile path.
223
224 config FEATURE_SUID
225         bool "Support for SUID/SGID handling"
226         default y
227         help
228           With this option you can install the busybox binary belonging
229           to root with the suid bit set, enabling some applets to perform
230           root-level operations even when run by ordinary users
231           (for example, mounting of user mounts in fstab needs this).
232
233           Busybox will automatically drop privileges for applets
234           that don't need root access.
235
236           If you are really paranoid and don't want to do this, build two
237           busybox binaries with different applets in them (and the appropriate
238           symlinks pointing to each binary), and only set the suid bit on the
239           one that needs it.
240
241           The applets which require root rights (need suid bit or
242           to be run by root) and will refuse to execute otherwise:
243           crontab, login, passwd, su, vlock, wall.
244
245           The applets which will use root rights if they have them
246           (via suid bit, or because run by root), but would try to work
247           without root right nevertheless:
248           findfs, ping[6], traceroute[6], mount.
249
250           Note that if you DONT select this option, but DO make busybox
251           suid root, ALL applets will run under root, which is a huge
252           security hole (think "cp /some/file /etc/passwd").
253
254 config FEATURE_SUID_CONFIG
255         bool "Runtime SUID/SGID configuration via /etc/busybox.conf"
256         default y
257         depends on FEATURE_SUID
258         help
259           Allow the SUID / SGID state of an applet to be determined at runtime
260           by checking /etc/busybox.conf. (This is sort of a poor man's sudo.)
261           The format of this file is as follows:
262
263           APPLET = [Ssx-][Ssx-][x-] [USER.GROUP]
264
265           s: USER or GROUP is allowed to execute APPLET.
266              APPLET will run under USER or GROUP
267              (reagardless of who's running it).
268           S: USER or GROUP is NOT allowed to execute APPLET.
269              APPLET will run under USER or GROUP.
270              This option is not very sensical.
271           x: USER/GROUP/others are allowed to execute APPLET.
272              No UID/GID change will be done when it is run.
273           -: USER/GROUP/others are not allowed to execute APPLET.
274
275           An example might help:
276
277           [SUID]
278           su = ssx root.0 # applet su can be run by anyone and runs with
279                           # euid=0/egid=0
280           su = ssx        # exactly the same
281
282           mount = sx- root.disk # applet mount can be run by root and members
283                                 # of group disk (but not anyone else)
284                                 # and runs with euid=0 (egid is not changed)
285
286           cp = --- # disable applet cp for everyone
287
288           The file has to be owned by user root, group root and has to be
289           writeable only by root:
290                 (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
291           The busybox executable has to be owned by user root, group
292           root and has to be setuid root for this to work:
293                 (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
294
295           Robert 'sandman' Griebl has more information here:
296           <url: http://www.softforge.de/bb/suid.html >.
297
298 config FEATURE_SUID_CONFIG_QUIET
299         bool "Suppress warning message if /etc/busybox.conf is not readable"
300         default y
301         depends on FEATURE_SUID_CONFIG
302         help
303           /etc/busybox.conf should be readable by the user needing the SUID,
304           check this option to avoid users to be notified about missing
305           permissions.
306
307 config SELINUX
308         bool "Support NSA Security Enhanced Linux"
309         default n
310         select PLATFORM_LINUX
311         help
312           Enable support for SELinux in applets ls, ps, and id. Also provide
313           the option of compiling in SELinux applets.
314
315           If you do not have a complete SELinux userland installed, this stuff
316           will not compile.  Specifially, libselinux 1.28 or better is
317           directly required by busybox. If the installation is located in a
318           non-standard directory, provide it by invoking make as follows:
319                 CFLAGS=-I<libselinux-include-path> \
320                 LDFLAGS=-L<libselinux-lib-path> \
321                 make
322
323           Most people will leave this set to 'N'.
324
325 config FEATURE_PREFER_APPLETS
326         bool "exec prefers applets"
327         default n
328         help
329           This is an experimental option which directs applets about to
330           call 'exec' to try and find an applicable busybox applet before
331           searching the PATH. This is typically done by exec'ing
332           /proc/self/exe.
333           This may affect shell, find -exec, xargs and similar applets.
334           They will use applets even if /bin/<applet> -> busybox link
335           is missing (or is not a link to busybox). However, this causes
336           problems in chroot jails without mounted /proc and with ps/top
337           (command name can be shown as 'exe' for applets started this way).
338
339 config BUSYBOX_EXEC_PATH
340         string "Path to BusyBox executable"
341         default "/proc/self/exe"
342         help
343           When Busybox applets need to run other busybox applets, BusyBox
344           sometimes needs to exec() itself. When the /proc filesystem is
345           mounted, /proc/self/exe always points to the currently running
346           executable. If you haven't got /proc, set this to wherever you
347           want to run BusyBox from.
348
349 # These are auto-selected by other options
350
351 config FEATURE_SYSLOG
352         bool #No description makes it a hidden option
353         default n
354         #help
355         #  This option is auto-selected when you select any applet which may
356         #  send its output to syslog. You do not need to select it manually.
357
358 config FEATURE_HAVE_RPC
359         bool #No description makes it a hidden option
360         default n
361         #help
362         #  This is automatically selected if any of enabled applets need it.
363         #  You do not need to select it manually.
364
365 comment 'Build Options'
366
367 config STATIC
368         bool "Build BusyBox as a static binary (no shared libs)"
369         default n
370         help
371           If you want to build a static BusyBox binary, which does not
372           use or require any shared libraries, then enable this option.
373           This can cause BusyBox to be considerably larger, so you should
374           leave this option false unless you have a good reason (i.e.
375           your target platform does not support shared libraries, or
376           you are building an initrd which doesn't need anything but
377           BusyBox, etc).
378
379           Most people will leave this set to 'N'.
380
381 config PIE
382         bool "Build BusyBox as a position independent executable"
383         default n
384         depends on !STATIC
385         help
386           Hardened code option. PIE binaries are loaded at a different
387           address at each invocation. This has some overhead,
388           particularly on x86-32 which is short on registers.
389
390           Most people will leave this set to 'N'.
391
392 config NOMMU
393         bool "Force NOMMU build"
394         default n
395         help
396           Busybox tries to detect whether architecture it is being
397           built against supports MMU or not. If this detection fails,
398           or if you want to build NOMMU version of busybox for testing,
399           you may force NOMMU build here.
400
401           Most people will leave this set to 'N'.
402
403 # PIE can be made to work with BUILD_LIBBUSYBOX, but currently
404 # build system does not support that
405 config BUILD_LIBBUSYBOX
406         bool "Build shared libbusybox"
407         default n
408         depends on !FEATURE_PREFER_APPLETS && !PIE && !STATIC
409         help
410           Build a shared library libbusybox.so.N.N.N which contains all
411           busybox code.
412
413           This feature allows every applet to be built as a tiny
414           separate executable. Enabling it for "one big busybox binary"
415           approach serves no purpose and increases code size.
416           You should almost certainly say "no" to this.
417
418 ### config FEATURE_FULL_LIBBUSYBOX
419 ###     bool "Feature-complete libbusybox"
420 ###     default n if !FEATURE_SHARED_BUSYBOX
421 ###     depends on BUILD_LIBBUSYBOX
422 ###     help
423 ###       Build a libbusybox with the complete feature-set, disregarding
424 ###       the actually selected config.
425 ###
426 ###       Normally, libbusybox will only contain the features which are
427 ###       used by busybox itself. If you plan to write a separate
428 ###       standalone application which uses libbusybox say 'Y'.
429 ###
430 ###       Note: libbusybox is GPL, not LGPL, and exports no stable API that
431 ###       might act as a copyright barrier. We can and will modify the
432 ###       exported function set between releases (even minor version number
433 ###       changes), and happily break out-of-tree features.
434 ###
435 ###       Say 'N' if in doubt.
436
437 config FEATURE_INDIVIDUAL
438         bool "Produce a binary for each applet, linked against libbusybox"
439         default y
440         depends on BUILD_LIBBUSYBOX
441         help
442           If your CPU architecture doesn't allow for sharing text/rodata
443           sections of running binaries, but allows for runtime dynamic
444           libraries, this option will allow you to reduce memory footprint
445           when you have many different applets running at once.
446
447           If your CPU architecture allows for sharing text/rodata,
448           having single binary is more optimal.
449
450           Each applet will be a tiny program, dynamically linked
451           against libbusybox.so.N.N.N.
452
453           You need to have a working dynamic linker.
454
455 config FEATURE_SHARED_BUSYBOX
456         bool "Produce additional busybox binary linked against libbusybox"
457         default y
458         depends on BUILD_LIBBUSYBOX
459         help
460           Build busybox, dynamically linked against libbusybox.so.N.N.N.
461
462           You need to have a working dynamic linker.
463
464 ### config BUILD_AT_ONCE
465 ###     bool "Compile all sources at once"
466 ###     default n
467 ###     help
468 ###       Normally each source-file is compiled with one invocation of
469 ###       the compiler.
470 ###       If you set this option, all sources are compiled at once.
471 ###       This gives the compiler more opportunities to optimize which can
472 ###       result in smaller and/or faster binaries.
473 ###
474 ###       Setting this option will consume alot of memory, e.g. if you
475 ###       enable all applets with all features, gcc uses more than 300MB
476 ###       RAM during compilation of busybox.
477 ###
478 ###       This option is most likely only beneficial for newer compilers
479 ###       such as gcc-4.1 and above.
480 ###
481 ###       Say 'N' unless you know what you are doing.
482
483 config LFS
484         bool "Build with Large File Support (for accessing files > 2 GB)"
485         default y
486         help
487           If you want to build BusyBox with large file support, then enable
488           this option. This will have no effect if your kernel or your C
489           library lacks large file support for large files. Some of the
490           programs that can benefit from large file support include dd, gzip,
491           cp, mount, tar, and many others. If you want to access files larger
492           than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'.
493
494 config CROSS_COMPILER_PREFIX
495         string "Cross Compiler prefix"
496         default ""
497         help
498           If you want to build BusyBox with a cross compiler, then you
499           will need to set this to the cross-compiler prefix, for example,
500           "i386-uclibc-".
501
502           Note that CROSS_COMPILE environment variable or
503           "make CROSS_COMPILE=xxx ..." will override this selection.
504
505           Native builds leave this empty.
506
507 config SYSROOT
508         string "Path to sysroot"
509         default ""
510         help
511           If you want to build BusyBox with a cross compiler, then you
512           might also need to specify where /usr/include and /usr/lib
513           will be found.
514
515           For example, BusyBox can be built against an installed
516           Android NDK, platform version 9, for ARM ABI with
517
518           CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
519
520           Native builds leave this empty.
521
522 config EXTRA_CFLAGS
523         string "Additional CFLAGS"
524         default ""
525         help
526           Additional CFLAGS to pass to the compiler verbatim.
527
528 config EXTRA_LDFLAGS
529         string "Additional LDFLAGS"
530         default ""
531         help
532           Additional LDFLAGS to pass to the linker verbatim.
533
534 config EXTRA_LDLIBS
535         string "Additional LDLIBS"
536         default ""
537         help
538           Additional LDLIBS to pass to the linker with -l.
539
540 comment 'Installation Options ("make install" behavior)'
541
542 choice
543         prompt "What kind of applet links to install"
544         default INSTALL_APPLET_SYMLINKS
545         help
546           Choose what kind of links to applets are created by "make install".
547
548 config INSTALL_APPLET_SYMLINKS
549         bool "as soft-links"
550         help
551           Install applets as soft-links to the busybox binary. This needs some
552           free inodes on the filesystem, but might help with filesystem
553           generators that can't cope with hard-links.
554
555 config INSTALL_APPLET_HARDLINKS
556         bool "as hard-links"
557         help
558           Install applets as hard-links to the busybox binary. This might
559           count on a filesystem with few inodes.
560
561 config INSTALL_APPLET_SCRIPT_WRAPPERS
562         bool "as script wrappers"
563         help
564           Install applets as script wrappers that call the busybox binary.
565
566 config INSTALL_APPLET_DONT
567         bool "not installed"
568         help
569           Do not install applet links. Useful when you plan to use
570           busybox --install for installing links, or plan to use
571           a standalone shell and thus don't need applet links.
572
573 endchoice
574
575 choice
576         prompt "/bin/sh applet link"
577         default INSTALL_SH_APPLET_SYMLINK
578         depends on INSTALL_APPLET_SCRIPT_WRAPPERS
579         help
580           Choose how you install /bin/sh applet link.
581
582 config INSTALL_SH_APPLET_SYMLINK
583         bool "as soft-link"
584         help
585           Install /bin/sh applet as soft-link to the busybox binary.
586
587 config INSTALL_SH_APPLET_HARDLINK
588         bool "as hard-link"
589         help
590           Install /bin/sh applet as hard-link to the busybox binary.
591
592 config INSTALL_SH_APPLET_SCRIPT_WRAPPER
593         bool "as script wrapper"
594         help
595           Install /bin/sh applet as script wrapper that calls
596           the busybox binary.
597
598 endchoice
599
600 config PREFIX
601         string "BusyBox installation prefix"
602         default "./_install"
603         help
604           Define your directory to install BusyBox files/subdirs in.
605
606 comment 'Debugging Options'
607
608 config DEBUG
609         bool "Build BusyBox with extra Debugging symbols"
610         default n
611         help
612           Say Y here if you wish to examine BusyBox internals while applets are
613           running. This increases the size of the binary considerably, and
614           should only be used when doing development. If you are doing
615           development and want to debug BusyBox, answer Y.
616
617           Most people should answer N.
618
619 config DEBUG_PESSIMIZE
620         bool "Disable compiler optimizations"
621         default n
622         depends on DEBUG
623         help
624           The compiler's optimization of source code can eliminate and reorder
625           code, resulting in an executable that's hard to understand when
626           stepping through it with a debugger. This switches it off, resulting
627           in a much bigger executable that more closely matches the source
628           code.
629
630 config DEBUG_SANITIZE
631         bool "Enable runtime sanitizers (ASAN/LSAN/USAN/etc...)"
632         default n
633         help
634           Say Y here if you want to enable runtime sanitizers. These help
635           catch bad memory accesses (e.g. buffer overflows), but will make
636           the executable larger and slow down runtime a bit.
637
638           If you aren't developing/testing busybox, say N here.
639
640 config UNIT_TEST
641         bool "Build unit tests"
642         default n
643         help
644           Say Y here if you want to build unit tests (both the framework and
645           test cases) as a Busybox applet. This results in bigger code, so you
646           probably don't want this option in production builds.
647
648 config WERROR
649         bool "Abort compilation on any warning"
650         default n
651         help
652           Selecting this will add -Werror to gcc command line.
653
654           Most people should answer N.
655
656 choice
657         prompt "Additional debugging library"
658         default NO_DEBUG_LIB
659         help
660           Using an additional debugging library will make BusyBox become
661           considerable larger and will cause it to run more slowly. You
662           should always leave this option disabled for production use.
663
664           dmalloc support:
665           ----------------
666           This enables compiling with dmalloc ( http://dmalloc.com/ )
667           which is an excellent public domain mem leak and malloc problem
668           detector. To enable dmalloc, before running busybox you will
669           want to properly set your environment, for example:
670             export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
671           The 'debug=' value is generated using the following command
672             dmalloc -p log-stats -p log-non-free -p log-bad-space \
673                -p log-elapsed-time -p check-fence -p check-heap \
674                -p check-lists -p check-blank -p check-funcs -p realloc-copy \
675                -p allow-free-null
676
677           Electric-fence support:
678           -----------------------
679           This enables compiling with Electric-fence support. Electric
680           fence is another very useful malloc debugging library which uses
681           your computer's virtual memory hardware to detect illegal memory
682           accesses. This support will make BusyBox be considerable larger
683           and run slower, so you should leave this option disabled unless
684           you are hunting a hard to find memory problem.
685
686
687 config NO_DEBUG_LIB
688         bool "None"
689
690 config DMALLOC
691         bool "Dmalloc"
692
693 config EFENCE
694         bool "Electric-fence"
695
696 endchoice
697
698 endmenu
699
700 source libbb/Config.in
701
702 comment "Applets"
703
704 source archival/Config.in
705 source coreutils/Config.in
706 source console-tools/Config.in
707 source debianutils/Config.in
708 source editors/Config.in
709 source findutils/Config.in
710 source init/Config.in
711 source loginutils/Config.in
712 source e2fsprogs/Config.in
713 source modutils/Config.in
714 source util-linux/Config.in
715 source miscutils/Config.in
716 source networking/Config.in
717 source printutils/Config.in
718 source mailutils/Config.in
719 source procps/Config.in
720 source runit/Config.in
721 source selinux/Config.in
722 source shell/Config.in
723 source sysklogd/Config.in