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.
4//
5//// This file is parsed by sed.  You MUST use single line comments.
6//   i.e.,  //#define BB_BLAH
7//
8//
9// BusyBox Applications
10//#define BB_ADJTIMEX
11//#define BB_AR
12//#define BB_ASH
13#define BB_BASENAME
14#define BB_CAT
15//#define BB_CHGRP
16#define BB_CHMOD
17//#define BB_CHOWN
18//#define BB_CHROOT
19//#define BB_CHVT
20//#define BB_CLEAR
21//#define BB_CMP
22#define BB_CP
23//#define BB_CPIO
24//#define BB_CUT
25#define BB_DATE
26//#define BB_DC
27#define BB_DD
28//#define BB_DEALLOCVT
29//#define BB_DF
30//#define BB_DIRNAME
31//#define BB_DMESG
32//#define BB_DOS2UNIX
33//#define BB_DPKG
34//#define BB_DPKG_DEB
35//#define BB_DUTMP
36//#define BB_DU
37//#define BB_DUMPKMAP
38#define BB_ECHO
39//#define BB_ENV
40//#define BB_EXPR
41//#define BB_FBSET
42//#define BB_FDFLUSH
43//#define BB_FIND
44#define BB_FREE
45//#define BB_FREERAMDISK
46//#define BB_FSCK_MINIX
47//#define BB_GETOPT
48#define BB_GREP
49//#define BB_GUNZIP
50//#define BB_GZIP
51//#define BB_HALT
52//#define BB_HEAD
53//#define BB_HOSTID
54//#define BB_HOSTNAME
55//#define BB_HUSH
56//#define BB_ID
57#define BB_IFCONFIG
58//#define BB_INIT
59#define BB_INSMOD
60#define BB_KILL
61#define BB_KILLALL
62#define BB_KLOGD
63//#define BB_KTAB
64//#define BB_LASH
65//#define BB_LENGTH
66#define BB_LN
67//#define BB_LOADACM
68//#define BB_LOADFONT
69//#define BB_LOADKMAP
70//#define BB_LOGGER
71//#define BB_LOGNAME
72#define BB_LS
73#define BB_LSMOD
74//#define BB_MAKEDEVS
75//#define BB_MD5SUM
76#define BB_MKDIR
77//#define BB_MKFIFO
78//#define BB_MKFS_MINIX
79#define BB_MKNOD
80//#define BB_MKSWAP
81//#define BB_MKTEMP
82//#define BB_MODPROBE
83#define BB_MORE
84#define BB_MOUNT
85#define BB_MSH
86//#define BB_MT
87#define BB_MV
88//#define BB_NC
89//#define BB_NSLOOKUP
90//#define BB_PIDOF
91#define BB_PING
92//#define BB_PIVOT_ROOT
93//#define BB_POWEROFF
94//#define BB_PRINTF
95#define BB_PS
96#define BB_PWD
97//#define BB_RDATE
98//#define BB_READLINK
99#define BB_REBOOT
100//#define BB_RENICE
101//#define BB_RESET
102#define BB_RM
103#define BB_RMDIR
104#define BB_RMMOD
105#define BB_ROUTE
106//#define BB_RPM2CPIO
107//#define BB_SED
108//#define BB_SETKEYCODES
109#define BB_SLEEP
110//#define BB_SORT
111//#define BB_STTY
112//#define BB_SWAPONOFF
113//#define BB_SYNC
114#define BB_SYSLOGD
115//#define BB_TAIL
116//#define BB_TAR
117//#define BB_TEE
118//#define BB_TEST
119//#define BB_TELNET
120//#define BB_TFTP
121//#define BB_TOUCH
122//#define BB_TR
123#define BB_TRACEROUTE
124#define BB_TRUE_FALSE
125//#define BB_TTY
126//#define BB_UNIX2DOS
127#define BB_UUENCODE
128//#define BB_UUDECODE
129//#define BB_UMOUNT
130//#define BB_UNIQ
131//#define BB_UNAME
132//#define BB_UPDATE
133//#define BB_UPTIME
134//#define BB_USLEEP
135//#define BB_VI
136//#define BB_WATCHDOG
137//#define BB_WC
138//#define BB_WGET
139//#define BB_WHICH
140//#define BB_WHOAMI
141//#define BB_XARGS
142//#define BB_YES
143// End of Applications List
144//
145//
146//
147// ---------------------------------------------------------
148// This is where feature definitions go.  Generally speaking,
149// turning this stuff off makes things a bit smaller (and less 
150// pretty/useful).
151//
152//
153// If you enabled one or more of the shells, you may select which one
154// should be run when sh is invoked:
155//#define BB_FEATURE_SH_IS_ASH
156//#define BB_FEATURE_SH_IS_HUSH
157//#define BB_FEATURE_SH_IS_LASH
158#define BB_FEATURE_SH_IS_MSH
159//
160// BusyBox will, by default, malloc space for its buffers.  This costs code
161// size for the call to xmalloc.  You can use the following feature to have
162// them put on the stack.  For some very small machines with limited stack
163// space, this can be deadly.  For most folks, this works just fine...
164#define BB_FEATURE_BUFFERS_GO_ON_STACK
165// The third alternative for buffer allocation is to use BSS.  This works
166// beautifully for computers with a real MMU (and OS support), but wastes
167// runtime RAM for uCLinux.  This behavior was the only one available for
168// BusyBox versions 0.48 and earlier.
169//#define BB_FEATURE_BUFFERS_GO_IN_BSS
170//
171// Turn this on to use Erik's very cool devps, and devmtab kernel drivers,
172// thereby eliminating the need for the /proc filesystem and thereby saving
173// lots and lots memory for more important things.  NOTE:  If you enable this
174// feature, you _must_ have patched the kernel to include the devps patch that
175// is included in the busybox/kernel-patches directory.  You will also need to
176// create some device special files in /dev on your embedded system:
177//        mknod /dev/mtab c 10 22
178//        mknod /dev/ps c 10 21
179// I emailed Linus and this patch will not be going into the stock kernel.
180//#define BB_FEATURE_USE_DEVPS_PATCH
181//
182// show verbose usage messages
183//#define BB_FEATURE_VERBOSE_USAGE
184//
185// Use termios to manipulate the screen ('more' is prettier with this on)
186//#define BB_FEATURE_USE_TERMIOS
187//
188// calculate terminal & column widths (for more and ls)
189#define BB_FEATURE_AUTOWIDTH
190//
191// show username/groupnames for ls
192//#define BB_FEATURE_LS_USERNAME
193//
194// show file timestamps in ls
195#define BB_FEATURE_LS_TIMESTAMPS
196//
197// enable ls -p and -F
198#define BB_FEATURE_LS_FILETYPES
199//
200// sort the file names
201//#define BB_FEATURE_LS_SORTFILES
202//
203// enable ls -R
204//#define BB_FEATURE_LS_RECURSIVE
205//
206// enable ls -L
207//#define BB_FEATURE_LS_FOLLOWLINKS
208//
209// Disable for a smaller (but less functional) ping
210//#define BB_FEATURE_FANCY_PING
211//
212// Make init use a simplified /etc/inittab file (recommended).
213#define BB_FEATURE_USE_INITTAB
214//
215//Enable init being called as /linuxrc
216//#define BB_FEATURE_LINUXRC
217//
218//Have init enable core dumping for child processes (for debugging only) 
219//#define BB_FEATURE_INIT_COREDUMPS
220//
221//Make sure nothing is printed to the console on boot
222//#define BB_FEATURE_EXTRA_QUIET
223//
224// enable syslogd -R remotehost
225#define BB_FEATURE_REMOTE_LOG
226//
227// enable syslogd -C
228#define BB_FEATURE_IPC_SYSLOG
229//
230//Disable for a simple tail implementation (2.34k vs 3k for the full one).
231//Both provide 'tail -f', but this cuts out -c, -q, -s, and -v. 
232//#define BB_FEATURE_FANCY_TAIL
233//
234// Enable support for loop devices in mount
235//#define BB_FEATURE_MOUNT_LOOP
236//
237// Enable support for a real /etc/mtab file instead of /proc/mounts
238//#define BB_FEATURE_MTAB_SUPPORT
239//
240// Enable support for mounting remote NFS volumes. 
241// You may need to mount with "-o nolock" if you are
242// not running a local portmapper daemon...
243//#define BB_FEATURE_NFSMOUNT
244//
245// Enable support forced filesystem unmounting 
246// (i.e., in case of an unreachable NFS system).
247// #define BB_FEATURE_MOUNT_FORCE
248//
249// Enable support for creation of tar files.
250//#define BB_FEATURE_TAR_CREATE
251//
252// Enable support for "--exclude" and "-X" for excluding files
253//#define BB_FEATURE_TAR_EXCLUDE
254//
255// Enable support for tar -z option (currently only works for inflating)
256//#define BB_FEATURE_TAR_GZIP 
257//
258// Enable reverse sort
259//#define BB_FEATURE_SORT_REVERSE
260//
261// Enable uniqe sort
262//#define BB_FEATURE_SORT_UNIQUE
263//
264// Enable command line editing in the shell.  
265// Only relevant if a shell is enabled. On by default.
266#define BB_FEATURE_COMMAND_EDITING
267//
268// Enable tab completion in the shell.  This is now working quite nicely.
269// This feature adds a bit over 4k. Only relevant if a shell is enabled.
270#define BB_FEATURE_COMMAND_TAB_COMPLETION
271//
272// Attempts to match usernames in a ~-prefixed path
273//#define BB_FEATURE_COMMAND_USERNAME_COMPLETION
274//
275//Allow the shell to invoke all the compiled in BusyBox applets as if they
276//were shell builtins.  Nice for staticly linking an emergency rescue shell,
277//among other things. Off by default.
278// Only relevant if a shell is enabled.
279//#define BB_FEATURE_SH_STANDALONE_SHELL
280//
281//When this is enabled, busybox shell applets can be called using full path
282//names.  This causes applets (i.e., most busybox commands) to override
283//real commands on the filesystem.  For example, if you run run /bin/cat, it
284//will use BusyBox cat even if /bin/cat exists on the filesystem and is _not_
285//busybox.  Some systems want this, others do not.  Choose wisely.  :-) This
286//only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled.
287// Only relevant if a shell is enabled. Off by default.
288//#define BB_FEATURE_SH_APPLETS_ALWAYS_WIN
289//
290// Uncomment this option for a fancy shell prompt that includes the
291// current username and hostname.  On systems that don't have usernames
292// or hostnames, this can look hideous.
293// Only relevant if a shell is enabled.
294//#define BB_FEATURE_SH_FANCY_PROMPT
295//
296//Turn on extra fbset options
297//#define BB_FEATURE_FBSET_FANCY
298//
299//Turn on fbset readmode support
300//#define BB_FEATURE_FBSET_READMODE
301//
302// Support insmod/lsmod/rmmod for post 2.1 kernels
303#define BB_FEATURE_NEW_MODULE_INTERFACE
304//
305// Support insmod/lsmod/rmmod for pre 2.1 kernels
306//#define BB_FEATURE_OLD_MODULE_INTERFACE
307//
308// Support module version checking
309//#define BB_FEATURE_INSMOD_VERSION_CHECKING
310//
311// Support for uClinux memory usage optimization, which will load the image
312// directly into the kernel memory.  This divides memory requrements by three.
313// If you are not running uClinux (i.e., your CPU has an MMU) leave this
314// disabled...
315//#define BB_FEATURE_INSMOD_LOADINKMEM
316//
317// Support for Minix filesystem, version 2
318//#define BB_FEATURE_MINIX2
319//
320// Enable ifconfig status reporting output -- this feature adds 12k.
321#define BB_FEATURE_IFCONFIG_STATUS
322//
323// Enable ifconfig slip-specific options "keepalive" and "outfill"
324//#define BB_FEATURE_IFCONFIG_SLIP
325//
326// Enable ifconfig options "mem_start", "io_addr", and "irq".
327//#define BB_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
328//
329// Enable ifconfig option "hw".  Currently works for only with "ether".
330#define BB_FEATURE_IFCONFIG_HW
331//
332// Enable busybox --install [-s]
333// to create links (or symlinks) for all the commands that are 
334// compiled into the binary.  (needs /proc filesystem)
335//#define BB_FEATURE_INSTALLER
336//
337// Enable a nifty progress meter in wget (adds just under 2k)
338#define BB_FEATURE_WGET_STATUSBAR
339//
340// Enable HTTP authentication in wget
341#define BB_FEATURE_WGET_AUTHENTICATION
342//
343// Clean up all memory before exiting -- usually not needed
344// as the OS can clean up...  Don't enable this unless you
345// have a really good reason for cleaning things up manually.
346//#define BB_FEATURE_CLEAN_UP
347//
348// Support for human readable output by ls, du, etc.(example 13k, 23M, 235G)
349#define BB_FEATURE_HUMAN_READABLE
350//
351// Support for the find -type option.
352#define BB_FEATURE_FIND_TYPE
353//
354// Support for the find -perm option.
355#define BB_FEATURE_FIND_PERM
356//
357// Support for the find -mtine option.
358#define BB_FEATURE_FIND_MTIME
359//
360// Support for the -A -B and -C context flags in grep
361//#define BB_FEATURE_GREP_CONTEXT
362//
363// Support for the EGREP applet (alias to the grep applet)
364//#define BB_FEATURE_GREP_EGREP_ALIAS
365//
366// Tell tftp what commands that should be supported.
367#define BB_FEATURE_TFTP_PUT
368#define BB_FEATURE_TFTP_GET
369//
370// features for vi
371#define BB_FEATURE_VI_COLON		// ":" colon commands, no "ex" mode
372#define BB_FEATURE_VI_YANKMARK		// Yank/Put commands and Mark cmds
373#define BB_FEATURE_VI_SEARCH		// search and replace cmds
374#define BB_FEATURE_VI_USE_SIGNALS	// catch signals
375#define BB_FEATURE_VI_DOT_CMD		// remember previous cmd and "." cmd
376#define BB_FEATURE_VI_READONLY		// vi -R and "view" mode
377#define BB_FEATURE_VI_SETOPTS		// set-able options,  ai ic showmatch
378#define BB_FEATURE_VI_SET		// :set
379#define BB_FEATURE_VI_WIN_RESIZE	// handle window resize
380//
381// Enable a if you system have setuped locale
382//#define BB_LOCALE_SUPPORT
383//
384// Support for TELNET to pass TERM type to remote host.  Adds 384 bytes.
385#define BB_FEATURE_TELNET_TTYPE
386//
387// Support for devfs.
388#define BB_FEATURE_DEVFS
389//
390// End of Features List
391//
392//
393//
394//
395//
396//
397//---------------------------------------------------
398// Nothing beyond this point should ever be touched by 
399// mere mortals so leave this stuff alone.
400//
401#include <features.h>
402#if defined __UCLIBC__ && ! defined __UCLIBC_HAS_MMU__
403	#undef BB_RPM2CPIO		/* Uses gz_open(), which uses fork() */
404	#undef BB_DPKG_DEB		/* Uses gz_open(), which uses fork() */
405	#undef BB_ASH			/* Uses fork() */
406	#undef BB_HUSH			/* Uses fork() */
407	#undef BB_LASH			/* Uses fork() */
408	#undef BB_INIT			/* Uses fork() */
409	#undef BB_FEATURE_TAR_GZIP	/* Uses fork() */
410	#undef BB_SYSLOGD		/* Uses daemon() */
411	#undef BB_KLOGD			/* Uses daemon() */
412	#undef BB_UPDATE		/* Uses daemon() */
413#endif
414#if defined BB_ASH || defined BB_HUSH || defined BB_LASH || defined BB_MSH
415	#if defined BB_FEATURE_COMMAND_EDITING
416		#define BB_CMDEDIT
417	#else
418		#undef BB_FEATURE_COMMAND_EDITING
419		#undef BB_FEATURE_COMMAND_TAB_COMPLETION
420		#undef BB_FEATURE_COMMAND_USERNAME_COMPLETION
421		#undef BB_FEATURE_SH_FANCY_PROMPT
422	#endif
423#else
424	#undef BB_FEATURE_SH_APPLETS_ALWAYS_WIN
425	#undef BB_FEATURE_SH_STANDALONE_SHELL
426	#undef BB_FEATURE_SH_FANCY_PROMPT
427#endif
428//
429#ifdef BB_KILLALL
430	#ifndef BB_KILL
431		#define BB_KILL
432	#endif
433#endif
434//
435#ifndef BB_INIT
436	#undef BB_FEATURE_LINUXRC
437#endif
438//
439#if defined BB_MOUNT && defined BB_FEATURE_NFSMOUNT
440	#define BB_NFSMOUNT
441#endif
442//
443#if defined BB_FEATURE_AUTOWIDTH
444	#ifndef BB_FEATURE_USE_TERMIOS
445		#define BB_FEATURE_USE_TERMIOS
446	#endif
447#endif
448//
449#if defined BB_INSMOD || defined BB_LSMOD
450	#if ! defined BB_FEATURE_NEW_MODULE_INTERFACE && ! defined BB_FEATURE_OLD_MODULE_INTERFACE
451		#define BB_FEATURE_NEW_MODULE_INTERFACE
452	#endif
453#endif
454//
455#ifdef BB_UNIX2DOS
456	#define BB_DOS2UNIX
457#endif	
458//
459#ifdef BB_SYSLOGD
460	#if defined BB_FEATURE_IPC_SYSLOG
461		#define BB_LOGREAD
462	#endif
463#endif
464//
465#if defined BB_ASH && defined BB_FEATURE_SH_IS_ASH
466# define BB_SH
467# define shell_main ash_main
468#elif defined BB_HUSH && defined BB_FEATURE_SH_IS_HUSH
469# define BB_SH
470# define shell_main hush_main
471#elif defined BB_LASH && defined BB_FEATURE_SH_IS_LASH
472# define BB_SH
473# define shell_main lash_main
474#elif defined BB_MSH && defined BB_FEATURE_SH_IS_MSH
475# define BB_SH
476# define shell_main msh_main
477#endif
478