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.
54 bool "Enable Linux-specific applets and features"
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.
61 Answering 'N' here will disable such applets and hide the
62 corresponding configuration options.
65 prompt "Buffer allocation policy"
66 default FEATURE_BUFFERS_USE_MALLOC
68 There are 3 ways BusyBox can handle buffer allocations:
69 - Use malloc. This costs code size for the call to xmalloc.
70 - Put them on stack. For some very small machines with limited stack
71 space, this can be deadly. For most folks, this works just fine.
72 - Put them in BSS. This works beautifully for computers with a real
73 MMU (and OS support), but wastes runtime RAM for uCLinux. This
74 behavior was the only one available for BusyBox versions 0.48 and
77 config FEATURE_BUFFERS_USE_MALLOC
78 bool "Allocate with Malloc"
80 config FEATURE_BUFFERS_GO_ON_STACK
81 bool "Allocate on the Stack"
83 config FEATURE_BUFFERS_GO_IN_BSS
84 bool "Allocate in the .bss section"
89 bool "Show applet usage messages"
92 Enabling this option, BusyBox applets will show terse help messages
93 when invoked with wrong arguments.
94 If you do not want to show any (helpful) usage message when
95 issuing wrong command syntax, you can say 'N' here,
96 saving approximately 7k.
98 config FEATURE_VERBOSE_USAGE
99 bool "Show verbose applet usage messages"
101 depends on SHOW_USAGE
103 All BusyBox applets will show verbose help messages when
104 busybox is invoked with --help. This will add a lot of text to the
105 busybox binary. In the default configuration, this will add about
106 13k, but it can add much more depending on your configuration.
108 config FEATURE_COMPRESS_USAGE
109 bool "Store applet usage messages in compressed form"
111 depends on SHOW_USAGE
113 Store usage messages in .bz compressed form, uncompress them
114 on-the-fly when <applet> --help is called.
116 If you have a really tiny busybox with few applets enabled (and
117 bunzip2 isn't one of them), the overhead of the decompressor might
118 be noticeable. Also, if you run executables directly from ROM
119 and have very little memory, this might not be a win. Otherwise,
120 you probably want this.
123 bool "Include busybox applet"
126 The busybox applet provides general help regarding busybox and
127 allows the included applets to be listed. It's also required
128 if applet links are to be installed at runtime.
130 If you can live without these features disabling this will save
133 config FEATURE_INSTALLER
134 bool "Support --install [-s] to install applet links at runtime"
138 Enable 'busybox --install [-s]' support. This will allow you to use
139 busybox at runtime to create hard links or symlinks for all the
140 applets that are compiled into busybox.
142 config INSTALL_NO_USR
143 bool "Don't use /usr"
146 Disable use of /usr. busybox --install and "make install"
147 will install applets only to /bin and /sbin,
148 never to /usr/bin or /usr/sbin.
151 bool "Support for PAM (Pluggable Authentication Modules)"
154 Use PAM in some busybox applets (currently login and httpd) instead
155 of direct access to password database.
158 bool "Support for --long-options"
161 Enable this if you want busybox applets to use the gnu --long-option
162 style, in addition to single character -a -b -c style options.
164 config FEATURE_DEVPTS
165 bool "Use the devpts filesystem for Unix98 PTYs"
168 Enable if you want BusyBox to use Unix98 PTY support. If enabled,
169 busybox will use /dev/ptmx for the master side of the pseudoterminal
170 and /dev/pts/<number> for the slave side. Otherwise, BSD style
171 /dev/ttyp<number> will be used. To use this option, you should have
174 config FEATURE_CLEAN_UP
175 bool "Clean up all memory before exiting (usually not needed)"
178 As a size optimization, busybox normally exits without explicitly
179 freeing dynamically allocated memory or closing files. This saves
180 space since the OS will clean up for us, but it can confuse debuggers
181 like valgrind, which report tons of memory and resource leaks.
183 Don't enable this unless you have a really good reason to clean
187 bool "Support utmp file"
190 The file /var/run/utmp is used to track who is currently logged in.
191 With this option on, certain applets (getty, login, telnetd etc)
192 will create and delete entries there.
193 "who" applet requires this option.
196 bool "Support wtmp file"
198 depends on FEATURE_UTMP
200 The file /var/run/wtmp is used to track when users have logged into
201 and logged out of the system.
202 With this option on, certain applets (getty, login, telnetd etc)
203 will append new entries there.
204 "last" applet requires this option.
206 config FEATURE_PIDFILE
207 bool "Support writing pidfiles"
210 This option makes some applets (e.g. crond, syslogd, inetd) write
211 a pidfile at the configured PID_FILE_PATH. It has no effect
212 on applets which require pidfiles to run.
215 string "Path to directory for pidfile"
217 depends on FEATURE_PIDFILE
219 This is the default path where pidfiles are created. Applets which
220 allow you to set the pidfile path on the command line will override
221 this value. The option has no effect on applets that require you to
222 specify a pidfile path.
225 bool "Support for SUID/SGID handling"
228 With this option you can install the busybox binary belonging
229 to root with the suid bit set, enabling some applets to perform
230 root-level operations even when run by ordinary users
231 (for example, mounting of user mounts in fstab needs this).
233 Busybox will automatically drop privileges for applets
234 that don't need root access.
236 If you are really paranoid and don't want to do this, build two
237 busybox binaries with different applets in them (and the appropriate
238 symlinks pointing to each binary), and only set the suid bit on the
241 The applets which require root rights (need suid bit or
242 to be run by root) and will refuse to execute otherwise:
243 crontab, login, passwd, su, vlock, wall.
245 The applets which will use root rights if they have them
246 (via suid bit, or because run by root), but would try to work
247 without root right nevertheless:
248 findfs, ping[6], traceroute[6], mount.
250 Note that if you DONT select this option, but DO make busybox
251 suid root, ALL applets will run under root, which is a huge
252 security hole (think "cp /some/file /etc/passwd").
254 config FEATURE_SUID_CONFIG
255 bool "Runtime SUID/SGID configuration via /etc/busybox.conf"
257 depends on FEATURE_SUID
259 Allow the SUID / SGID state of an applet to be determined at runtime
260 by checking /etc/busybox.conf. (This is sort of a poor man's sudo.)
261 The format of this file is as follows:
263 APPLET = [Ssx-][Ssx-][x-] [USER.GROUP]
265 s: USER or GROUP is allowed to execute APPLET.
266 APPLET will run under USER or GROUP
267 (reagardless of who's running it).
268 S: USER or GROUP is NOT allowed to execute APPLET.
269 APPLET will run under USER or GROUP.
270 This option is not very sensical.
271 x: USER/GROUP/others are allowed to execute APPLET.
272 No UID/GID change will be done when it is run.
273 -: USER/GROUP/others are not allowed to execute APPLET.
275 An example might help:
278 su = ssx root.0 # applet su can be run by anyone and runs with
280 su = ssx # exactly the same
282 mount = sx- root.disk # applet mount can be run by root and members
283 # of group disk (but not anyone else)
284 # and runs with euid=0 (egid is not changed)
286 cp = --- # disable applet cp for everyone
288 The file has to be owned by user root, group root and has to be
289 writeable only by root:
290 (chown 0.0 /etc/busybox.conf; chmod 600 /etc/busybox.conf)
291 The busybox executable has to be owned by user root, group
292 root and has to be setuid root for this to work:
293 (chown 0.0 /bin/busybox; chmod 4755 /bin/busybox)
295 Robert 'sandman' Griebl has more information here:
296 <url: http://www.softforge.de/bb/suid.html >.
298 config FEATURE_SUID_CONFIG_QUIET
299 bool "Suppress warning message if /etc/busybox.conf is not readable"
301 depends on FEATURE_SUID_CONFIG
303 /etc/busybox.conf should be readable by the user needing the SUID,
304 check this option to avoid users to be notified about missing
308 bool "Support NSA Security Enhanced Linux"
310 select PLATFORM_LINUX
312 Enable support for SELinux in applets ls, ps, and id. Also provide
313 the option of compiling in SELinux applets.
315 If you do not have a complete SELinux userland installed, this stuff
316 will not compile. Specifially, libselinux 1.28 or better is
317 directly required by busybox. If the installation is located in a
318 non-standard directory, provide it by invoking make as follows:
319 CFLAGS=-I<libselinux-include-path> \
320 LDFLAGS=-L<libselinux-lib-path> \
323 Most people will leave this set to 'N'.
325 config FEATURE_PREFER_APPLETS
326 bool "exec prefers applets"
329 This is an experimental option which directs applets about to
330 call 'exec' to try and find an applicable busybox applet before
331 searching the PATH. This is typically done by exec'ing
333 This may affect shell, find -exec, xargs and similar applets.
334 They will use applets even if /bin/<applet> -> busybox link
335 is missing (or is not a link to busybox). However, this causes
336 problems in chroot jails without mounted /proc and with ps/top
337 (command name can be shown as 'exe' for applets started this way).
339 config BUSYBOX_EXEC_PATH
340 string "Path to BusyBox executable"
341 default "/proc/self/exe"
343 When Busybox applets need to run other busybox applets, BusyBox
344 sometimes needs to exec() itself. When the /proc filesystem is
345 mounted, /proc/self/exe always points to the currently running
346 executable. If you haven't got /proc, set this to wherever you
347 want to run BusyBox from.
349 # These are auto-selected by other options
351 config FEATURE_SYSLOG
352 bool #No description makes it a hidden option
355 # This option is auto-selected when you select any applet which may
356 # send its output to syslog. You do not need to select it manually.
358 config FEATURE_HAVE_RPC
359 bool #No description makes it a hidden option
362 # This is automatically selected if any of enabled applets need it.
363 # You do not need to select it manually.
365 comment 'Build Options'
368 bool "Build BusyBox as a static binary (no shared libs)"
371 If you want to build a static BusyBox binary, which does not
372 use or require any shared libraries, then enable this option.
373 This can cause BusyBox to be considerably larger, so you should
374 leave this option false unless you have a good reason (i.e.
375 your target platform does not support shared libraries, or
376 you are building an initrd which doesn't need anything but
379 Most people will leave this set to 'N'.
382 bool "Build BusyBox as a position independent executable"
386 Hardened code option. PIE binaries are loaded at a different
387 address at each invocation. This has some overhead,
388 particularly on x86-32 which is short on registers.
390 Most people will leave this set to 'N'.
393 bool "Force NOMMU build"
396 Busybox tries to detect whether architecture it is being
397 built against supports MMU or not. If this detection fails,
398 or if you want to build NOMMU version of busybox for testing,
399 you may force NOMMU build here.
401 Most people will leave this set to 'N'.
403 # PIE can be made to work with BUILD_LIBBUSYBOX, but currently
404 # build system does not support that
405 config BUILD_LIBBUSYBOX
406 bool "Build shared libbusybox"
408 depends on !FEATURE_PREFER_APPLETS && !PIE && !STATIC
410 Build a shared library libbusybox.so.N.N.N which contains all
413 This feature allows every applet to be built as a tiny
414 separate executable. Enabling it for "one big busybox binary"
415 approach serves no purpose and increases code size.
416 You should almost certainly say "no" to this.
418 ### config FEATURE_FULL_LIBBUSYBOX
419 ### bool "Feature-complete libbusybox"
420 ### default n if !FEATURE_SHARED_BUSYBOX
421 ### depends on BUILD_LIBBUSYBOX
423 ### Build a libbusybox with the complete feature-set, disregarding
424 ### the actually selected config.
426 ### Normally, libbusybox will only contain the features which are
427 ### used by busybox itself. If you plan to write a separate
428 ### standalone application which uses libbusybox say 'Y'.
430 ### Note: libbusybox is GPL, not LGPL, and exports no stable API that
431 ### might act as a copyright barrier. We can and will modify the
432 ### exported function set between releases (even minor version number
433 ### changes), and happily break out-of-tree features.
435 ### Say 'N' if in doubt.
437 config FEATURE_INDIVIDUAL
438 bool "Produce a binary for each applet, linked against libbusybox"
440 depends on BUILD_LIBBUSYBOX
442 If your CPU architecture doesn't allow for sharing text/rodata
443 sections of running binaries, but allows for runtime dynamic
444 libraries, this option will allow you to reduce memory footprint
445 when you have many different applets running at once.
447 If your CPU architecture allows for sharing text/rodata,
448 having single binary is more optimal.
450 Each applet will be a tiny program, dynamically linked
451 against libbusybox.so.N.N.N.
453 You need to have a working dynamic linker.
455 config FEATURE_SHARED_BUSYBOX
456 bool "Produce additional busybox binary linked against libbusybox"
458 depends on BUILD_LIBBUSYBOX
460 Build busybox, dynamically linked against libbusybox.so.N.N.N.
462 You need to have a working dynamic linker.
464 ### config BUILD_AT_ONCE
465 ### bool "Compile all sources at once"
468 ### Normally each source-file is compiled with one invocation of
470 ### If you set this option, all sources are compiled at once.
471 ### This gives the compiler more opportunities to optimize which can
472 ### result in smaller and/or faster binaries.
474 ### Setting this option will consume alot of memory, e.g. if you
475 ### enable all applets with all features, gcc uses more than 300MB
476 ### RAM during compilation of busybox.
478 ### This option is most likely only beneficial for newer compilers
479 ### such as gcc-4.1 and above.
481 ### Say 'N' unless you know what you are doing.
484 bool "Build with Large File Support (for accessing files > 2 GB)"
487 If you want to build BusyBox with large file support, then enable
488 this option. This will have no effect if your kernel or your C
489 library lacks large file support for large files. Some of the
490 programs that can benefit from large file support include dd, gzip,
491 cp, mount, tar, and many others. If you want to access files larger
492 than 2 Gigabytes, enable this option. Otherwise, leave it set to 'N'.
494 config CROSS_COMPILER_PREFIX
495 string "Cross Compiler prefix"
498 If you want to build BusyBox with a cross compiler, then you
499 will need to set this to the cross-compiler prefix, for example,
502 Note that CROSS_COMPILE environment variable or
503 "make CROSS_COMPILE=xxx ..." will override this selection.
505 Native builds leave this empty.
508 string "Path to sysroot"
511 If you want to build BusyBox with a cross compiler, then you
512 might also need to specify where /usr/include and /usr/lib
515 For example, BusyBox can be built against an installed
516 Android NDK, platform version 9, for ARM ABI with
518 CONFIG_SYSROOT=/opt/android-ndk/platforms/android-9/arch-arm
520 Native builds leave this empty.
523 string "Additional CFLAGS"
526 Additional CFLAGS to pass to the compiler verbatim.
529 string "Additional LDFLAGS"
532 Additional LDFLAGS to pass to the linker verbatim.
535 string "Additional LDLIBS"
538 Additional LDLIBS to pass to the linker with -l.
540 comment 'Installation Options ("make install" behavior)'
543 prompt "What kind of applet links to install"
544 default INSTALL_APPLET_SYMLINKS
546 Choose what kind of links to applets are created by "make install".
548 config INSTALL_APPLET_SYMLINKS
551 Install applets as soft-links to the busybox binary. This needs some
552 free inodes on the filesystem, but might help with filesystem
553 generators that can't cope with hard-links.
555 config INSTALL_APPLET_HARDLINKS
558 Install applets as hard-links to the busybox binary. This might
559 count on a filesystem with few inodes.
561 config INSTALL_APPLET_SCRIPT_WRAPPERS
562 bool "as script wrappers"
564 Install applets as script wrappers that call the busybox binary.
566 config INSTALL_APPLET_DONT
569 Do not install applet links. Useful when you plan to use
570 busybox --install for installing links, or plan to use
571 a standalone shell and thus don't need applet links.
576 prompt "/bin/sh applet link"
577 default INSTALL_SH_APPLET_SYMLINK
578 depends on INSTALL_APPLET_SCRIPT_WRAPPERS
580 Choose how you install /bin/sh applet link.
582 config INSTALL_SH_APPLET_SYMLINK
585 Install /bin/sh applet as soft-link to the busybox binary.
587 config INSTALL_SH_APPLET_HARDLINK
590 Install /bin/sh applet as hard-link to the busybox binary.
592 config INSTALL_SH_APPLET_SCRIPT_WRAPPER
593 bool "as script wrapper"
595 Install /bin/sh applet as script wrapper that calls
601 string "BusyBox installation prefix"
604 Define your directory to install BusyBox files/subdirs in.
606 comment 'Debugging Options'
609 bool "Build BusyBox with extra Debugging symbols"
612 Say Y here if you wish to examine BusyBox internals while applets are
613 running. This increases the size of the binary considerably, and
614 should only be used when doing development. If you are doing
615 development and want to debug BusyBox, answer Y.
617 Most people should answer N.
619 config DEBUG_PESSIMIZE
620 bool "Disable compiler optimizations"
624 The compiler's optimization of source code can eliminate and reorder
625 code, resulting in an executable that's hard to understand when
626 stepping through it with a debugger. This switches it off, resulting
627 in a much bigger executable that more closely matches the source
630 config DEBUG_SANITIZE
631 bool "Enable runtime sanitizers (ASAN/LSAN/USAN/etc...)"
634 Say Y here if you want to enable runtime sanitizers. These help
635 catch bad memory accesses (e.g. buffer overflows), but will make
636 the executable larger and slow down runtime a bit.
638 If you aren't developing/testing busybox, say N here.
641 bool "Build unit tests"
644 Say Y here if you want to build unit tests (both the framework and
645 test cases) as a Busybox applet. This results in bigger code, so you
646 probably don't want this option in production builds.
649 bool "Abort compilation on any warning"
652 Selecting this will add -Werror to gcc command line.
654 Most people should answer N.
657 prompt "Additional debugging library"
660 Using an additional debugging library will make BusyBox become
661 considerable larger and will cause it to run more slowly. You
662 should always leave this option disabled for production use.
666 This enables compiling with dmalloc ( http://dmalloc.com/ )
667 which is an excellent public domain mem leak and malloc problem
668 detector. To enable dmalloc, before running busybox you will
669 want to properly set your environment, for example:
670 export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile
671 The 'debug=' value is generated using the following command
672 dmalloc -p log-stats -p log-non-free -p log-bad-space \
673 -p log-elapsed-time -p check-fence -p check-heap \
674 -p check-lists -p check-blank -p check-funcs -p realloc-copy \
677 Electric-fence support:
678 -----------------------
679 This enables compiling with Electric-fence support. Electric
680 fence is another very useful malloc debugging library which uses
681 your computer's virtual memory hardware to detect illegal memory
682 accesses. This support will make BusyBox be considerable larger
683 and run slower, so you should leave this option disabled unless
684 you are hunting a hard to find memory problem.
694 bool "Electric-fence"
700 source libbb/Config.in
704 source archival/Config.in
705 source coreutils/Config.in
706 source console-tools/Config.in
707 source debianutils/Config.in
708 source editors/Config.in
709 source findutils/Config.in
710 source init/Config.in
711 source loginutils/Config.in
712 source e2fsprogs/Config.in
713 source modutils/Config.in
714 source util-linux/Config.in
715 source miscutils/Config.in
716 source networking/Config.in
717 source printutils/Config.in
718 source mailutils/Config.in
719 source procps/Config.in
720 source runit/Config.in
721 source selinux/Config.in
722 source shell/Config.in
723 source sysklogd/Config.in