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