2 # For a description of the syntax of this configuration file,
3 # see scripts/kbuild/config-language.txt.
6 mainmenu "BusyBox Configuration"
12 menu "Busybox Settings"
15 bool "Enable options for full-blown desktop systems"
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
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.
28 bool "Provide compatible behavior for rare corner cases (bigger code)"
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.
37 bool "Enable obsolete features removed before SUSv3"
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
45 config USE_PORTABLE_CODE
46 bool "Avoid using GCC-specific code constructs"
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.
53 #fixme: delete, create suboptions for applets which use this
54 config FEATURE_AUTOWIDTH
55 bool "Calculate terminal & column widths"
58 This option allows utilities such as 'ls', 'telnet' etc
59 to determine the width of the screen, which can allow them to
60 display additional text or avoid wrapping text onto the next line.
61 If you leave this disabled, your utilities will be especially
62 primitive and will be unable to determine the current screen width.
64 #fixme: delete, create suboptions for applets which use this
65 config FEATURE_USE_TERMIOS
66 bool "Use termios for one-stroke input"
69 This option allows utilities such as 'top' to accept keyboard
70 commands. Without this option, they simply refresh display
74 bool "Show applet usage messages"
77 Enabling this option, BusyBox applets will show terse help messages
78 when invoked with wrong arguments.
79 If you do not want to show any (helpful) usage message when
80 issuing wrong command syntax, you can say 'N' here,
81 saving approximately 7k.
83 config FEATURE_VERBOSE_USAGE
84 bool "Show verbose applet usage messages"
88 All BusyBox applets will show verbose help messages when
89 busybox is invoked with --help. This will add a lot of text to the
90 busybox binary. In the default configuration, this will add about
91 13k, but it can add much more depending on your configuration.
93 config FEATURE_COMPRESS_USAGE
94 bool "Store applet usage messages in compressed form"
98 Store usage messages in .bz compressed form, uncompress them
99 on-the-fly when <applet> --help is called.
101 If you have a really tiny busybox with few applets enabled (and
102 bunzip2 isn't one of them), the overhead of the decompressor might
103 be noticeable. Also, if you run executables directly from ROM
104 and have very little memory, this might not be a win. Otherwise,
105 you probably want this.
108 bool "Include busybox applet"
111 The busybox applet provides general help regarding busybox and
112 allows the included applets to be listed. It's also required
113 if applet links are to be installed at runtime.
115 If you can live without these features disabling this will save
118 config FEATURE_INSTALLER
119 bool "Support --install [-s] to install applet links at runtime"
123 Enable 'busybox --install [-s]' support. This will allow you to use
124 busybox at runtime to create hard links or symlinks for all the
125 applets that are compiled into busybox.
127 config INSTALL_NO_USR
128 bool "Don't use /usr"
131 Disable use of /usr. busybox --install and "make install"
132 will install applets only to /bin and /sbin,
133 never to /usr/bin or /usr/sbin.
136 bool "Support PAM (Pluggable Authentication Modules)"
139 Use PAM in some busybox applets (currently login and httpd) instead
140 of direct access to password database.
143 bool "Support --long-options"
146 Enable this if you want busybox applets to use the gnu --long-option
147 style, in addition to single character -a -b -c style options.
149 config FEATURE_DEVPTS
150 bool "Use the devpts filesystem for Unix98 PTYs"
153 Enable if you want BusyBox to use Unix98 PTY support. If enabled,
154 busybox will use /dev/ptmx for the master side of the pseudoterminal
155 and /dev/pts/<number> for the slave side. Otherwise, BSD style
156 /dev/ttyp<number> will be used. To use this option, you should have
159 config FEATURE_CLEAN_UP
160 bool "Clean up all memory before exiting (usually not needed)"
163 As a size optimization, busybox normally exits without explicitly
164 freeing dynamically allocated memory or closing files. This saves
165 space since the OS will clean up for us, but it can confuse debuggers
166 like valgrind, which report tons of memory and resource leaks.
168 Don't enable this unless you have a really good reason to clean
172 bool "Support utmp file"
175 The file /var/run/utmp is used to track who is currently logged in.
176 With this option on, certain applets (getty, login, telnetd etc)
177 will create and delete entries there.
178 "who" applet requires this option.
181 bool "Support wtmp file"
183 depends on FEATURE_UTMP
185 The file /var/run/wtmp is used to track when users have logged into
186 and logged out of the system.
187 With this option on, certain applets (getty, login, telnetd etc)
188 will append new entries there.
189 "last" applet requires this option.
191 config FEATURE_PIDFILE
192 bool "Support writing pidfiles"
195 This option makes some applets (e.g. crond, syslogd, inetd) write
196 a pidfile at the configured PID_FILE_PATH. It has no effect
197 on applets which require pidfiles to run.
200 string "Path to directory for pidfile"
202 depends on FEATURE_PIDFILE
204 This is the default path where pidfiles are created. Applets which
205 allow you to set the pidfile path on the command line will override
206 this value. The option has no effect on applets that require you to
207 specify a pidfile path.
210 bool "Support SUID/SGID handling"
213 With this option you can install the busybox binary belonging
214 to root with the suid bit set, enabling some applets to perform
215 root-level operations even when run by ordinary users
216 (for example, mounting of user mounts in fstab needs this).
218 Busybox will automatically drop privileges for applets
219 that don't need root access.
221 If you are really paranoid and don't want to do this, build two
222 busybox binaries with different applets in them (and the appropriate
223 symlinks pointing to each binary), and only set the suid bit on the
226 The applets which require root rights (need suid bit or
227 to be run by root) and will refuse to execute otherwise:
228 crontab, login, passwd, su, vlock, wall.
230 The applets which will use root rights if they have them
231 (via suid bit, or because run by root), but would try to work
232 without root right nevertheless:
233 findfs, ping[6], traceroute[6], mount.
235 Note that if you DONT select this option, but DO make busybox
236 suid root, ALL applets will run under root, which is a huge
237 security hole (think "cp /some/file /etc/passwd").
239 config FEATURE_SUID_CONFIG
240 bool "Runtime SUID/SGID configuration via /etc/busybox.conf"
242 depends on FEATURE_SUID
244 Allow the SUID / SGID state of an applet to be determined at runtime
245 by checking /etc/busybox.conf. (This is sort of a poor man's sudo.)
246 The format of this file is as follows:
248 APPLET = [Ssx-][Ssx-][x-] [USER.GROUP]
250 s: USER or GROUP is allowed to execute APPLET.
251 APPLET will run under USER or GROUP
252 (reagardless of who's running it).
253 S: USER or GROUP is NOT allowed to execute APPLET.
254 APPLET will run under USER or GROUP.
255 This option is not very sensical.
256 x: USER/GROUP/others are allowed to execute APPLET.
257 No UID/GID change will be done when it is run.
258 -: USER/GROUP/others are not allowed to execute APPLET.
260 An example might help:
263 su = ssx root.0 # applet su can be run by anyone and runs with
265 su = ssx # exactly the same
267 mount = sx- root.disk # applet mount can be run by root and members
268 # of group disk (but not anyone else)
269 # and runs with euid=0 (egid is not changed)
271 cp = --- # disable applet cp for everyone
273 The file has to be owned by user root, group root and has to be
274 writeable only by root:
275 (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
276 The busybox executable has to be owned by user root, group
277 root and has to be setuid root for this to work:
278 (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
280 Robert 'sandman' Griebl has more information here:
281 <url: http://www.softforge.de/bb/suid.html >.
283 config FEATURE_SUID_CONFIG_QUIET
284 bool "Suppress warning message if /etc/busybox.conf is not readable"
286 depends on FEATURE_SUID_CONFIG
288 /etc/busybox.conf should be readable by the user needing the SUID,
289 check this option to avoid users to be notified about missing
293 bool "Support NSA Security Enhanced Linux"
295 select PLATFORM_LINUX
297 Enable support for SELinux in applets ls, ps, and id. Also provide
298 the option of compiling in SELinux applets.
300 If you do not have a complete SELinux userland installed, this stuff
301 will not compile. Specifially, libselinux 1.28 or better is
302 directly required by busybox. If the installation is located in a
303 non-standard directory, provide it by invoking make as follows:
304 CFLAGS=-I<libselinux-include-path> \
305 LDFLAGS=-L<libselinux-lib-path> \
308 Most people will leave this set to 'N'.
310 config FEATURE_PREFER_APPLETS
311 bool "exec prefers applets"
314 This is an experimental option which directs applets about to
315 call 'exec' to try and find an applicable busybox applet before
316 searching the PATH. This is typically done by exec'ing
318 This may affect shell, find -exec, xargs and similar applets.
319 They will use applets even if /bin/<applet> -> busybox link
320 is missing (or is not a link to busybox). However, this causes
321 problems in chroot jails without mounted /proc and with ps/top
322 (command name can be shown as 'exe' for applets started this way).
324 config BUSYBOX_EXEC_PATH
325 string "Path to BusyBox executable"
326 default "/proc/self/exe"
328 When Busybox applets need to run other busybox applets, BusyBox
329 sometimes needs to exec() itself. When the /proc filesystem is
330 mounted, /proc/self/exe always points to the currently running
331 executable. If you haven't got /proc, set this to wherever you
332 want to run BusyBox from.
334 # These are auto-selected by other options
336 config FEATURE_SYSLOG
337 bool #No description makes it a hidden option
340 # This option is auto-selected when you select any applet which may
341 # send its output to syslog. You do not need to select it manually.
343 config FEATURE_HAVE_RPC
344 bool #No description makes it a hidden option
347 # This is automatically selected if any of enabled applets need it.
348 # You do not need to select it manually.
350 config PLATFORM_LINUX
351 bool #No description makes it a hidden option
354 # For the most part, busybox requires only POSIX compatibility
355 # from the target system, but some applets and features use
356 # Linux-specific interfaces.
358 # This is automatically selected if any applet or feature requires
359 # Linux-specific interfaces. You do not need to select it manually.
361 comment 'Build Options'
364 bool "Build BusyBox as a static binary (no shared libs)"
367 If you want to build a static BusyBox binary, which does not
368 use or require any shared libraries, then enable this option.
369 This can cause BusyBox to be considerably larger, so you should
370 leave this option false unless you have a good reason (i.e.
371 your target platform does not support shared libraries, or
372 you are building an initrd which doesn't need anything but
375 Most people will leave this set to 'N'.
378 bool "Build BusyBox as a position independent executable"
382 Hardened code option. PIE binaries are loaded at a different
383 address at each invocation. This has some overhead,
384 particularly on x86-32 which is short on registers.
386 Most people will leave this set to 'N'.
389 bool "Force NOMMU build"
392 Busybox tries to detect whether architecture it is being
393 built against supports MMU or not. If this detection fails,
394 or if you want to build NOMMU version of busybox for testing,
395 you may force NOMMU build here.
397 Most people will leave this set to 'N'.
399 # PIE can be made to work with BUILD_LIBBUSYBOX, but currently
400 # build system does not support that
401 config BUILD_LIBBUSYBOX
402 bool "Build shared libbusybox"
404 depends on !FEATURE_PREFER_APPLETS && !PIE && !STATIC
406 Build a shared library libbusybox.so.N.N.N which contains all
409 This feature allows every applet to be built as a tiny
410 separate executable. Enabling it for "one big busybox binary"
411 approach serves no purpose and increases code size.
412 You should almost certainly say "no" to this.
414 ### config FEATURE_FULL_LIBBUSYBOX
415 ### bool "Feature-complete libbusybox"
416 ### default n if !FEATURE_SHARED_BUSYBOX
417 ### depends on BUILD_LIBBUSYBOX
419 ### Build a libbusybox with the complete feature-set, disregarding
420 ### the actually selected config.
422 ### Normally, libbusybox will only contain the features which are
423 ### used by busybox itself. If you plan to write a separate
424 ### standalone application which uses libbusybox say 'Y'.
426 ### Note: libbusybox is GPL, not LGPL, and exports no stable API that
427 ### might act as a copyright barrier. We can and will modify the
428 ### exported function set between releases (even minor version number
429 ### changes), and happily break out-of-tree features.
431 ### Say 'N' if in doubt.
433 config FEATURE_INDIVIDUAL
434 bool "Produce a binary for each applet, linked against libbusybox"
436 depends on BUILD_LIBBUSYBOX
438 If your CPU architecture doesn't allow for sharing text/rodata
439 sections of running binaries, but allows for runtime dynamic
440 libraries, this option will allow you to reduce memory footprint
441 when you have many different applets running at once.
443 If your CPU architecture allows for sharing text/rodata,
444 having single binary is more optimal.
446 Each applet will be a tiny program, dynamically linked
447 against libbusybox.so.N.N.N.
449 You need to have a working dynamic linker.
451 config FEATURE_SHARED_BUSYBOX
452 bool "Produce additional busybox binary linked against libbusybox"
454 depends on BUILD_LIBBUSYBOX
456 Build busybox, dynamically linked against libbusybox.so.N.N.N.
458 You need to have a working dynamic linker.
460 ### config BUILD_AT_ONCE
461 ### bool "Compile all sources at once"
464 ### Normally each source-file is compiled with one invocation of
466 ### If you set this option, all sources are compiled at once.
467 ### This gives the compiler more opportunities to optimize which can
468 ### result in smaller and/or faster binaries.
470 ### Setting this option will consume alot of memory, e.g. if you
471 ### enable all applets with all features, gcc uses more than 300MB
472 ### RAM during compilation of busybox.
474 ### This option is most likely only beneficial for newer compilers
475 ### such as gcc-4.1 and above.
477 ### Say 'N' unless you know what you are doing.
480 bool "Build with Large File Support (for accessing files > 2 GB)"
483 If you want to build BusyBox with large file support, then enable
484 this option. This will have no effect if your kernel or your C
485 library lacks large file support for large files. Some of the
486 programs that can benefit from large file support include dd, gzip,
487 cp, mount, tar, and many others. If you want to access files larger
488 than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'.
490 config CROSS_COMPILER_PREFIX
491 string "Cross Compiler prefix"
494 If you want to build BusyBox with a cross compiler, then you
495 will need to set this to the cross-compiler prefix, for example,
498 Note that CROSS_COMPILE environment variable or
499 "make CROSS_COMPILE=xxx ..." will override this selection.
501 Native builds leave this empty.
504 string "Path to sysroot"
507 If you want to build BusyBox with a cross compiler, then you
508 might also need to specify where /usr/include and /usr/lib
511 For example, BusyBox can be built against an installed
512 Android NDK, platform version 9, for ARM ABI with
514 CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
516 Native builds leave this empty.
519 string "Additional CFLAGS"
522 Additional CFLAGS to pass to the compiler verbatim.
525 string "Additional LDFLAGS"
528 Additional LDFLAGS to pass to the linker verbatim.
531 string "Additional LDLIBS"
534 Additional LDLIBS to pass to the linker with -l.
536 comment 'Installation Options ("make install" behavior)'
539 prompt "What kind of applet links to install"
540 default INSTALL_APPLET_SYMLINKS
542 Choose what kind of links to applets are created by "make install".
544 config INSTALL_APPLET_SYMLINKS
547 Install applets as soft-links to the busybox binary. This needs some
548 free inodes on the filesystem, but might help with filesystem
549 generators that can't cope with hard-links.
551 config INSTALL_APPLET_HARDLINKS
554 Install applets as hard-links to the busybox binary. This might
555 count on a filesystem with few inodes.
557 config INSTALL_APPLET_SCRIPT_WRAPPERS
558 bool "as script wrappers"
560 Install applets as script wrappers that call the busybox binary.
562 config INSTALL_APPLET_DONT
565 Do not install applet links. Useful when you plan to use
566 busybox --install for installing links, or plan to use
567 a standalone shell and thus don't need applet links.
572 prompt "/bin/sh applet link"
573 default INSTALL_SH_APPLET_SYMLINK
574 depends on INSTALL_APPLET_SCRIPT_WRAPPERS
576 Choose how you install /bin/sh applet link.
578 config INSTALL_SH_APPLET_SYMLINK
581 Install /bin/sh applet as soft-link to the busybox binary.
583 config INSTALL_SH_APPLET_HARDLINK
586 Install /bin/sh applet as hard-link to the busybox binary.
588 config INSTALL_SH_APPLET_SCRIPT_WRAPPER
589 bool "as script wrapper"
591 Install /bin/sh applet as script wrapper that calls
597 string "BusyBox installation prefix"
600 Define your directory to install BusyBox files/subdirs in.
602 comment 'Debugging Options'
605 bool "Build BusyBox with extra Debugging symbols"
608 Say Y here if you wish to examine BusyBox internals while applets are
609 running. This increases the size of the binary considerably, and
610 should only be used when doing development. If you are doing
611 development and want to debug BusyBox, answer Y.
613 Most people should answer N.
615 config DEBUG_PESSIMIZE
616 bool "Disable compiler optimizations"
620 The compiler's optimization of source code can eliminate and reorder
621 code, resulting in an executable that's hard to understand when
622 stepping through it with a debugger. This switches it off, resulting
623 in a much bigger executable that more closely matches the source
626 config DEBUG_SANITIZE
627 bool "Enable runtime sanitizers (ASAN/LSAN/USAN/etc...)"
630 Say Y here if you want to enable runtime sanitizers. These help
631 catch bad memory accesses (e.g. buffer overflows), but will make
632 the executable larger and slow down runtime a bit.
634 This adds -fsanitize=foo options to gcc command line.
636 If you aren't developing/testing busybox, say N here.
639 bool "Build unit tests"
642 Say Y here if you want to build unit tests (both the framework and
643 test cases) as a Busybox applet. This results in bigger code, so you
644 probably don't want this option in production builds.
647 bool "Abort compilation on any warning"
650 This adds -Werror to gcc command line.
652 Most people should answer N.
655 prompt "Additional debugging library"
658 Using an additional debugging library will make BusyBox become
659 considerable larger and will cause it to run more slowly. You
660 should always leave this option disabled for production use.
664 This enables compiling with dmalloc ( http://dmalloc.com/ )
665 which is an excellent public domain mem leak and malloc problem
666 detector. To enable dmalloc, before running busybox you will
667 want to properly set your environment, for example:
668 export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
669 The 'debug=' value is generated using the following command
670 dmalloc -p log-stats -p log-non-free -p log-bad-space \
671 -p log-elapsed-time -p check-fence -p check-heap \
672 -p check-lists -p check-blank -p check-funcs -p realloc-copy \
675 Electric-fence support:
676 -----------------------
677 This enables compiling with Electric-fence support. Electric
678 fence is another very useful malloc debugging library which uses
679 your computer's virtual memory hardware to detect illegal memory
680 accesses. This support will make BusyBox be considerable larger
681 and run slower, so you should leave this option disabled unless
682 you are hunting a hard to find memory problem.
692 bool "Electric-fence"
698 source libbb/Config.in
702 source archival/Config.in
703 source coreutils/Config.in
704 source console-tools/Config.in
705 source debianutils/Config.in
706 source editors/Config.in
707 source findutils/Config.in
708 source init/Config.in
709 source loginutils/Config.in
710 source e2fsprogs/Config.in
711 source modutils/Config.in
712 source util-linux/Config.in
713 source miscutils/Config.in
714 source networking/Config.in
715 source printutils/Config.in
716 source mailutils/Config.in
717 source procps/Config.in
718 source runit/Config.in
719 source selinux/Config.in
720 source shell/Config.in
721 source sysklogd/Config.in