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