cp: revert a recent buggy change, and add a comment why it's wrong
[oweals/busybox.git] / Config.in
1 #
2 # For a description of the syntax of this configuration file,
3 # see scripts/kbuild/config-language.txt.
4 #
5
6 mainmenu "BusyBox Configuration"
7
8 config HAVE_DOT_CONFIG
9         bool
10         default y
11
12 menu "Busybox Settings"
13
14 menu "General Configuration"
15
16 config DESKTOP
17         bool "Enable options for full-blown desktop systems"
18         default n
19         help
20           Enable options and features which are not essential.
21           Select this only if you plan to use busybox on full-blown
22           desktop machine with common Linux distro, not on an embedded box.
23
24 config EXTRA_COMPAT
25         bool "Provide compatible behavior for rare corner cases (bigger code)"
26         default n
27         help
28           This option makes grep, sed etc handle rare corner cases
29           (embedded NUL bytes and such). This makes code bigger and uses
30           some GNU extensions in libc. You probably only need this option
31           if you plan to run busybox on desktop.
32
33 config USE_PORTABLE_CODE
34         bool "Avoid using GCC-specific code constructs"
35         default n
36         help
37           Use this option if you are trying to compile busybox with
38           compiler other than gcc.
39           If you do use gcc, this option may needlessly increase code size.
40
41 choice
42         prompt "Buffer allocation policy"
43         default FEATURE_BUFFERS_USE_MALLOC
44         help
45           There are 3 ways BusyBox can handle buffer allocations:
46           - Use malloc. This costs code size for the call to xmalloc.
47           - Put them on stack. For some very small machines with limited stack
48             space, this can be deadly. For most folks, this works just fine.
49           - Put them in BSS. This works beautifully for computers with a real
50             MMU (and OS support), but wastes runtime RAM for uCLinux. This
51             behavior was the only one available for BusyBox versions 0.48 and
52             earlier.
53
54 config FEATURE_BUFFERS_USE_MALLOC
55         bool "Allocate with Malloc"
56
57 config FEATURE_BUFFERS_GO_ON_STACK
58         bool "Allocate on the Stack"
59
60 config FEATURE_BUFFERS_GO_IN_BSS
61         bool "Allocate in the .bss section"
62
63 endchoice
64
65 config SHOW_USAGE
66         bool "Show terse applet usage messages"
67         default y
68         help
69           All BusyBox applets will show help messages when invoked with
70           wrong arguments. You can turn off printing these terse usage
71           messages if you say no here.
72           This will save you up to 7k.
73
74 config FEATURE_VERBOSE_USAGE
75         bool "Show verbose applet usage messages"
76         default n
77         select SHOW_USAGE
78         help
79           All BusyBox applets will show more verbose help messages when
80           busybox is invoked with --help. This will add a lot of text to the
81           busybox binary. In the default configuration, this will add about
82           13k, but it can add much more depending on your configuration.
83
84 config FEATURE_COMPRESS_USAGE
85         bool "Store applet usage messages in compressed form"
86         default y
87         depends on SHOW_USAGE
88         help
89           Store usage messages in compressed form, uncompress them on-the-fly
90           when <applet> --help is called.
91
92           If you have a really tiny busybox with few applets enabled (and
93           bunzip2 isn't one of them), the overhead of the decompressor might
94           be noticeable. Also, if you run executables directly from ROM
95           and have very little memory, this might not be a win. Otherwise,
96           you probably want this.
97
98 config FEATURE_INSTALLER
99         bool "Support --install [-s] to install applet links at runtime"
100         default n
101         help
102           Enable 'busybox --install [-s]' support. This will allow you to use
103           busybox at runtime to create hard links or symlinks for all the
104           applets that are compiled into busybox.
105
106 config LOCALE_SUPPORT
107         bool "Enable locale support (system needs locale for this to work)"
108         default n
109         help
110           Enable this if your system has locale support and you would like
111           busybox to support locale settings.
112
113 config FEATURE_ASSUME_UNICODE
114         bool "Support Unicode"
115         default n
116         help
117           This makes various applets aware that one byte is not
118           one character on screen.
119
120           Busybox aims to eventually work correctly with Unicode displays.
121           Any older encodings are not guaranteed to work.
122           Probably by the time when busybox will be fully Unicode-clean,
123           other encodings will be mainly of historic interest.
124
125 config FEATURE_CHECK_UNICODE_IN_ENV
126         bool "Check $LANG environment variable"
127         default y
128         depends on FEATURE_ASSUME_UNICODE && !LOCALE_SUPPORT
129         help
130           With this option on, Unicode support is activated
131           only if LANG variable has the value of the form "xxxx.utf8"
132
133           Otherwise, Unicode support will be always enabled and active.
134
135 config LONG_OPTS
136         bool "Support for --long-options"
137         default y
138         help
139           Enable this if you want busybox applets to use the gnu --long-option
140           style, in addition to single character -a -b -c style options.
141
142 config FEATURE_DEVPTS
143         bool "Use the devpts filesystem for Unix98 PTYs"
144         default y
145         help
146           Enable if you want BusyBox to use Unix98 PTY support. If enabled,
147           busybox will use /dev/ptmx for the master side of the pseudoterminal
148           and /dev/pts/<number> for the slave side. Otherwise, BSD style
149           /dev/ttyp<number> will be used. To use this option, you should have
150           devpts mounted.
151
152 config FEATURE_CLEAN_UP
153         bool "Clean up all memory before exiting (usually not needed)"
154         default n
155         help
156           As a size optimization, busybox normally exits without explicitly
157           freeing dynamically allocated memory or closing files. This saves
158           space since the OS will clean up for us, but it can confuse debuggers
159           like valgrind, which report tons of memory and resource leaks.
160
161           Don't enable this unless you have a really good reason to clean
162           things up manually.
163
164 config FEATURE_PIDFILE
165         bool "Support writing pidfiles"
166         default n
167         help
168           This option makes some applets (e.g. crond, syslogd, inetd) write
169           a pidfile in /var/run. Some applications rely on them.
170
171 config FEATURE_SUID
172         bool "Support for SUID/SGID handling"
173         default n
174         help
175           With this option you can install the busybox binary belonging
176           to root with the suid bit set, and it will automatically drop
177           priviledges for applets that don't need root access.
178
179           If you are really paranoid and don't want to do this, build two
180           busybox binaries with different applets in them (and the appropriate
181           symlinks pointing to each binary), and only set the suid bit on the
182           one that needs it. The applets currently marked to need the suid bit
183           are:
184
185           crontab, dnsd, findfs, ipcrm, ipcs, login, passwd, ping, su,
186           traceroute, vlock.
187
188 config FEATURE_SUID_CONFIG
189         bool "Runtime SUID/SGID configuration via /etc/busybox.conf"
190         default n if FEATURE_SUID
191         depends on FEATURE_SUID
192         help
193           Allow the SUID / SGID state of an applet to be determined at runtime
194           by checking /etc/busybox.conf. (This is sort of a poor man's sudo.)
195           The format of this file is as follows:
196
197           <applet> = [Ssx-][Ssx-][x-] (<username>|<uid>).(<groupname>|<gid>)
198
199           An example might help:
200
201           [SUID]
202           su = ssx root.0 # applet su can be run by anyone and runs with
203                           # euid=0/egid=0
204           su = ssx        # exactly the same
205
206           mount = sx- root.disk # applet mount can be run by root and members
207                                 # of group disk and runs with euid=0
208
209           cp = --- # disable applet cp for everyone
210
211           The file has to be owned by user root, group root and has to be
212           writeable only by root:
213                 (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
214           The busybox executable has to be owned by user root, group
215           root and has to be setuid root for this to work:
216                 (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
217
218           Robert 'sandman' Griebl has more information here:
219           <url: http://www.softforge.de/bb/suid.html >.
220
221 config FEATURE_SUID_CONFIG_QUIET
222         bool "Suppress warning message if /etc/busybox.conf is not readable"
223         default y
224         depends on FEATURE_SUID_CONFIG
225         help
226           /etc/busybox.conf should be readable by the user needing the SUID,
227           check this option to avoid users to be notified about missing
228           permissions.
229
230 config SELINUX
231         bool "Support NSA Security Enhanced Linux"
232         default n
233         help
234           Enable support for SELinux in applets ls, ps, and id. Also provide
235           the option of compiling in SELinux applets.
236
237           If you do not have a complete SELinux userland installed, this stuff
238           will not compile. Go visit
239                 http://www.nsa.gov/selinux/index.html
240           to download the necessary stuff to allow busybox to compile with
241           this option enabled. Specifially, libselinux 1.28 or better is
242           directly required by busybox. If the installation is located in a
243           non-standard directory, provide it by invoking make as follows:
244                 CFLAGS=-I<libselinux-include-path> \
245                 LDFLAGS=-L<libselinux-lib-path> \
246                 make
247
248           Most people will leave this set to 'N'.
249
250 config FEATURE_PREFER_APPLETS
251         bool "exec prefers applets"
252         default n
253         help
254           This is an experimental option which directs applets about to
255           call 'exec' to try and find an applicable busybox applet before
256           searching the PATH. This is typically done by exec'ing
257           /proc/self/exe.
258           This may affect shell, find -exec, xargs and similar applets.
259           They will use applets even if /bin/<applet> -> busybox link
260           is missing (or is not a link to busybox). However, this causes
261           problems in chroot jails without mounted /proc and with ps/top
262           (command name can be shown as 'exe' for applets started this way).
263
264 config BUSYBOX_EXEC_PATH
265         string "Path to BusyBox executable"
266         default "/proc/self/exe"
267         help
268           When Busybox applets need to run other busybox applets, BusyBox
269           sometimes needs to exec() itself. When the /proc filesystem is
270           mounted, /proc/self/exe always points to the currently running
271           executable. If you haven't got /proc, set this to wherever you
272           want to run BusyBox from.
273
274 # These are auto-selected by other options
275
276 config FEATURE_SYSLOG
277         bool #No description makes it a hidden option
278         default n
279         #help
280         #  This option is auto-selected when you select any applet which may
281         #  send its output to syslog. You do not need to select it manually.
282
283 config FEATURE_HAVE_RPC
284         bool #No description makes it a hidden option
285         default n
286         #help
287         #  This is automatically selected if any of enabled applets need it.
288         #  You do not need to select it manually.
289
290 endmenu
291
292 menu 'Build Options'
293
294 config STATIC
295         bool "Build BusyBox as a static binary (no shared libs)"
296         default n
297         help
298           If you want to build a static BusyBox binary, which does not
299           use or require any shared libraries, then enable this option.
300           This can cause BusyBox to be considerably larger, so you should
301           leave this option false unless you have a good reason (i.e.
302           your target platform does not support shared libraries, or
303           you are building an initrd which doesn't need anything but
304           BusyBox, etc).
305
306           Most people will leave this set to 'N'.
307
308 config PIE
309         bool "Build BusyBox as a position independent executable"
310         default n
311         depends on !STATIC
312         help
313           (TODO: what is it and why/when is it useful?)
314           Most people will leave this set to 'N'.
315
316 config NOMMU
317         bool "Force NOMMU build"
318         default n
319         help
320           Busybox tries to detect whether architecture it is being
321           built against supports MMU or not. If this detection fails,
322           or if you want to build NOMMU version of busybox for testing,
323           you may force NOMMU build here.
324
325           Most people will leave this set to 'N'.
326
327 # PIE can be made to work with BUILD_LIBBUSYBOX, but currently
328 # build system does not support that
329 config BUILD_LIBBUSYBOX
330         bool "Build shared libbusybox"
331         default n
332         depends on !FEATURE_PREFER_APPLETS && !PIE && !STATIC
333         help
334           Build a shared library libbusybox.so.N.N.N which contains all
335           busybox code.
336
337           This feature allows every applet to be built as a tiny
338           separate executable. Enabling it for "one big busybox binary"
339           approach serves no purpose and increases code size.
340           You should almost certainly say "no" to this.
341
342 ### config FEATURE_FULL_LIBBUSYBOX
343 ###     bool "Feature-complete libbusybox"
344 ###     default n if !FEATURE_SHARED_BUSYBOX
345 ###     depends on BUILD_LIBBUSYBOX
346 ###     help
347 ###       Build a libbusybox with the complete feature-set, disregarding
348 ###       the actually selected config.
349 ###
350 ###       Normally, libbusybox will only contain the features which are
351 ###       used by busybox itself. If you plan to write a separate
352 ###       standalone application which uses libbusybox say 'Y'.
353 ###
354 ###       Note: libbusybox is GPL, not LGPL, and exports no stable API that
355 ###       might act as a copyright barrier. We can and will modify the
356 ###       exported function set between releases (even minor version number
357 ###       changes), and happily break out-of-tree features.
358 ###
359 ###       Say 'N' if in doubt.
360
361 config FEATURE_INDIVIDUAL
362         bool "Produce a binary for each applet, linked against libbusybox"
363         default y
364         depends on BUILD_LIBBUSYBOX
365         help
366           If your CPU architecture doesn't allow for sharing text/rodata
367           sections of running binaries, but allows for runtime dynamic
368           libraries, this option will allow you to reduce memory footprint
369           when you have many different applets running at once.
370
371           If your CPU architecture allows for sharing text/rodata,
372           having single binary is more optimal.
373
374           Each applet will be a tiny program, dynamically linked
375           against libbusybox.so.N.N.N.
376
377           You need to have a working dynamic linker.
378
379 config FEATURE_SHARED_BUSYBOX
380         bool "Produce additional busybox binary linked against libbusybox"
381         default y
382         depends on BUILD_LIBBUSYBOX
383         help
384           Build busybox, dynamically linked against libbusybox.so.N.N.N.
385
386           You need to have a working dynamic linker.
387
388 ### config BUILD_AT_ONCE
389 ###     bool "Compile all sources at once"
390 ###     default n
391 ###     help
392 ###       Normally each source-file is compiled with one invocation of
393 ###       the compiler.
394 ###       If you set this option, all sources are compiled at once.
395 ###       This gives the compiler more opportunities to optimize which can
396 ###       result in smaller and/or faster binaries.
397 ###
398 ###       Setting this option will consume alot of memory, e.g. if you
399 ###       enable all applets with all features, gcc uses more than 300MB
400 ###       RAM during compilation of busybox.
401 ###
402 ###       This option is most likely only beneficial for newer compilers
403 ###       such as gcc-4.1 and above.
404 ###
405 ###       Say 'N' unless you know what you are doing.
406
407 config LFS
408         bool "Build with Large File Support (for accessing files > 2 GB)"
409         default n
410         select FDISK_SUPPORT_LARGE_DISKS
411         help
412           If you want to build BusyBox with large file support, then enable
413           this option. This will have no effect if your kernel or your C
414           library lacks large file support for large files. Some of the
415           programs that can benefit from large file support include dd, gzip,
416           cp, mount, tar, and many others. If you want to access files larger
417           than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'.
418
419 config CROSS_COMPILER_PREFIX
420         string "Cross Compiler prefix"
421         default ""
422         help
423           If you want to build BusyBox with a cross compiler, then you
424           will need to set this to the cross-compiler prefix, for example,
425           "i386-uclibc-".
426
427           Note that CROSS_COMPILE environment variable or
428           "make CROSS_COMPILE=xxx ..." will override this selection.
429
430           Native builds leave this empty.
431
432 config EXTRA_CFLAGS
433         string "Additional CFLAGS"
434         default ""
435         help
436           Additional CFLAGS to pass to the compiler verbatim.
437
438 endmenu
439
440 menu 'Debugging Options'
441
442 config DEBUG
443         bool "Build BusyBox with extra Debugging symbols"
444         default n
445         help
446           Say Y here if you wish to examine BusyBox internals while applets are
447           running. This increases the size of the binary considerably, and
448           should only be used when doing development. If you are doing
449           development and want to debug BusyBox, answer Y.
450
451           Most people should answer N.
452
453 config DEBUG_PESSIMIZE
454         bool "Disable compiler optimizations"
455         default n
456         depends on DEBUG
457         help
458           The compiler's optimization of source code can eliminate and reorder
459           code, resulting in an executable that's hard to understand when
460           stepping through it with a debugger. This switches it off, resulting
461           in a much bigger executable that more closely matches the source
462           code.
463
464 config WERROR
465         bool "Abort compilation on any warning"
466         default n
467         help
468           Selecting this will add -Werror to gcc command line.
469
470           Most people should answer N.
471
472 choice
473         prompt "Additional debugging library"
474         default NO_DEBUG_LIB
475         help
476           Using an additional debugging library will make BusyBox become
477           considerable larger and will cause it to run more slowly. You
478           should always leave this option disabled for production use.
479
480           dmalloc support:
481           ----------------
482           This enables compiling with dmalloc ( http://dmalloc.com/ )
483           which is an excellent public domain mem leak and malloc problem
484           detector. To enable dmalloc, before running busybox you will
485           want to properly set your environment, for example:
486             export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
487           The 'debug=' value is generated using the following command
488             dmalloc -p log-stats -p log-non-free -p log-bad-space \
489                -p log-elapsed-time -p check-fence -p check-heap \
490                -p check-lists -p check-blank -p check-funcs -p realloc-copy \
491                -p allow-free-null
492
493           Electric-fence support:
494           -----------------------
495           This enables compiling with Electric-fence support. Electric
496           fence is another very useful malloc debugging library which uses
497           your computer's virtual memory hardware to detect illegal memory
498           accesses. This support will make BusyBox be considerable larger
499           and run slower, so you should leave this option disabled unless
500           you are hunting a hard to find memory problem.
501
502
503 config NO_DEBUG_LIB
504         bool "None"
505
506 config DMALLOC
507         bool "Dmalloc"
508
509 config EFENCE
510         bool "Electric-fence"
511
512 endchoice
513
514 config INCLUDE_SUSv2
515         bool "Enable obsolete features removed before SUSv3?"
516         default y
517         help
518           This option will enable backwards compatibility with SuSv2,
519           specifically, old-style numeric options ('command -1 <file>')
520           will be supported in head, tail, and fold. (Note: should
521           affect renice too.)
522
523 ### config PARSE
524 ###     bool "Uniform config file parser debugging applet: parse"
525
526 endmenu
527
528 menu 'Installation Options'
529
530 config INSTALL_NO_USR
531         bool "Don't use /usr"
532         default n
533         help
534           Disable use of /usr. Don't activate this option if you don't know
535           that you really want this behaviour.
536
537 choice
538         prompt "Applets links"
539         default INSTALL_APPLET_SYMLINKS
540         help
541           Choose how you install applets links.
542
543 config INSTALL_APPLET_SYMLINKS
544         bool "as soft-links"
545         help
546           Install applets as soft-links to the busybox binary. This needs some
547           free inodes on the filesystem, but might help with filesystem
548           generators that can't cope with hard-links.
549
550 config INSTALL_APPLET_HARDLINKS
551         bool "as hard-links"
552         help
553           Install applets as hard-links to the busybox binary. This might
554           count on a filesystem with few inodes.
555
556 config INSTALL_APPLET_SCRIPT_WRAPPERS
557         bool "as script wrappers"
558         help
559           Install applets as script wrappers that call the busybox binary.
560
561 config INSTALL_APPLET_DONT
562         bool "not installed"
563         depends on FEATURE_INSTALLER || FEATURE_SH_STANDALONE || FEATURE_PREFER_APPLETS
564         help
565           Do not install applet links. Useful when using the -install feature
566           or a standalone shell for rescue purposes.
567
568 endchoice
569
570 choice
571         prompt "/bin/sh applet link"
572         default INSTALL_SH_APPLET_SYMLINK
573         depends on INSTALL_APPLET_SCRIPT_WRAPPERS
574         help
575           Choose how you install /bin/sh applet link.
576
577 config INSTALL_SH_APPLET_SYMLINK
578         bool "as soft-link"
579         help
580           Install /bin/sh applet as soft-link to the busybox binary.
581
582 config INSTALL_SH_APPLET_HARDLINK
583         bool "as hard-link"
584         help
585           Install /bin/sh applet as hard-link to the busybox binary.
586
587 config INSTALL_SH_APPLET_SCRIPT_WRAPPER
588         bool "as script wrapper"
589         help
590           Install /bin/sh applet as script wrapper that call the busybox
591           binary.
592
593 endchoice
594
595 config PREFIX
596         string "BusyBox installation prefix"
597         default "./_install"
598         help
599           Define your directory to install BusyBox files/subdirs in.
600
601 endmenu
602
603 source libbb/Config.in
604
605 endmenu
606
607 comment "Applets"
608
609 source archival/Config.in
610 source coreutils/Config.in
611 source console-tools/Config.in
612 source debianutils/Config.in
613 source editors/Config.in
614 source findutils/Config.in
615 source init/Config.in
616 source loginutils/Config.in
617 source e2fsprogs/Config.in
618 source modutils/Config.in
619 source util-linux/Config.in
620 source miscutils/Config.in
621 source networking/Config.in
622 source printutils/Config.in
623 source mailutils/Config.in
624 source procps/Config.in
625 source runit/Config.in
626 source selinux/Config.in
627 source shell/Config.in
628 source sysklogd/Config.in