1 /* vi: set sw=4 ts=4: */
2 // This file defines the feature set to be compiled into busybox.
3 // When you turn things off here, they won't be compiled in at all.
5 //// This file is parsed by sed. You MUST use single line comments.
6 // i.e., //#define BB_BLAH
9 // BusyBox Applications
27 //#define BB_DEALLOCVT
44 //#define BB_FREERAMDISK
45 //#define BB_FSCK_MINIX
74 //#define BB_MKFS_MINIX
86 //#define BB_PIVOT_ROOT
100 //#define BB_RPM2CPIO
102 //#define BB_SETKEYCODES
118 //#define BB_TRACEROUTE
119 #define BB_TRUE_FALSE
121 //#define BB_UNIX2DOS
122 //#define BB_UUENCODE
123 //#define BB_UUDECODE
131 //#define BB_WATCHDOG
138 // End of Applications List
142 // ---------------------------------------------------------
143 // This is where feature definitions go. Generally speaking,
144 // turning this stuff off makes things a bit smaller (and less
148 // If you enabled BB_SH above, you may select one of the following shells.
149 // You can only select ONE of the following shells. Sorry.
151 // lash is the very smallest shell (adds just 10k) and it is quite usable as
152 // a command prompt, but it is not suitable for any but the most trivial
153 // scripting (such as an initrd that calls insmod a few times) since it does
154 // not understand Bourne shell grammer. It does handle pipes, redirects, and
155 // job control though. Adding in command editing makes it very nice
156 // lightweight command prompt.
157 //#define BB_FEATURE_LASH
159 // hush is also quite small (just 18k) and it has very complete Bourne shell
160 // grammer. It handles if/then/else/fi just fine, but doesn't handle loops
161 // like for/do/done or case/esac and such. It also currently has a problem
163 //#define BB_FEATURE_HUSH
165 // msh: The minix shell (adds just 30k) is quite complete and handles things
166 // like for/do/done, case/esac and all the things you expect a Bourne shell to
167 // do. It is not always pedantically correct about Bourne shell grammer (try
168 // running the shell testscript "tests/sh.testcases" on it and compare vs bash)
169 // but for most things it works quite well. It also uses only vfork, so it can
170 // be used on uClinux systems. This was only recently added, so there is still
171 // room to shrink it further...
172 #define BB_FEATURE_MSH
174 // ash: This adds about 60k in the default configuration and is the most
175 // complete and most pedantically correct shell included with busybox. This
176 // shell was also recently added, and several people (mainly Vladimir and Erik)
177 // have been working on it. There are a number of configurable things at the
178 // top of ash.c as well, so check those out if you want to tweak things. The
179 // Posix math support is currently disabled (that bit of code was horrible) but
180 // will be restored for the next BusyBox release.
181 //#define BB_FEATURE_ASH
183 // BusyBox will, by default, malloc space for its buffers. This costs code
184 // size for the call to xmalloc. You can use the following feature to have
185 // them put on the stack. For some very small machines with limited stack
186 // space, this can be deadly. For most folks, this works just fine...
187 //#define BB_FEATURE_BUFFERS_GO_ON_STACK
188 // The third alternative for buffer allocation is to use BSS. This works
189 // beautifully for computers with a real MMU (and OS support), but wastes
190 // runtime RAM for uCLinux. This behavior was the only one available for
191 // BusyBox versions 0.48 and earlier.
192 //#define BB_FEATURE_BUFFERS_GO_IN_BSS
194 // Turn this on to use Erik's very cool devps, and devmtab kernel drivers,
195 // thereby eliminating the need for the /proc filesystem and thereby saving
196 // lots and lots memory for more important things. NOTE: If you enable this
197 // feature, you _must_ have patched the kernel to include the devps patch that
198 // is included in the busybox/kernel-patches directory. You will also need to
199 // create some device special files in /dev on your embedded system:
200 // mknod /dev/mtab c 10 22
201 // mknod /dev/ps c 10 21
202 // I emailed Linus and this patch will not be going into the stock kernel.
203 //#define BB_FEATURE_USE_DEVPS_PATCH
205 // show verbose usage messages
206 //#define BB_FEATURE_VERBOSE_USAGE
208 // Use termios to manipulate the screen ('more' is prettier with this on)
209 //#define BB_FEATURE_USE_TERMIOS
211 // calculate terminal & column widths (for more and ls)
212 #define BB_FEATURE_AUTOWIDTH
214 // show username/groupnames for ls
215 #define BB_FEATURE_LS_USERNAME
217 // show file timestamps in ls
218 #define BB_FEATURE_LS_TIMESTAMPS
220 // enable ls -p and -F
221 #define BB_FEATURE_LS_FILETYPES
223 // sort the file names
224 #define BB_FEATURE_LS_SORTFILES
227 #define BB_FEATURE_LS_RECURSIVE
230 #define BB_FEATURE_LS_FOLLOWLINKS
232 // Disable for a smaller (but less functional) ping
233 #define BB_FEATURE_FANCY_PING
235 // Make init use a simplified /etc/inittab file (recommended).
236 #define BB_FEATURE_USE_INITTAB
238 //Enable init being called as /linuxrc
239 #define BB_FEATURE_LINUXRC
241 //Have init enable core dumping for child processes (for debugging only)
242 //#define BB_FEATURE_INIT_COREDUMPS
244 //Make sure nothing is printed to the console on boot
245 //#define BB_FEATURE_EXTRA_QUIET
247 // enable syslogd -R remotehost
248 #define BB_FEATURE_REMOTE_LOG
251 //#define BB_FEATURE_IPC_SYSLOG
253 //Disable for a simple tail implementation (2.34k vs 3k for the full one).
254 //Both provide 'tail -f', but this cuts out -c, -q, -s, and -v.
255 #define BB_FEATURE_FANCY_TAIL
257 // Enable support for loop devices in mount
258 #define BB_FEATURE_MOUNT_LOOP
260 // Enable support for a real /etc/mtab file instead of /proc/mounts
261 //#define BB_FEATURE_MTAB_SUPPORT
263 // Enable support for mounting remote NFS volumes.
264 // You may need to mount with "-o nolock" if you are
265 // not running a local portmapper daemon...
266 //#define BB_FEATURE_NFSMOUNT
268 // Enable support forced filesystem unmounting
269 // (i.e., in case of an unreachable NFS system).
270 #define BB_FEATURE_MOUNT_FORCE
272 // Enable support for creation of tar files.
273 #define BB_FEATURE_TAR_CREATE
275 // Enable support for "--exclude" and "-X" for excluding files
276 #define BB_FEATURE_TAR_EXCLUDE
278 // Enable support for tar -z option (currently only works for inflating)
279 #define BB_FEATURE_TAR_GZIP
281 // Enable reverse sort
282 #define BB_FEATURE_SORT_REVERSE
285 #define BB_FEATURE_SORT_UNIQUE
287 // Enable command line editing in the shell.
288 // Only relevant if BB_SH is enabled. On by default.
289 #define BB_FEATURE_COMMAND_EDITING
291 // Enable tab completion in the shell. This is now working quite nicely.
292 // This feature adds a bit over 4k. Only relevant if BB_SH is enabled.
293 #define BB_FEATURE_COMMAND_TAB_COMPLETION
295 // Attempts to match usernames in a ~-prefixed path
296 //#define BB_FEATURE_COMMAND_USERNAME_COMPLETION
298 //Allow the shell to invoke all the compiled in BusyBox applets as if they
299 //were shell builtins. Nice for staticly linking an emergency rescue shell,
300 //among other things. Off by default.
301 // Only relevant if BB_SH is enabled.
302 //#define BB_FEATURE_SH_STANDALONE_SHELL
304 //When this is enabled, busybox shell applets can be called using full path
305 //names. This causes applets (i.e., most busybox commands) to override
306 //real commands on the filesystem. For example, if you run run /bin/cat, it
307 //will use BusyBox cat even if /bin/cat exists on the filesystem and is _not_
308 //busybox. Some systems want this, others do not. Choose wisely. :-) This
309 //only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled.
310 // Only relevant if BB_SH is enabled. Off by default.
311 //#define BB_FEATURE_SH_APPLETS_ALWAYS_WIN
313 // Uncomment this option for a fancy shell prompt that includes the
314 // current username and hostname. On systems that don't have usernames
315 // or hostnames, this can look hideous.
316 // Only relevant if BB_SH is enabled.
317 //#define BB_FEATURE_SH_FANCY_PROMPT
319 //Turn on extra fbset options
320 //#define BB_FEATURE_FBSET_FANCY
322 //Turn on fbset readmode support
323 //#define BB_FEATURE_FBSET_READMODE
325 // Support insmod/lsmod/rmmod for post 2.1 kernels
326 //#define BB_FEATURE_NEW_MODULE_INTERFACE
328 // Support insmod/lsmod/rmmod for pre 2.1 kernels
329 //#define BB_FEATURE_OLD_MODULE_INTERFACE
331 // Support module version checking
332 //#define BB_FEATURE_INSMOD_VERSION_CHECKING
334 // Support for uClinux memory usage optimization, which will load the image
335 // directly into the kernel memory. This divides memory requrements by three.
336 // If you are not running uClinux (i.e., your CPU has an MMU) leave this
338 //#define BB_FEATURE_INSMOD_LOADINKMEM
340 // Support for Minix filesystem, version 2
341 //#define BB_FEATURE_MINIX2
343 // Enable ifconfig status reporting output -- this feature adds 12k.
344 //#define BB_FEATURE_IFCONFIG_STATUS
346 // Enable ifconfig slip-specific options "keepalive" and "outfill"
347 //#define BB_FEATURE_IFCONFIG_SLIP
349 // Enable ifconfig options "mem_start", "io_addr", and "irq".
350 //#define BB_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
352 // Enable ifconfig option "hw". Currently works for only with "ether".
353 //#define BB_FEATURE_IFCONFIG_HW
355 // Enable busybox --install [-s]
356 // to create links (or symlinks) for all the commands that are
357 // compiled into the binary. (needs /proc filesystem)
358 //#define BB_FEATURE_INSTALLER
360 // Enable a nifty progress meter in wget (adds just under 2k)
361 #define BB_FEATURE_WGET_STATUSBAR
363 // Enable HTTP authentication in wget
364 #define BB_FEATURE_WGET_AUTHENTICATION
366 // Clean up all memory before exiting -- usually not needed
367 // as the OS can clean up... Don't enable this unless you
368 // have a really good reason for cleaning things up manually.
369 //#define BB_FEATURE_CLEAN_UP
371 // Support for human readable output by ls, du, etc.(example 13k, 23M, 235G)
372 #define BB_FEATURE_HUMAN_READABLE
374 // Support for the find -type option.
375 #define BB_FEATURE_FIND_TYPE
377 // Support for the find -perm option.
378 #define BB_FEATURE_FIND_PERM
380 // Support for the find -mtine option.
381 #define BB_FEATURE_FIND_MTIME
383 // Support for the -A -B and -C context flags in grep
384 //#define BB_FEATURE_GREP_CONTEXT
386 // Support for the EGREP applet (alias to the grep applet)
387 //#define BB_FEATURE_GREP_EGREP_ALIAS
389 // Tell tftp what commands that should be supported.
390 #define BB_FEATURE_TFTP_PUT
391 #define BB_FEATURE_TFTP_GET
394 #define BB_FEATURE_VI_COLON // ":" colon commands, no "ex" mode
395 #define BB_FEATURE_VI_YANKMARK // Yank/Put commands and Mark cmds
396 #define BB_FEATURE_VI_SEARCH // search and replace cmds
397 #define BB_FEATURE_VI_USE_SIGNALS // catch signals
398 #define BB_FEATURE_VI_DOT_CMD // remember previous cmd and "." cmd
399 #define BB_FEATURE_VI_READONLY // vi -R and "view" mode
400 #define BB_FEATURE_VI_SETOPTS // set-able options, ai ic showmatch
401 #define BB_FEATURE_VI_SET // :set
402 #define BB_FEATURE_VI_WIN_RESIZE // handle window resize
404 // Enable a if you system have setuped locale
405 //#define BB_LOCALE_SUPPORT
407 // Support for TELNET to pass TERM type to remote host. Adds 384 bytes.
408 #define BB_FEATURE_TELNET_TTYPE
410 // Support for devfs.
411 //#define BB_FEATURE_DEVFS
413 // End of Features List
420 //---------------------------------------------------
421 // Nothing beyond this point should ever be touched by
422 // mere mortals so leave this stuff alone.
424 #include <features.h>
425 #if defined __UCLIBC__ && ! defined __UCLIBC_HAS_MMU__
426 #undef BB_RPM2CPIO /* Uses gz_open(), which uses fork() */
427 #undef BB_DPKG_DEB /* Uses gz_open(), which uses fork() */
428 #undef BB_FEATURE_ASH /* Uses fork() */
429 #undef BB_FEATURE_HUSH /* Uses fork() */
430 #undef BB_FEATURE_LASH /* Uses fork() */
431 #undef BB_INIT /* Uses fork() */
432 #undef BB_FEATURE_TAR_GZIP /* Uses fork() */
433 #undef BB_SYSLOGD /* Uses daemon() */
434 #undef BB_KLOGD /* Uses daemon() */
435 #undef BB_UPDATE /* Uses daemon() */
438 #if defined BB_FEATURE_COMMAND_EDITING
441 #undef BB_FEATURE_COMMAND_EDITING
442 #undef BB_FEATURE_COMMAND_TAB_COMPLETION
443 #undef BB_FEATURE_COMMAND_USERNAME_COMPLETION
444 #undef BB_FEATURE_SH_FANCY_PROMPT
446 #if ! defined BB_FEATURE_LASH && ! defined BB_FEATURE_HUSH && ! defined BB_FEATURE_MSH && ! defined BB_FEATURE_ASH
447 #define BB_FEATURE_MSH
449 #if defined BB_FEATURE_ASH
450 #undef BB_FEATURE_MSH
451 #undef BB_FEATURE_HUSH
452 #undef BB_FEATURE_LASH
453 #elif defined BB_FEATURE_MSH
454 #undef BB_FEATURE_HUSH
455 #undef BB_FEATURE_LASH
456 #elif defined BB_FEATURE_HUSH
457 #undef BB_FEATURE_LASH
460 #undef BB_FEATURE_SH_APPLETS_ALWAYS_WIN
461 #undef BB_FEATURE_SH_STANDALONE_SHELL
462 #undef BB_FEATURE_SH_FANCY_PROMPT
472 #undef BB_FEATURE_LINUXRC
475 #if defined BB_MOUNT && defined BB_FEATURE_NFSMOUNT
479 #if defined BB_FEATURE_AUTOWIDTH
480 #ifndef BB_FEATURE_USE_TERMIOS
481 #define BB_FEATURE_USE_TERMIOS
485 #if defined BB_INSMOD || defined BB_LSMOD
486 #if ! defined BB_FEATURE_NEW_MODULE_INTERFACE && ! defined BB_FEATURE_OLD_MODULE_INTERFACE
487 #define BB_FEATURE_NEW_MODULE_INTERFACE
492 #if defined BB_FEATURE_IPC_SYSLOG