Split CONFIG_DEBUG from CONFIG_DEBUG_PESSIMIZE, and consolidate some Rules.mak
[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 choice
17         prompt "Buffer allocation policy"
18         default CONFIG_FEATURE_BUFFERS_USE_MALLOC
19         help
20           There are 3 ways BusyBox can handle buffer allocations:
21           - Use malloc. This costs code size for the call to xmalloc.
22           - Put them on stack. For some very small machines with limited stack
23             space, this can be deadly.  For most folks, this works just fine.
24           - Put them in BSS. This works beautifully for computers with a real
25             MMU (and OS support), but wastes runtime RAM for uCLinux. This
26             behavior was the only one available for BusyBox versions 0.48 and
27             earlier.
28
29 config CONFIG_FEATURE_BUFFERS_USE_MALLOC
30         bool "Allocate with Malloc"
31
32 config CONFIG_FEATURE_BUFFERS_GO_ON_STACK
33         bool "Allocate on the Stack"
34
35 config CONFIG_FEATURE_BUFFERS_GO_IN_BSS
36         bool "Allocate in the .bss section"
37
38 endchoice
39
40 config CONFIG_SHOW_USAGE
41         bool "Show terse applet usage messages"
42         default y
43         help
44           All BusyBox applets will show help messages when invoked with
45           wrong arguments. You can turn off printing these terse usage
46           messages if you say no here.
47           This will save you up to 7k.
48
49 config CONFIG_FEATURE_VERBOSE_USAGE
50         bool "Show verbose applet usage messages"
51         default n
52         select CONFIG_SHOW_USAGE
53         help
54           All BusyBox applets will show more verbose help messages when
55           busybox is invoked with --help.  This will add a lot of text to the
56           busybox binary.  In the default configuration, this will add about
57           13k, but it can add much more depending on your configuration.
58
59 config CONFIG_FEATURE_COMPRESS_USAGE
60         bool "Store applet usage messages in compressed form"
61         default y
62         depends on CONFIG_SHOW_USAGE
63         help
64           Store usage messages in compressed form, uncompress them on-the-fly
65           when <applet> --help is called.
66
67 config CONFIG_FEATURE_INSTALLER
68         bool "Support --install [-s] to install applet links at runtime"
69         default n
70         help
71           Enable 'busybox --install [-s]' support.  This will allow you to use
72           busybox at runtime to create hard links or symlinks for all the
73           applets that are compiled into busybox.  This feature requires the
74           /proc filesystem.
75
76 config CONFIG_LOCALE_SUPPORT
77         bool "Enable locale support (system needs locale for this to work)"
78         default n
79         help
80           Enable this if your system has locale support and you would like
81           busybox to support locale settings.
82
83 config CONFIG_FEATURE_DEVFS
84         bool "Support for devfs"
85         default n
86         help
87           Enable if you want BusyBox to work with devfs.
88
89 config CONFIG_FEATURE_DEVPTS
90         bool "Use the devpts filesystem for Unix98 PTYs"
91         default y if CONFIG_FEATURE_DEVFS
92         help
93           Enable if you want BusyBox to use Unix98 PTY support. If enabled,
94           busybox will use /dev/ptmx for the master side of the pseudoterminal
95           and /dev/pts/<number> for the slave side.  Otherwise, BSD style
96           /dev/ttyp<number> will be used. To use this option, you should have
97           devpts or devfs mounted.
98
99 config CONFIG_FEATURE_CLEAN_UP
100         bool "Clean up all memory before exiting (usually not needed)"
101         default n
102         help
103           As a size optimization, busybox normally exits without explicitly
104           freeing dynamically allocated memory or closing files.  This saves
105           space since the OS will clean up for us, but it can confuse debuggers
106           like valgrind, which report tons of memory and resource leaks.
107
108           Don't enable this unless you have a really good reason to clean
109           things up manually.
110
111 config CONFIG_FEATURE_SUID
112         bool "Support for SUID/SGID handling"
113         default n
114         help
115           Support SUID and SGID binaries.
116
117 config CONFIG_FEATURE_SUID_CONFIG
118         bool "Runtime SUID/SGID configuration via /etc/busybox.conf"
119         default n if CONFIG_FEATURE_SUID
120         depends on CONFIG_FEATURE_SUID
121         help
122           Allow the SUID / SGID state of an applet to be determined runtime by
123           checking /etc/busybox.conf.  The format of this file is as follows:
124
125           <applet> = [Ssx-][Ssx-][x-] (<username>|<uid>).(<groupname>|<gid>)
126
127           An example might help:
128
129           [SUID]
130           su = ssx root.0 # applet su can be run by anyone and runs with euid=0/egid=0
131           su = ssx        # exactly the same
132
133           mount = sx- root.disk # applet mount can be run by root and members of group disk
134                                 # and runs with euid=0
135
136           cp = --- # disable applet cp for everyone
137
138           The file has to be owned by user root, group root and has to be
139           writeable only by root:
140                 (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
141           The busybox executable has to be owned by user root, group
142           root and has to be setuid root for this to work:
143                 (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
144
145           Robert 'sandman' Griebl has more information here:
146           <url: http://www.softforge.de/bb/suid.html >.
147
148 config CONFIG_FEATURE_SUID_CONFIG_QUIET
149         bool "Suppress warning message if /etc/busybox.conf is not readable"
150         default n
151         depends on CONFIG_FEATURE_SUID_CONFIG
152         help
153           /etc/busybox.conf should be readable by the user needing the SUID, check
154           this option to avoid users to be notified about missing permissions.
155
156 config CONFIG_SELINUX
157         bool "Support NSA Security Enhanced Linux"
158         default n
159         help
160           Enable support for SELinux in applets ls, ps, and id.  Also provide
161           the option of compiling in SELinux applets.
162
163           If you do not have a complete SELinux userland installed, this stuff
164           will not compile. Go visit
165                 http://www.nsa.gov/selinux/index.html
166           to download the necessary stuff to allow busybox to compile with
167           this option enabled. Specifially, libselinux 1.28 or better is
168           directly required by busybox. If the installation is located in a
169           non-standard directory, provide it by invoking make as follows:
170                 CFLAGS=-I<libselinux-include-path> \
171                 LDFLAGS=-L<libselinux-lib-path> \
172                 make
173
174           Most people will leave this set to 'N'.
175
176 endmenu
177
178 menu 'Build Options'
179
180 config CONFIG_STATIC
181         bool "Build BusyBox as a static binary (no shared libs)"
182         default n
183         help
184           If you want to build a static BusyBox binary, which does not
185           use or require any shared libraries, then enable this option.
186           This can cause BusyBox to be considerably larger, so you should
187           leave this option false unless you have a good reason (i.e.
188           your target platform does not support shared libraries, or
189           you are building an initrd which doesn't need anything but
190           BusyBox, etc).
191
192           Most people will leave this set to 'N'.
193
194 config CONFIG_BUILD_LIBBUSYBOX
195         bool "Build shared libbusybox"
196         default y
197         help
198           Build a shared library libbusybox.so which contains all
199           libraries used inside busybox.
200
201 config CONFIG_FEATURE_FULL_LIBBUSYBOX
202         bool "Feature-complete libbusybox"
203         default n if !CONFIG_FEATURE_SHARED_BUSYBOX
204         depends on CONFIG_BUILD_LIBBUSYBOX
205         help
206           Build a libbusybox with the complete feature-set, disregarding
207           the actually selected config.
208
209           Normally, libbusybox will only contain the features which are
210           used by busybox itself. If you plan to write a separate
211           standalone application which uses libbusybox say 'Y'.
212
213           Note: libbusybox is GPL, not LGPL, and exports no stable API that
214           might act as a copyright barrier.  We can and will modify the
215           exported function set between releases (even minor version number
216           changes), and happily break out-of-tree features.
217
218           Say 'N' if in doubt.
219
220 config CONFIG_FEATURE_SHARED_BUSYBOX
221         bool "Use shared libbusybox for busybox"
222         default y if CONFIG_BUILD_LIBBUSYBOX
223         depends on !CONFIG_STATIC && CONFIG_BUILD_LIBBUSYBOX
224         help
225           Use libbusybox.so also for busybox itself.
226           You need to have a working dynamic linker to use this variant.
227
228 config CONFIG_LFS
229         bool "Build with Large File Support (for accessing files > 2 GB)"
230         default n
231         select FDISK_SUPPORT_LARGE_DISKS
232         help
233           If you want to build BusyBox with large file support, then enable
234           this option.  This will have no effect if your kernel or your C
235           library lacks large file support for large files.  Some of the
236           programs that can benefit from large file support include dd, gzip,
237           cp, mount, tar, and many others.  If you want to access files larger
238           than 2 Gigabytes, enable this option.  Otherwise, leave it set to 'N'.
239
240 config USING_CROSS_COMPILER
241         bool "Do you want to build BusyBox with a Cross Compiler?"
242         default n
243         help
244           Do you want to build BusyBox with a Cross Compiler?  If so,
245           then enable this option.  Otherwise leave it set to 'N'.
246
247 config CROSS_COMPILER_PREFIX
248         string "Cross Compiler prefix"
249         default "/usr/i386-linux-uclibc/bin/i386-uclibc-"
250         depends on USING_CROSS_COMPILER
251         help
252           If you want to build BusyBox with a cross compiler, then you
253           will need to set this to the cross-compiler prefix.  For example,
254           if my cross-compiler is /usr/i386-linux-uclibc/bin/i386-uclibc-gcc
255           then I would enter '/usr/i386-linux-uclibc/bin/i386-uclibc-' here,
256           which will ensure the correct compiler is used.
257
258 config EXTRA_CFLAGS_OPTIONS
259         string "Any extra CFLAGS options for the compiler?"
260         default ""
261         help
262           Do you want to pass any extra CFLAGS options to the compiler as
263           you build BusyBox? If so, this is the option for you...  For example,
264           if you want to add some simple compiler switches (like -march=i686),
265           or check for warnings using -Werror, just those options here.
266
267 config CONFIG_BUILD_AT_ONCE
268         bool "Compile all sources at once"
269         default n
270         help
271           Normally each source-file is compiled with one invocation of
272           the compiler.
273           If you set this option, all sources are compiled at once.
274           This gives the compiler more opportunities to optimize which can
275           result in smaller and/or faster binaries.
276
277           Setting this option will consume alot of memory, e.g. if you
278           enable all applets with all features, gcc uses more than 300MB
279           RAM during compilation of busybox.
280
281           This option is most likely only beneficial for newer compilers
282           such as gcc-4.1 and above.
283
284           Say 'N' unless you know what you are doing.
285
286 endmenu
287
288 menu 'Debugging Options'
289
290 config CONFIG_DEBUG
291         bool "Build BusyBox with extra Debugging symbols"
292         default n
293         help
294           Say Y here if you wish to examine BusyBox internals while applets are
295           running.  This increases the size of the binary considerably, and
296           should only be used when doing development.  If you are doing
297           development and want to debug BusyBox, answer Y.
298
299           Most people should answer N.
300
301 config CONFIG_DEBUG_PESSIMIZE
302         bool "Disable compiler optimizations."
303         default n
304         depends on CONFIG_DEBUG
305         help
306           The compiler's optimization of source code can eliminate and reorder
307           code, resulting in an executable that's hard to understand when
308           stepping through it with a debugger.  This switches it off, resulting
309           in a much bigger executable that more closely matches the source
310           code.
311
312 choice
313         prompt "Additional debugging library"
314         default CONFIG_NO_DEBUG_LIB
315         depends on CONFIG_DEBUG
316         help
317           Using an additional debugging library will make BusyBox become
318           considerable larger and will cause it to run more slowly.  You
319           should always leave this option disabled for production use.
320
321           dmalloc support:
322           ----------------
323           This enables compiling with dmalloc ( http://dmalloc.com/ )
324           which is an excellent public domain mem leak and malloc problem
325           detector.  To enable dmalloc, before running busybox you will
326           want to properly set your environment, for example:
327             export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
328           The 'debug=' value is generated using the following command
329             dmalloc -p log-stats -p log-non-free -p log-bad-space -p log-elapsed-time \
330                -p check-fence -p check-heap -p check-lists -p check-blank \
331                -p check-funcs -p realloc-copy -p allow-free-null
332
333           Electric-fence support:
334           -----------------------
335           This enables compiling with Electric-fence support.  Electric
336           fence is another very useful malloc debugging library which uses
337           your computer's virtual memory hardware to detect illegal memory
338           accesses.  This support will make BusyBox be considerable larger
339           and run slower, so you should leave this option disabled unless
340           you are hunting a hard to find memory problem.
341
342
343 config CONFIG_NO_DEBUG_LIB
344         bool "None"
345
346 config CONFIG_DMALLOC
347         bool "Dmalloc"
348
349 config CONFIG_EFENCE
350         bool "Electric-fence"
351
352 endchoice
353
354 config CONFIG_DEBUG_YANK_SUSv2
355         bool "Disable obsolete features removed before SUSv3?"
356         default y
357         help
358           This option will disable backwards compatibility with SuSv2,
359           specifically, old-style numeric options ('command -1 <file>')
360           will not be supported in head, tail, and fold.  (Note: should
361           yank from renice too.)
362
363 endmenu
364
365 menu 'Installation Options'
366
367 config CONFIG_INSTALL_NO_USR
368         bool "Don't use /usr"
369         default n
370         help
371           Disable use of /usr. Don't activate this option if you don't know
372           that you really want this behaviour.
373
374 choice
375        prompt "Applets links"
376        default CONFIG_INSTALL_APPLET_SYMLINKS
377        help
378          Choose how you install applets links.
379
380 config CONFIG_INSTALL_APPLET_SYMLINKS
381        bool "as soft-links"
382        help
383          Install applets as soft-links to the busybox binary. This needs some
384          free inodes on the filesystem, but might help with filesystem
385          generators that can't cope with hard-links.
386
387 config CONFIG_INSTALL_APPLET_HARDLINKS
388        bool "as hard-links"
389        help
390          Install applets as hard-links to the busybox binary. This might count
391          on a filesystem with few inodes.
392
393 config CONFIG_INSTALL_APPLET_DONT
394        bool
395        prompt "not installed"
396        depends on CONFIG_FEATURE_INSTALLER || CONFIG_FEATURE_SH_STANDALONE_SHELL
397        help
398          Do not install applets links. Usefull when using the -install feature
399          or a standalone shell for rescue pruposes.
400
401 endchoice
402
403 config PREFIX
404         string "BusyBox installation prefix"
405         default "./_install"
406         help
407           Define your directory to install BusyBox files/subdirs in.
408
409 endmenu
410
411 source libbb/Config.in
412
413 endmenu
414
415 comment "Applets"
416
417 source archival/Config.in
418 source coreutils/Config.in
419 source console-tools/Config.in
420 source debianutils/Config.in
421 source editors/Config.in
422 source findutils/Config.in
423 source init/Config.in
424 source loginutils/Config.in
425 source e2fsprogs/Config.in
426 source modutils/Config.in
427 source util-linux/Config.in
428 source miscutils/Config.in
429 source networking/Config.in
430 source procps/Config.in
431 source shell/Config.in
432 source sysklogd/Config.in