blob: c516403059bc138495a1571cb117d332efaf14ac [file] [log] [blame]
Rob Landley5cf7c2d2006-02-21 06:44:43 +00001#
2# For a description of the syntax of this configuration file,
3# see scripts/kbuild/config-language.txt.
4#
5
6menu "Busybox Library Tuning"
7
Denys Vlasenkod70e0e92010-06-08 12:15:11 +02008INSERT
9
Denys Vlasenko24860fa2016-11-24 22:30:52 +010010choice
11 prompt "Buffer allocation policy"
12 default FEATURE_BUFFERS_USE_MALLOC
13 help
14 There are 3 ways BusyBox can handle buffer allocations:
15 - Use malloc. This costs code size for the call to xmalloc.
16 - Put them on stack. For some very small machines with limited stack
17 space, this can be deadly. For most folks, this works just fine.
18 - Put them in BSS. This works beautifully for computers with a real
19 MMU (and OS support), but wastes runtime RAM for uCLinux. This
20 behavior was the only one available for BusyBox versions 0.48 and
21 earlier.
22
23config FEATURE_BUFFERS_USE_MALLOC
24 bool "Allocate with Malloc"
25
26config FEATURE_BUFFERS_GO_ON_STACK
27 bool "Allocate on the Stack"
28
29config FEATURE_BUFFERS_GO_IN_BSS
30 bool "Allocate in the .bss section"
31
32endchoice
33
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000034config PASSWORD_MINLEN
"Robert P. J. Day"087b9d62006-07-02 18:35:39 +000035 int "Minimum password length"
36 default 6
37 range 5 32
38 help
39 Minimum allowable password length.
40
Denys Vlasenko522041e2011-09-10 13:25:57 +020041config MD5_SMALL
Denys Vlasenko7e7e08f2009-07-06 23:24:20 +020042 int "MD5: Trade bytes for speed (0:fast, 3:slow)"
Denys Vlasenkodb700332015-10-25 20:36:03 +010043 default 1 # all "fast or small" options default to small
Rob Landley5cf7c2d2006-02-21 06:44:43 +000044 range 0 3
45 help
46 Trade binary size versus speed for the md5sum algorithm.
47 Approximate values running uClibc and hashing
48 linux-2.4.4.tar.bz2 were:
49 user times (sec) text size (386)
50 0 (fastest) 1.1 6144
51 1 1.4 5392
52 2 3.0 5088
53 3 (smallest) 5.1 4912
54
Denys Vlasenko30a86522013-01-15 01:12:26 +010055config SHA3_SMALL
56 int "SHA3: Trade bytes for speed (0:fast, 1:slow)"
Denys Vlasenkodb700332015-10-25 20:36:03 +010057 default 1 # all "fast or small" options default to small
Denys Vlasenko30a86522013-01-15 01:12:26 +010058 range 0 1
59 help
60 Trade binary size versus speed for the sha3sum algorithm.
61 SHA3_SMALL=0 compared to SHA3_SMALL=1 (approximate):
62 64-bit x86: +270 bytes of code, 45% faster
63 32-bit x86: +450 bytes of code, 75% faster
64
Denis Vlasenko3afac4c2007-06-19 13:46:24 +000065config FEATURE_FAST_TOP
66 bool "Faster /proc scanning code (+100 bytes)"
Denys Vlasenkodb700332015-10-25 20:36:03 +010067 default n # all "fast or small" options default to small
Denis Vlasenko3afac4c2007-06-19 13:46:24 +000068 help
69 This option makes top (and ps) ~20% faster (or 20% less CPU hungry),
70 but code size is slightly bigger.
71
Denis Vlasenkoa61cb922007-06-19 11:24:47 +000072config FEATURE_ETC_NETWORKS
Denys Vlasenkof5604222017-01-10 14:58:54 +010073 bool "Support /etc/networks"
Denis Vlasenkoa61cb922007-06-19 11:24:47 +000074 default n
75 help
76 Enable support for network names in /etc/networks. This is
77 a rarely used feature which allows you to use names
78 instead of IP/mask pairs in route command.
79
Denis Vlasenko38f63192007-01-22 09:03:07 +000080config FEATURE_EDITING
81 bool "Command line editing"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +020082 default y
Denis Vlasenko38f63192007-01-22 09:03:07 +000083 help
Denis Vlasenkoe8a07882007-06-10 15:08:44 +000084 Enable line editing (mainly for shell command line).
85
86config FEATURE_EDITING_MAX_LEN
87 int "Maximum length of input"
88 range 128 8192
89 default 1024
90 depends on FEATURE_EDITING
91 help
92 Line editing code uses on-stack buffers for storage.
93 You may want to decrease this parameter if your target machine
94 benefits from smaller stack usage.
Denis Vlasenko38f63192007-01-22 09:03:07 +000095
Denis Vlasenko38f63192007-01-22 09:03:07 +000096config FEATURE_EDITING_VI
97 bool "vi-style line editing commands"
98 default n
99 depends on FEATURE_EDITING
100 help
Bernhard Reutner-Fischer3e8669f2008-07-22 18:27:53 +0000101 Enable vi-style line editing. In shells, this mode can be
Denis Vlasenko38f63192007-01-22 09:03:07 +0000102 turned on and off with "set -o vi" and "set +o vi".
103
104config FEATURE_EDITING_HISTORY
105 int "History size"
Denys Vlasenko2c4de5b2011-03-31 13:16:52 +0200106 # Don't allow way too big values here, code uses fixed "char *history[N]" struct member
107 range 0 9999
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200108 default 255
Denis Vlasenko38f63192007-01-22 09:03:07 +0000109 depends on FEATURE_EDITING
110 help
Denys Vlasenko2c4de5b2011-03-31 13:16:52 +0200111 Specify command history size (0 - disable).
Denis Vlasenko38f63192007-01-22 09:03:07 +0000112
113config FEATURE_EDITING_SAVEHISTORY
114 bool "History saving"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200115 default y
Denys Vlasenko99862cb2010-09-12 17:34:13 +0200116 depends on FEATURE_EDITING
Denis Vlasenko38f63192007-01-22 09:03:07 +0000117 help
Denys Vlasenko99862cb2010-09-12 17:34:13 +0200118 Enable history saving in shells.
Denis Vlasenko38f63192007-01-22 09:03:07 +0000119
Denys Vlasenkobede2152011-09-04 16:12:33 +0200120config FEATURE_EDITING_SAVE_ON_EXIT
121 bool "Save history on shell exit, not after every command"
122 default n
123 depends on FEATURE_EDITING_SAVEHISTORY
124 help
125 Save history on shell exit, not after every command.
126
Denys Vlasenkoa669eca2011-07-11 07:36:59 +0200127config FEATURE_REVERSE_SEARCH
128 bool "Reverse history search"
129 default y
Denys Vlasenkofe0dc342015-10-30 21:39:19 +0100130 depends on FEATURE_EDITING
Denys Vlasenkoa669eca2011-07-11 07:36:59 +0200131 help
132 Enable readline-like Ctrl-R combination for reverse history search.
133 Increases code by about 0.5k.
134
Denis Vlasenko38f63192007-01-22 09:03:07 +0000135config FEATURE_TAB_COMPLETION
136 bool "Tab completion"
Denys Vlasenko2f32bf82010-06-06 04:14:28 +0200137 default y
Denis Vlasenko38f63192007-01-22 09:03:07 +0000138 depends on FEATURE_EDITING
Denis Vlasenko38f63192007-01-22 09:03:07 +0000139
140config FEATURE_USERNAME_COMPLETION
141 bool "Username completion"
Denys Vlasenko1afa4942016-12-23 13:40:24 +0100142 default y
Denis Vlasenko38f63192007-01-22 09:03:07 +0000143 depends on FEATURE_TAB_COMPLETION
Denis Vlasenko38f63192007-01-22 09:03:07 +0000144
145config FEATURE_EDITING_FANCY_PROMPT
146 bool "Fancy shell prompts"
Denys Vlasenko5d26df62010-07-16 15:31:38 +0200147 default y
Denis Vlasenko38f63192007-01-22 09:03:07 +0000148 depends on FEATURE_EDITING
149 help
150 Setting this option allows for prompts to use things like \w and
151 \$ and escape codes.
152
Denys Vlasenko020f4062009-05-17 16:44:54 +0200153config FEATURE_EDITING_ASK_TERMINAL
154 bool "Query cursor position from terminal"
155 default n
156 depends on FEATURE_EDITING
157 help
158 Allow usage of "ESC [ 6 n" sequence. Terminal answers back with
159 current cursor position. This information is used to make line
160 editing more robust in some cases.
161 If you are not sure whether your terminals respond to this code
Denys Vlasenkod83bbf42009-10-27 10:47:49 +0100162 correctly, or want to save on code size (about 400 bytes),
Denys Vlasenko020f4062009-05-17 16:44:54 +0200163 then do not turn this option on.
164
Denys Vlasenko12559252016-11-24 22:18:55 +0100165config LOCALE_SUPPORT
166 bool "Enable locale support (system needs locale for this to work)"
167 default n
168 help
169 Enable this if your system has locale support and you would like
170 busybox to support locale settings.
171
172config UNICODE_SUPPORT
173 bool "Support Unicode"
174 default y
175 help
176 This makes various applets aware that one byte is not
177 one character on screen.
178
179 Busybox aims to eventually work correctly with Unicode displays.
180 Any older encodings are not guaranteed to work.
181 Probably by the time when busybox will be fully Unicode-clean,
182 other encodings will be mainly of historic interest.
183
184config UNICODE_USING_LOCALE
185 bool "Use libc routines for Unicode (else uses internal ones)"
186 default n
187 depends on UNICODE_SUPPORT && LOCALE_SUPPORT
188 help
189 With this option on, Unicode support is implemented using libc
190 routines. Otherwise, internal implementation is used.
191 Internal implementation is smaller.
192
193config FEATURE_CHECK_UNICODE_IN_ENV
194 bool "Check $LC_ALL, $LC_CTYPE and $LANG environment variables"
195 default n
196 depends on UNICODE_SUPPORT && !UNICODE_USING_LOCALE
197 help
198 With this option on, Unicode support is activated
199 only if locale-related variables have the value of the form
200 "xxxx.utf8"
201
202 Otherwise, Unicode support will be always enabled and active.
203
204config SUBST_WCHAR
205 int "Character code to substitute unprintable characters with"
206 depends on UNICODE_SUPPORT
207 default 63
208 help
209 Typical values are 63 for '?' (works with any output device),
210 30 for ASCII substitute control code,
211 65533 (0xfffd) for Unicode replacement character.
212
213config LAST_SUPPORTED_WCHAR
214 int "Range of supported Unicode characters"
215 depends on UNICODE_SUPPORT
216 default 767
217 help
218 Any character with Unicode value bigger than this is assumed
219 to be non-printable on output device. Many applets replace
220 such characters with substitution character.
221
222 The idea is that many valid printable Unicode chars
223 nevertheless are not displayed correctly. Think about
224 combining charachers, double-wide hieroglyphs, obscure
225 characters in dozens of ancient scripts...
226 Many terminals, terminal emulators, xterms etc will fail
227 to handle them correctly. Choose the smallest value
228 which suits your needs.
229
230 Typical values are:
231 126 - ASCII only
232 767 (0x2ff) - there are no combining chars in [0..767] range
233 (the range includes Latin 1, Latin Ext. A and B),
234 code is ~700 bytes smaller for this case.
235 4351 (0x10ff) - there are no double-wide chars in [0..4351] range,
236 code is ~300 bytes smaller for this case.
237 12799 (0x31ff) - nearly all non-ideographic characters are
238 available in [0..12799] range, including
239 East Asian scripts like katakana, hiragana, hangul,
240 bopomofo...
241 0 - off, any valid printable Unicode character will be printed.
242
243config UNICODE_COMBINING_WCHARS
244 bool "Allow zero-width Unicode characters on output"
245 default n
246 depends on UNICODE_SUPPORT
247 help
248 With this option off, any Unicode char with width of 0
249 is substituted on output.
250
251config UNICODE_WIDE_WCHARS
252 bool "Allow wide Unicode characters on output"
253 default n
254 depends on UNICODE_SUPPORT
255 help
256 With this option off, any Unicode char with width > 1
257 is substituted on output.
258
259config UNICODE_BIDI_SUPPORT
260 bool "Bidirectional character-aware line input"
261 default n
262 depends on UNICODE_SUPPORT && !UNICODE_USING_LOCALE
263 help
264 With this option on, right-to-left Unicode characters
265 are treated differently on input (e.g. cursor movement).
266
267config UNICODE_NEUTRAL_TABLE
268 bool "In bidi input, support non-ASCII neutral chars too"
269 default n
270 depends on UNICODE_BIDI_SUPPORT
271 help
272 In most cases it's enough to treat only ASCII non-letters
273 (i.e. punctuation, numbers and space) as characters
274 with neutral directionality.
275 With this option on, more extensive (and bigger) table
276 of neutral chars will be used.
277
278config UNICODE_PRESERVE_BROKEN
279 bool "Make it possible to enter sequences of chars which are not Unicode"
280 default n
281 depends on UNICODE_SUPPORT
282 help
283 With this option on, on line-editing input (such as used by shells)
284 invalid UTF-8 bytes are not substituted with the selected
285 substitution character.
286 For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
287 at shell prompt will list file named 0xff (single char name
288 with char value 255), not file named '?'.
289
Denys Vlasenko2d7b5bf2009-07-05 12:49:29 +0200290config FEATURE_NON_POSIX_CP
291 bool "Non-POSIX, but safer, copying to special nodes"
292 default y
293 help
294 With this option, "cp file symlink" will delete symlink
295 and create a regular file. This does not conform to POSIX,
296 but prevents a symlink attack.
297 Similarly, "cp file device" will not send file's data
Denys Vlasenko2753aae2010-12-30 01:17:03 +0100298 to the device. (To do that, use "cat file >device")
Denys Vlasenko2d7b5bf2009-07-05 12:49:29 +0200299
Denis Vlasenkod5fe8802008-02-13 16:52:00 +0000300config FEATURE_VERBOSE_CP_MESSAGE
301 bool "Give more precise messages when copy fails (cp, mv etc)"
302 default n
303 help
304 Error messages with this feature enabled:
305 $ cp file /does_not_exist/file
306 cp: cannot create '/does_not_exist/file': Path does not exist
307 $ cp file /vmlinuz/file
308 cp: cannot stat '/vmlinuz/file': Path has non-directory component
309 If this feature is not enabled, they will be, respectively:
Denys Vlasenkoa68bd4b2009-10-14 11:52:01 +0200310 cp: cannot create '/does_not_exist/file': No such file or directory
Denis Vlasenkod5fe8802008-02-13 16:52:00 +0000311 cp: cannot stat '/vmlinuz/file': Not a directory
Denis Vlasenkod5fe8802008-02-13 16:52:00 +0000312 This will cost you ~60 bytes.
313
Denys Vlasenko12559252016-11-24 22:18:55 +0100314config FEATURE_USE_SENDFILE
315 bool "Use sendfile system call"
316 default y
317 select PLATFORM_LINUX
318 help
319 When enabled, busybox will use the kernel sendfile() function
320 instead of read/write loops to copy data between file descriptors
321 (for example, cp command does this a lot).
322 If sendfile() doesn't work, copying code falls back to read/write
323 loop. sendfile() was originally implemented for faster I/O
324 from files to sockets, but since Linux 2.6.33 it was extended
325 to work for many more file types.
326
Denis Vlasenko4c139222007-12-02 03:27:42 +0000327config FEATURE_COPYBUF_KB
328 int "Copy buffer size, in kilobytes"
329 range 1 1024
330 default 4
331 help
Denys Vlasenkodf4e16c2011-02-10 06:29:06 +0100332 Size of buffer used by cp, mv, install, wget etc.
Denis Vlasenko4c139222007-12-02 03:27:42 +0000333 Buffers which are 4 kb or less will be allocated on stack.
334 Bigger buffers will be allocated with mmap, with fallback to 4 kb
335 stack buffer if mmap fails.
336
Lauri Kasanen55ae0e92011-01-31 06:27:35 +0100337config FEATURE_SKIP_ROOTFS
338 bool "Skip rootfs in mount table"
339 default y
340 help
341 Ignore rootfs entry in mount table.
342
343 In Linux, kernel has a special filesystem, rootfs, which is initially
344 mounted on /. It contains initramfs data, if kernel is configured
345 to have one. Usually, another file system is mounted over / early
346 in boot process, and therefore most tools which manipulate
347 mount table, such as df, will skip rootfs entry.
348
349 However, some systems do not mount anything on /.
350 If you need to configure busybox for one of these systems,
Bernhard Reutner-Fischer74b871f2011-06-15 21:00:18 +0200351 you may find it useful to turn this option off to make df show
352 initramfs statistics.
Lauri Kasanen55ae0e92011-01-31 06:27:35 +0100353
354 Otherwise, choose Y.
355
Denis Vlasenko459be352007-06-17 19:09:05 +0000356config MONOTONIC_SYSCALL
357 bool "Use clock_gettime(CLOCK_MONOTONIC) syscall"
Denys Vlasenkodb700332015-10-25 20:36:03 +0100358 default y
Denys Vlasenkoe3b1a1f2011-02-26 22:24:08 +0100359 select PLATFORM_LINUX
Denis Vlasenko459be352007-06-17 19:09:05 +0000360 help
361 Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring
362 time intervals (time, ping, traceroute etc need this).
363 Probably requires Linux 2.6+. If not selected, gettimeofday
364 will be used instead (which gives wrong results if date/time
365 is reset).
366
Denis Vlasenkofb79a2e2007-07-14 22:07:14 +0000367config IOCTL_HEX2STR_ERROR
368 bool "Use ioctl names rather than hex values in error messages"
369 default y
370 help
371 Use ioctl names rather than hex values in error messages
372 (e.g. VT_DISALLOCATE rather than 0x5608). If disabled this
373 saves about 1400 bytes.
Bernhard Reutner-Fischerf3b778a2008-05-16 16:10:31 +0000374
375config FEATURE_HWIB
376 bool "Support infiniband HW"
377 default y
378 help
379 Support for printing infiniband addresses in
380 network applets.
Denys Vlasenkobcbd37d2009-06-18 13:23:58 +0200381
Rob Landley5cf7c2d2006-02-21 06:44:43 +0000382endmenu