Config.src 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. #
  2. # For a description of the syntax of this configuration file,
  3. # see docs/Kconfig-language.txt.
  4. #
  5. comment "Library Tuning"
  6. INSERT
  7. choice
  8. prompt "Buffer allocation policy"
  9. default FEATURE_BUFFERS_USE_MALLOC
  10. help
  11. There are 3 ways busybox can handle buffer allocations:
  12. - Use malloc. This costs code size for the call to xmalloc.
  13. - Put them on stack. For some very small machines with limited stack
  14. space, this can be deadly. For most folks, this works just fine.
  15. - Put them in BSS. This works beautifully for computers with a real
  16. MMU (and OS support), but wastes runtime RAM for uCLinux. This
  17. behavior was the only one available for versions 0.48 and earlier.
  18. config FEATURE_BUFFERS_USE_MALLOC
  19. bool "Allocate with Malloc"
  20. config FEATURE_BUFFERS_GO_ON_STACK
  21. bool "Allocate on the Stack"
  22. config FEATURE_BUFFERS_GO_IN_BSS
  23. bool "Allocate in the .bss section"
  24. endchoice
  25. config PASSWORD_MINLEN
  26. int "Minimum password length"
  27. default 6
  28. range 5 32
  29. help
  30. Minimum allowable password length.
  31. config MD5_SMALL
  32. int "MD5: Trade bytes for speed (0:fast, 3:slow)"
  33. default 1 # all "fast or small" options default to small
  34. range 0 3
  35. help
  36. Trade binary size versus speed for the md5 algorithm.
  37. Approximate values running uClibc and hashing
  38. linux-2.4.4.tar.bz2 were:
  39. value user times (sec) text size (386)
  40. 0 (fastest) 1.1 6144
  41. 1 1.4 5392
  42. 2 3.0 5088
  43. 3 (smallest) 5.1 4912
  44. config SHA1_SMALL
  45. int "SHA1: Trade bytes for speed (0:fast, 3:slow)"
  46. default 3 # all "fast or small" options default to small
  47. range 0 3
  48. help
  49. Trade binary size versus speed for the sha1 algorithm.
  50. With FEATURE_COPYBUF_KB=64:
  51. throughput MB/s size of sha1_process_block64
  52. value 486 x86-64 486 x86-64
  53. 0 440 485 3481 3502
  54. 1 265 265 641 696
  55. 2,3 220 210 342 364
  56. config SHA1_HWACCEL
  57. bool "SHA1: Use hardware accelerated instructions if possible"
  58. default y
  59. help
  60. On x86, this adds ~590 bytes of code. Throughput
  61. is about twice as fast as fully-unrolled generic code.
  62. config SHA256_HWACCEL
  63. bool "SHA256: Use hardware accelerated instructions if possible"
  64. default y
  65. help
  66. On x86, this adds ~1k bytes of code.
  67. config SHA3_SMALL
  68. int "SHA3: Trade bytes for speed (0:fast, 1:slow)"
  69. default 1 # all "fast or small" options default to small
  70. range 0 1
  71. help
  72. Trade binary size versus speed for the sha3 algorithm.
  73. SHA3_SMALL=0 compared to SHA3_SMALL=1 (approximate):
  74. 64-bit x86: +270 bytes of code, 45% faster
  75. 32-bit x86: +450 bytes of code, 75% faster
  76. config FEATURE_NON_POSIX_CP
  77. bool "Non-POSIX, but safer, copying to special nodes"
  78. default y
  79. help
  80. With this option, "cp file symlink" will delete symlink
  81. and create a regular file. This does not conform to POSIX,
  82. but prevents a symlink attack.
  83. Similarly, "cp file device" will not send file's data
  84. to the device. (To do that, use "cat file >device")
  85. config FEATURE_VERBOSE_CP_MESSAGE
  86. bool "Give more precise messages when copy fails (cp, mv etc)"
  87. default n
  88. help
  89. Error messages with this feature enabled:
  90. $ cp file /does_not_exist/file
  91. cp: cannot create '/does_not_exist/file': Path does not exist
  92. $ cp file /vmlinuz/file
  93. cp: cannot stat '/vmlinuz/file': Path has non-directory component
  94. If this feature is not enabled, they will be, respectively:
  95. cp: cannot create '/does_not_exist/file': No such file or directory
  96. cp: cannot stat '/vmlinuz/file': Not a directory
  97. This will cost you ~60 bytes.
  98. config FEATURE_USE_SENDFILE
  99. bool "Use sendfile system call"
  100. default y
  101. help
  102. When enabled, busybox will use the kernel sendfile() function
  103. instead of read/write loops to copy data between file descriptors
  104. (for example, cp command does this a lot).
  105. If sendfile() doesn't work, copying code falls back to read/write
  106. loop. sendfile() was originally implemented for faster I/O
  107. from files to sockets, but since Linux 2.6.33 it was extended
  108. to work for many more file types.
  109. config FEATURE_COPYBUF_KB
  110. int "Copy buffer size, in kilobytes"
  111. range 1 1024
  112. default 4
  113. help
  114. Size of buffer used by cp, mv, install, wget etc.
  115. Buffers which are 4 kb or less will be allocated on stack.
  116. Bigger buffers will be allocated with mmap, with fallback to 4 kb
  117. stack buffer if mmap fails.
  118. config MONOTONIC_SYSCALL
  119. bool "Use clock_gettime(CLOCK_MONOTONIC) syscall"
  120. default y
  121. help
  122. Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring
  123. time intervals (time, ping, traceroute etc need this).
  124. Probably requires Linux 2.6+. If not selected, gettimeofday
  125. will be used instead (which gives wrong results if date/time
  126. is reset).
  127. config IOCTL_HEX2STR_ERROR
  128. bool "Use ioctl names rather than hex values in error messages"
  129. default y
  130. help
  131. Use ioctl names rather than hex values in error messages
  132. (e.g. VT_DISALLOCATE rather than 0x5608). If disabled this
  133. saves about 1400 bytes.
  134. config FEATURE_EDITING
  135. bool "Command line editing"
  136. default y
  137. help
  138. Enable line editing (mainly for shell command line).
  139. config FEATURE_EDITING_MAX_LEN
  140. int "Maximum length of input"
  141. range 128 8192
  142. default 1024
  143. depends on FEATURE_EDITING
  144. help
  145. Line editing code uses on-stack buffers for storage.
  146. You may want to decrease this parameter if your target machine
  147. benefits from smaller stack usage.
  148. config FEATURE_EDITING_VI
  149. bool "vi-style line editing commands"
  150. default n
  151. depends on FEATURE_EDITING
  152. help
  153. Enable vi-style line editing. In shells, this mode can be
  154. turned on and off with "set -o vi" and "set +o vi".
  155. config FEATURE_EDITING_HISTORY
  156. int "History size"
  157. # Don't allow way too big values here, code uses fixed "char *history[N]" struct member
  158. range 0 9999
  159. default 255
  160. depends on FEATURE_EDITING
  161. help
  162. Specify command history size (0 - disable).
  163. config FEATURE_EDITING_SAVEHISTORY
  164. bool "History saving"
  165. default y
  166. depends on FEATURE_EDITING
  167. help
  168. Enable history saving in shells.
  169. config FEATURE_EDITING_SAVE_ON_EXIT
  170. bool "Save history on shell exit, not after every command"
  171. default n
  172. depends on FEATURE_EDITING_SAVEHISTORY
  173. help
  174. Save history on shell exit, not after every command.
  175. config FEATURE_REVERSE_SEARCH
  176. bool "Reverse history search"
  177. default y
  178. depends on FEATURE_EDITING
  179. help
  180. Enable readline-like Ctrl-R combination for reverse history search.
  181. Increases code by about 0.5k.
  182. config FEATURE_TAB_COMPLETION
  183. bool "Tab completion"
  184. default y
  185. depends on FEATURE_EDITING
  186. config FEATURE_USERNAME_COMPLETION
  187. bool "Username completion"
  188. default y
  189. depends on FEATURE_TAB_COMPLETION
  190. config FEATURE_EDITING_FANCY_PROMPT
  191. bool "Fancy shell prompts"
  192. default y
  193. depends on FEATURE_EDITING
  194. help
  195. Setting this option allows for prompts to use things like \w and
  196. \$ and escape codes.
  197. config FEATURE_EDITING_WINCH
  198. bool "Enable automatic tracking of window size changes"
  199. default y
  200. depends on FEATURE_EDITING
  201. config FEATURE_EDITING_ASK_TERMINAL
  202. bool "Query cursor position from terminal"
  203. default n
  204. depends on FEATURE_EDITING
  205. help
  206. Allow usage of "ESC [ 6 n" sequence. Terminal answers back with
  207. current cursor position. This information is used to make line
  208. editing more robust in some cases.
  209. If you are not sure whether your terminals respond to this code
  210. correctly, or want to save on code size (about 400 bytes),
  211. then do not turn this option on.
  212. config LOCALE_SUPPORT
  213. bool "Enable locale support (system needs locale for this to work)"
  214. default n
  215. help
  216. Enable this if your system has locale support and you would like
  217. busybox to support locale settings.
  218. config UNICODE_SUPPORT
  219. bool "Support Unicode"
  220. default y
  221. help
  222. This makes various applets aware that one byte is not
  223. one character on screen.
  224. Busybox aims to eventually work correctly with Unicode displays.
  225. Any older encodings are not guaranteed to work.
  226. Probably by the time when busybox will be fully Unicode-clean,
  227. other encodings will be mainly of historic interest.
  228. config UNICODE_USING_LOCALE
  229. bool "Use libc routines for Unicode (else uses internal ones)"
  230. default n
  231. depends on UNICODE_SUPPORT && LOCALE_SUPPORT
  232. help
  233. With this option on, Unicode support is implemented using libc
  234. routines. Otherwise, internal implementation is used.
  235. Internal implementation is smaller.
  236. config FEATURE_CHECK_UNICODE_IN_ENV
  237. bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables"
  238. default n
  239. depends on UNICODE_SUPPORT && !UNICODE_USING_LOCALE
  240. help
  241. With this option on, Unicode support is activated
  242. only if locale-related variables have the value of the form
  243. "xxxx.utf8"
  244. Otherwise, Unicode support will be always enabled and active.
  245. config SUBST_WCHAR
  246. int "Character code to substitute unprintable characters with"
  247. depends on UNICODE_SUPPORT
  248. default 63
  249. help
  250. Typical values are 63 for '?' (works with any output device),
  251. 30 for ASCII substitute control code,
  252. 65533 (0xfffd) for Unicode replacement character.
  253. config LAST_SUPPORTED_WCHAR
  254. int "Range of supported Unicode characters"
  255. depends on UNICODE_SUPPORT
  256. default 767
  257. help
  258. Any character with Unicode value bigger than this is assumed
  259. to be non-printable on output device. Many applets replace
  260. such characters with substitution character.
  261. The idea is that many valid printable Unicode chars
  262. nevertheless are not displayed correctly. Think about
  263. combining charachers, double-wide hieroglyphs, obscure
  264. characters in dozens of ancient scripts...
  265. Many terminals, terminal emulators, xterms etc will fail
  266. to handle them correctly. Choose the smallest value
  267. which suits your needs.
  268. Typical values are:
  269. 126 - ASCII only
  270. 767 (0x2ff) - there are no combining chars in [0..767] range
  271. (the range includes Latin 1, Latin Ext. A and B),
  272. code is ~700 bytes smaller for this case.
  273. 4351 (0x10ff) - there are no double-wide chars in [0..4351] range,
  274. code is ~300 bytes smaller for this case.
  275. 12799 (0x31ff) - nearly all non-ideographic characters are
  276. available in [0..12799] range, including
  277. East Asian scripts like katakana, hiragana, hangul,
  278. bopomofo...
  279. 0 - off, any valid printable Unicode character will be printed.
  280. config UNICODE_COMBINING_WCHARS
  281. bool "Allow zero-width Unicode characters on output"
  282. default n
  283. depends on UNICODE_SUPPORT
  284. help
  285. With this option off, any Unicode char with width of 0
  286. is substituted on output.
  287. config UNICODE_WIDE_WCHARS
  288. bool "Allow wide Unicode characters on output"
  289. default n
  290. depends on UNICODE_SUPPORT
  291. help
  292. With this option off, any Unicode char with width > 1
  293. is substituted on output.
  294. config UNICODE_BIDI_SUPPORT
  295. bool "Bidirectional character-aware line input"
  296. default n
  297. depends on UNICODE_SUPPORT && !UNICODE_USING_LOCALE
  298. help
  299. With this option on, right-to-left Unicode characters
  300. are treated differently on input (e.g. cursor movement).
  301. config UNICODE_NEUTRAL_TABLE
  302. bool "In bidi input, support non-ASCII neutral chars too"
  303. default n
  304. depends on UNICODE_BIDI_SUPPORT
  305. help
  306. In most cases it's enough to treat only ASCII non-letters
  307. (i.e. punctuation, numbers and space) as characters
  308. with neutral directionality.
  309. With this option on, more extensive (and bigger) table
  310. of neutral chars will be used.
  311. config UNICODE_PRESERVE_BROKEN
  312. bool "Make it possible to enter sequences of chars which are not Unicode"
  313. default n
  314. depends on UNICODE_SUPPORT
  315. help
  316. With this option on, on line-editing input (such as used by shells)
  317. invalid UTF-8 bytes are not substituted with the selected
  318. substitution character.
  319. For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
  320. at shell prompt will list file named 0xff (single char name
  321. with char value 255), not file named '?'.
  322. choice
  323. prompt "Use LOOP_CONFIGURE for losetup and loop mounts"
  324. default TRY_LOOP_CONFIGURE
  325. help
  326. LOOP_CONFIGURE is added to Linux 5.8
  327. https://lwn.net/Articles/820408/
  328. This allows userspace to completely setup a loop device with a single
  329. ioctl, removing the in-between state where the device can be partially
  330. configured - eg the loop device has a backing file associated with it,
  331. but is reading from the wrong offset.
  332. config LOOP_CONFIGURE
  333. bool "use LOOP_CONFIGURE, needs kernel >= 5.8"
  334. config NO_LOOP_CONFIGURE
  335. bool "use LOOP_SET_FD + LOOP_SET_STATUS"
  336. config TRY_LOOP_CONFIGURE
  337. bool "try LOOP_CONFIGURE, fall back to LOOP_SET_FD + LOOP_SET_STATUS"
  338. endchoice