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