3
0

Config.in 20 KB

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