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