diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/Config.h-deb | 73 | ||||
-rw-r--r-- | debian/Config.h-static | 73 | ||||
-rw-r--r-- | debian/Config.h-udeb | 73 |
3 files changed, 93 insertions, 126 deletions
diff --git a/debian/Config.h-deb b/debian/Config.h-deb index 93f5597a0..020f89d81 100644 --- a/debian/Config.h-deb +++ b/debian/Config.h-deb | |||
@@ -9,6 +9,7 @@ | |||
9 | // BusyBox Applications | 9 | // BusyBox Applications |
10 | //#define BB_ADJTIMEX | 10 | //#define BB_ADJTIMEX |
11 | #define BB_AR | 11 | #define BB_AR |
12 | //#define BB_ASH | ||
12 | #define BB_BASENAME | 13 | #define BB_BASENAME |
13 | #define BB_CAT | 14 | #define BB_CAT |
14 | #define BB_CHGRP | 15 | #define BB_CHGRP |
@@ -51,6 +52,7 @@ | |||
51 | #define BB_HEAD | 52 | #define BB_HEAD |
52 | //#define BB_HOSTID | 53 | //#define BB_HOSTID |
53 | //#define BB_HOSTNAME | 54 | //#define BB_HOSTNAME |
55 | //#define BB_HUSH | ||
54 | #define BB_ID | 56 | #define BB_ID |
55 | //#define BB_IFCONFIG | 57 | //#define BB_IFCONFIG |
56 | #define BB_INIT | 58 | #define BB_INIT |
@@ -58,6 +60,7 @@ | |||
58 | #define BB_KILL | 60 | #define BB_KILL |
59 | #define BB_KILLALL | 61 | #define BB_KILLALL |
60 | #define BB_KLOGD | 62 | #define BB_KLOGD |
63 | //#define BB_LASH | ||
61 | //#define BB_LENGTH | 64 | //#define BB_LENGTH |
62 | #define BB_LN | 65 | #define BB_LN |
63 | //#define BB_LOADACM | 66 | //#define BB_LOADACM |
@@ -78,6 +81,7 @@ | |||
78 | //#define BB_NC | 81 | //#define BB_NC |
79 | #define BB_MORE | 82 | #define BB_MORE |
80 | #define BB_MOUNT | 83 | #define BB_MOUNT |
84 | //#define BB_MSH | ||
81 | //#define BB_MT | 85 | //#define BB_MT |
82 | #define BB_MV | 86 | #define BB_MV |
83 | //#define BB_NSLOOKUP | 87 | //#define BB_NSLOOKUP |
@@ -99,7 +103,6 @@ | |||
99 | //#define BB_RPM2CPIO | 103 | //#define BB_RPM2CPIO |
100 | #define BB_SED | 104 | #define BB_SED |
101 | //#define BB_SETKEYCODES | 105 | //#define BB_SETKEYCODES |
102 | //#define BB_SH | ||
103 | #define BB_SLEEP | 106 | #define BB_SLEEP |
104 | #define BB_SORT | 107 | #define BB_SORT |
105 | //#define BB_STTY | 108 | //#define BB_STTY |
@@ -143,40 +146,12 @@ | |||
143 | // pretty/useful). | 146 | // pretty/useful). |
144 | // | 147 | // |
145 | // | 148 | // |
146 | // If you enabled BB_SH above, you may select one of the following shells. | 149 | // If you enabled one or more of the shells, you may select which one |
147 | // You can only select ONE of the following shells. Sorry. | 150 | // should be run when sh is invoked: |
148 | // | 151 | //#define BB_FEATURE_SH_IS_ASH |
149 | // lash is the very smallest shell (adds just 10k) and it is quite usable as a | 152 | //#define BB_FEATURE_SH_IS_HUSH |
150 | // command prompt, but it is not suitable for any but the most trivial scripting | 153 | //#define BB_FEATURE_SH_IS_LASH |
151 | // (such as an initrd that calls insmod a few times) since it does not | 154 | #define BB_FEATURE_SH_IS_MSH |
152 | // understand Bourne shell grammer. It does handle pipes, redirects, and job | ||
153 | // control though. Adding in command editing makes it very nice lightweight | ||
154 | // command prompt. | ||
155 | //#define BB_FEATURE_LASH | ||
156 | // | ||
157 | // hush is also quite small (just 18k) and it has very complete Bourne shell | ||
158 | // grammer. It handles if/then/else/fi just fine, but doesn't handle loops | ||
159 | // like for/do/done or case/esac and such. It also currently has a problem | ||
160 | // with job control. | ||
161 | //#define BB_FEATURE_HUSH | ||
162 | // | ||
163 | // msh: The minix shell (adds just 30k) is quite complete and handles things | ||
164 | // like for/do/done, case/esac and all the things you expect a Bourne shell to | ||
165 | // do. It is not always pedantically correct about Bourne shell grammer (try | ||
166 | // running the shell testscript "tests/sh.testcases" on it and compare vs | ||
167 | // bash) but for most things it works quite well. It also uses only vfork, so | ||
168 | // it can be used on uClinux systems. This was only recently added, so there is | ||
169 | // still room to shrink it further... | ||
170 | #define BB_FEATURE_MSH | ||
171 | // | ||
172 | // ash: This adds about 60k in the default configuration and is the most | ||
173 | // complete and most pedantically correct shell included with busybox. This | ||
174 | // shell was also recently added, and several people (mainly Vladimir and Erik) | ||
175 | // have been working on it. There are a number of configurable things at the | ||
176 | // top of ash.c as well, so check those out if you want to tweak things. The | ||
177 | // Posix math support is currently disabled (that bit of code was horrible) but | ||
178 | // will be restored for the next BusyBox release. | ||
179 | //#define BB_FEATURE_ASH | ||
180 | // | 155 | // |
181 | // BusyBox will, by default, malloc space for its buffers. This costs code | 156 | // BusyBox will, by default, malloc space for its buffers. This costs code |
182 | // size for the call to xmalloc. You can use the following feature to have | 157 | // size for the call to xmalloc. You can use the following feature to have |
@@ -283,11 +258,11 @@ | |||
283 | #define BB_FEATURE_SORT_UNIQUE | 258 | #define BB_FEATURE_SORT_UNIQUE |
284 | // | 259 | // |
285 | // Enable command line editing in the shell. | 260 | // Enable command line editing in the shell. |
286 | // Only relevant if BB_SH is enabled. On by default. | 261 | // Only relevant if a shell is enabled. On by default. |
287 | #define BB_FEATURE_COMMAND_EDITING | 262 | #define BB_FEATURE_COMMAND_EDITING |
288 | // | 263 | // |
289 | // Enable tab completion in the shell. This is now working quite nicely. | 264 | // Enable tab completion in the shell. This is now working quite nicely. |
290 | // This feature adds a bit over 4k. Only relevant if BB_SH is enabled. | 265 | // This feature adds a bit over 4k. Only relevant if a shell is enabled. |
291 | #define BB_FEATURE_COMMAND_TAB_COMPLETION | 266 | #define BB_FEATURE_COMMAND_TAB_COMPLETION |
292 | // | 267 | // |
293 | // Attempts to match usernames in a ~-prefixed path | 268 | // Attempts to match usernames in a ~-prefixed path |
@@ -296,7 +271,7 @@ | |||
296 | //Allow the shell to invoke all the compiled in BusyBox applets as if they | 271 | //Allow the shell to invoke all the compiled in BusyBox applets as if they |
297 | //were shell builtins. Nice for staticly linking an emergency rescue shell, | 272 | //were shell builtins. Nice for staticly linking an emergency rescue shell, |
298 | //among other things. Off by default. | 273 | //among other things. Off by default. |
299 | // Only relevant if BB_SH is enabled. | 274 | // Only relevant if a shell is enabled. |
300 | //#define BB_FEATURE_SH_STANDALONE_SHELL | 275 | //#define BB_FEATURE_SH_STANDALONE_SHELL |
301 | // | 276 | // |
302 | //When this is enabled, busybox shell applets can be called using full path | 277 | //When this is enabled, busybox shell applets can be called using full path |
@@ -305,13 +280,13 @@ | |||
305 | //will use BusyBox cat even if /bin/cat exists on the filesystem and is _not_ | 280 | //will use BusyBox cat even if /bin/cat exists on the filesystem and is _not_ |
306 | //busybox. Some systems want this, others do not. Choose wisely. :-) This | 281 | //busybox. Some systems want this, others do not. Choose wisely. :-) This |
307 | //only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled. | 282 | //only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled. |
308 | // Only relevant if BB_SH is enabled. Off by default. | 283 | // Only relevant if a shell is enabled. Off by default. |
309 | //#define BB_FEATURE_SH_APPLETS_ALWAYS_WIN | 284 | //#define BB_FEATURE_SH_APPLETS_ALWAYS_WIN |
310 | // | 285 | // |
311 | // Uncomment this option for a fancy shell prompt that includes the | 286 | // Uncomment this option for a fancy shell prompt that includes the |
312 | // current username and hostname. On systems that don't have usernames | 287 | // current username and hostname. On systems that don't have usernames |
313 | // or hostnames, this can look hideous. | 288 | // or hostnames, this can look hideous. |
314 | // Only relevant if BB_SH is enabled. | 289 | // Only relevant if a shell is enabled. |
315 | //#define BB_FEATURE_SH_FANCY_PROMPT | 290 | //#define BB_FEATURE_SH_FANCY_PROMPT |
316 | // | 291 | // |
317 | //Turn on extra fbset options | 292 | //Turn on extra fbset options |
@@ -416,8 +391,8 @@ | |||
416 | // Nothing beyond this point should ever be touched by | 391 | // Nothing beyond this point should ever be touched by |
417 | // mere mortals so leave this stuff alone. | 392 | // mere mortals so leave this stuff alone. |
418 | // | 393 | // |
419 | #if defined BB_SH | 394 | #if defined BB_ASH || defined BB_HUSH || defined BB_LASH || defined BB_MSH |
420 | #if defined BB_FEATURE_COMMAND_EDITING | 395 | #if defined BB_FEATURE_COMMAND_EDITING |
421 | #define BB_CMDEDIT | 396 | #define BB_CMDEDIT |
422 | #else | 397 | #else |
423 | #undef BB_FEATURE_COMMAND_EDITING | 398 | #undef BB_FEATURE_COMMAND_EDITING |
@@ -482,3 +457,17 @@ | |||
482 | #define BB_LOGREAD | 457 | #define BB_LOGREAD |
483 | #endif | 458 | #endif |
484 | #endif | 459 | #endif |
460 | // | ||
461 | #if defined BB_ASH && defined BB_FEATURE_SH_IS_ASH | ||
462 | # define BB_SH | ||
463 | # define shell_main ash_main | ||
464 | #elif defined BB_HUSH && defined BB_FEATURE_SH_IS_HUSH | ||
465 | # define BB_SH | ||
466 | # define shell_main hush_main | ||
467 | #elif defined BB_LASH && defined BB_FEATURE_SH_IS_LASH | ||
468 | # define BB_SH | ||
469 | # define shell_main lash_main | ||
470 | #elif defined BB_MSH && defined BB_FEATURE_SH_IS_MSH | ||
471 | # define BB_SH | ||
472 | # define shell_main msh_main | ||
473 | #endif | ||
diff --git a/debian/Config.h-static b/debian/Config.h-static index e049b5aa2..a538b1a63 100644 --- a/debian/Config.h-static +++ b/debian/Config.h-static | |||
@@ -9,6 +9,7 @@ | |||
9 | // BusyBox Applications | 9 | // BusyBox Applications |
10 | //#define BB_ADJTIMEX | 10 | //#define BB_ADJTIMEX |
11 | #define BB_AR | 11 | #define BB_AR |
12 | #define BB_ASH | ||
12 | #define BB_BASENAME | 13 | #define BB_BASENAME |
13 | #define BB_CAT | 14 | #define BB_CAT |
14 | #define BB_CHGRP | 15 | #define BB_CHGRP |
@@ -51,6 +52,7 @@ | |||
51 | #define BB_HEAD | 52 | #define BB_HEAD |
52 | #define BB_HOSTID | 53 | #define BB_HOSTID |
53 | #define BB_HOSTNAME | 54 | #define BB_HOSTNAME |
55 | #define BB_HUSH | ||
54 | #define BB_ID | 56 | #define BB_ID |
55 | #define BB_IFCONFIG | 57 | #define BB_IFCONFIG |
56 | #define BB_INIT | 58 | #define BB_INIT |
@@ -58,6 +60,7 @@ | |||
58 | #define BB_KILL | 60 | #define BB_KILL |
59 | #define BB_KILLALL | 61 | #define BB_KILLALL |
60 | #define BB_KLOGD | 62 | #define BB_KLOGD |
63 | #define BB_LASH | ||
61 | #define BB_LENGTH | 64 | #define BB_LENGTH |
62 | #define BB_LN | 65 | #define BB_LN |
63 | #define BB_LOADACM | 66 | #define BB_LOADACM |
@@ -78,6 +81,7 @@ | |||
78 | #define BB_NC | 81 | #define BB_NC |
79 | #define BB_MORE | 82 | #define BB_MORE |
80 | #define BB_MOUNT | 83 | #define BB_MOUNT |
84 | #define BB_MSH | ||
81 | #define BB_MT | 85 | #define BB_MT |
82 | #define BB_MV | 86 | #define BB_MV |
83 | #define BB_NSLOOKUP | 87 | #define BB_NSLOOKUP |
@@ -99,7 +103,6 @@ | |||
99 | #define BB_RPM2CPIO | 103 | #define BB_RPM2CPIO |
100 | #define BB_SED | 104 | #define BB_SED |
101 | #define BB_SETKEYCODES | 105 | #define BB_SETKEYCODES |
102 | #define BB_SH | ||
103 | #define BB_SLEEP | 106 | #define BB_SLEEP |
104 | #define BB_SORT | 107 | #define BB_SORT |
105 | #define BB_STTY | 108 | #define BB_STTY |
@@ -143,40 +146,12 @@ | |||
143 | // pretty/useful). | 146 | // pretty/useful). |
144 | // | 147 | // |
145 | // | 148 | // |
146 | // If you enabled BB_SH above, you may select one of the following shells. | 149 | // If you enabled one or more of the shells, you may select which one |
147 | // You can only select ONE of the following shells. Sorry. | 150 | // should be run when sh is invoked: |
148 | // | 151 | //#define BB_FEATURE_SH_IS_ASH |
149 | // lash is the very smallest shell (adds just 10k) and it is quite usable as a | 152 | //#define BB_FEATURE_SH_IS_HUSH |
150 | // command prompt, but it is not suitable for any but the most trivial scripting | 153 | //#define BB_FEATURE_SH_IS_LASH |
151 | // (such as an initrd that calls insmod a few times) since it does not | 154 | #define BB_FEATURE_SH_IS_MSH |
152 | // understand Bourne shell grammer. It does handle pipes, redirects, and job | ||
153 | // control though. Adding in command editing makes it very nice lightweight | ||
154 | // command prompt. | ||
155 | //#define BB_FEATURE_LASH | ||
156 | // | ||
157 | // hush is also quite small (just 18k) and it has very complete Bourne shell | ||
158 | // grammer. It handles if/then/else/fi just fine, but doesn't handle loops | ||
159 | // like for/do/done or case/esac and such. It also currently has a problem | ||
160 | // with job control. | ||
161 | //#define BB_FEATURE_HUSH | ||
162 | // | ||
163 | // msh: The minix shell (adds just 30k) is quite complete and handles things | ||
164 | // like for/do/done, case/esac and all the things you expect a Bourne shell to | ||
165 | // do. It is not always pedantically correct about Bourne shell grammer (try | ||
166 | // running the shell testscript "tests/sh.testcases" on it and compare vs | ||
167 | // bash) but for most things it works quite well. It also uses only vfork, so | ||
168 | // it can be used on uClinux systems. This was only recently added, so there is | ||
169 | // still room to shrink it further... | ||
170 | //#define BB_FEATURE_MSH | ||
171 | // | ||
172 | // ash: This adds about 60k in the default configuration and is the most | ||
173 | // complete and most pedantically correct shell included with busybox. This | ||
174 | // shell was also recently added, and several people (mainly Vladimir and Erik) | ||
175 | // have been working on it. There are a number of configurable things at the | ||
176 | // top of ash.c as well, so check those out if you want to tweak things. The | ||
177 | // Posix math support is currently disabled (that bit of code was horrible) but | ||
178 | // will be restored for the next BusyBox release. | ||
179 | #define BB_FEATURE_ASH | ||
180 | // | 155 | // |
181 | // BusyBox will, by default, malloc space for its buffers. This costs code | 156 | // BusyBox will, by default, malloc space for its buffers. This costs code |
182 | // size for the call to xmalloc. You can use the following feature to have | 157 | // size for the call to xmalloc. You can use the following feature to have |
@@ -283,11 +258,11 @@ | |||
283 | #define BB_FEATURE_SORT_UNIQUE | 258 | #define BB_FEATURE_SORT_UNIQUE |
284 | // | 259 | // |
285 | // Enable command line editing in the shell. | 260 | // Enable command line editing in the shell. |
286 | // Only relevant if BB_SH is enabled. On by default. | 261 | // Only relevant if a shell is enabled. On by default. |
287 | #define BB_FEATURE_COMMAND_EDITING | 262 | #define BB_FEATURE_COMMAND_EDITING |
288 | // | 263 | // |
289 | // Enable tab completion in the shell. This is now working quite nicely. | 264 | // Enable tab completion in the shell. This is now working quite nicely. |
290 | // This feature adds a bit over 4k. Only relevant if BB_SH is enabled. | 265 | // This feature adds a bit over 4k. Only relevant if a shell is enabled. |
291 | #define BB_FEATURE_COMMAND_TAB_COMPLETION | 266 | #define BB_FEATURE_COMMAND_TAB_COMPLETION |
292 | // | 267 | // |
293 | // Attempts to match usernames in a ~-prefixed path | 268 | // Attempts to match usernames in a ~-prefixed path |
@@ -296,7 +271,7 @@ | |||
296 | //Allow the shell to invoke all the compiled in BusyBox applets as if they | 271 | //Allow the shell to invoke all the compiled in BusyBox applets as if they |
297 | //were shell builtins. Nice for staticly linking an emergency rescue shell, | 272 | //were shell builtins. Nice for staticly linking an emergency rescue shell, |
298 | //among other things. Off by default. | 273 | //among other things. Off by default. |
299 | // Only relevant if BB_SH is enabled. | 274 | // Only relevant if a shell is enabled. |
300 | #define BB_FEATURE_SH_STANDALONE_SHELL | 275 | #define BB_FEATURE_SH_STANDALONE_SHELL |
301 | // | 276 | // |
302 | //When this is enabled, busybox shell applets can be called using full path | 277 | //When this is enabled, busybox shell applets can be called using full path |
@@ -305,13 +280,13 @@ | |||
305 | //will use BusyBox cat even if /bin/cat exists on the filesystem and is _not_ | 280 | //will use BusyBox cat even if /bin/cat exists on the filesystem and is _not_ |
306 | //busybox. Some systems want this, others do not. Choose wisely. :-) This | 281 | //busybox. Some systems want this, others do not. Choose wisely. :-) This |
307 | //only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled. | 282 | //only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled. |
308 | // Only relevant if BB_SH is enabled. Off by default. | 283 | // Only relevant if a shell is enabled. Off by default. |
309 | #define BB_FEATURE_SH_APPLETS_ALWAYS_WIN | 284 | #define BB_FEATURE_SH_APPLETS_ALWAYS_WIN |
310 | // | 285 | // |
311 | // Uncomment this option for a fancy shell prompt that includes the | 286 | // Uncomment this option for a fancy shell prompt that includes the |
312 | // current username and hostname. On systems that don't have usernames | 287 | // current username and hostname. On systems that don't have usernames |
313 | // or hostnames, this can look hideous. | 288 | // or hostnames, this can look hideous. |
314 | // Only relevant if BB_SH is enabled. | 289 | // Only relevant if a shell is enabled. |
315 | #define BB_FEATURE_SH_FANCY_PROMPT | 290 | #define BB_FEATURE_SH_FANCY_PROMPT |
316 | // | 291 | // |
317 | //Turn on extra fbset options | 292 | //Turn on extra fbset options |
@@ -416,8 +391,8 @@ | |||
416 | // Nothing beyond this point should ever be touched by | 391 | // Nothing beyond this point should ever be touched by |
417 | // mere mortals so leave this stuff alone. | 392 | // mere mortals so leave this stuff alone. |
418 | // | 393 | // |
419 | #if defined BB_SH | 394 | #if defined BB_ASH || defined BB_HUSH || defined BB_LASH || defined BB_MSH |
420 | #if defined BB_FEATURE_COMMAND_EDITING | 395 | #if defined BB_FEATURE_COMMAND_EDITING |
421 | #define BB_CMDEDIT | 396 | #define BB_CMDEDIT |
422 | #else | 397 | #else |
423 | #undef BB_FEATURE_COMMAND_EDITING | 398 | #undef BB_FEATURE_COMMAND_EDITING |
@@ -482,3 +457,17 @@ | |||
482 | #define BB_LOGREAD | 457 | #define BB_LOGREAD |
483 | #endif | 458 | #endif |
484 | #endif | 459 | #endif |
460 | // | ||
461 | #if defined BB_ASH && defined BB_FEATURE_SH_IS_ASH | ||
462 | # define BB_SH | ||
463 | # define shell_main ash_main | ||
464 | #elif defined BB_HUSH && defined BB_FEATURE_SH_IS_HUSH | ||
465 | # define BB_SH | ||
466 | # define shell_main hush_main | ||
467 | #elif defined BB_LASH && defined BB_FEATURE_SH_IS_LASH | ||
468 | # define BB_SH | ||
469 | # define shell_main lash_main | ||
470 | #elif defined BB_MSH && defined BB_FEATURE_SH_IS_MSH | ||
471 | # define BB_SH | ||
472 | # define shell_main msh_main | ||
473 | #endif | ||
diff --git a/debian/Config.h-udeb b/debian/Config.h-udeb index dfc32f655..172d3dc75 100644 --- a/debian/Config.h-udeb +++ b/debian/Config.h-udeb | |||
@@ -9,6 +9,7 @@ | |||
9 | // BusyBox Applications | 9 | // BusyBox Applications |
10 | //#define BB_ADJTIMEX | 10 | //#define BB_ADJTIMEX |
11 | //#define BB_AR | 11 | //#define BB_AR |
12 | //#define BB_ASH | ||
12 | #define BB_BASENAME | 13 | #define BB_BASENAME |
13 | #define BB_CAT | 14 | #define BB_CAT |
14 | #define BB_CHGRP | 15 | #define BB_CHGRP |
@@ -51,6 +52,7 @@ | |||
51 | #define BB_HEAD | 52 | #define BB_HEAD |
52 | //#define BB_HOSTID | 53 | //#define BB_HOSTID |
53 | //#define BB_HOSTNAME | 54 | //#define BB_HOSTNAME |
55 | //#define BB_HUSH | ||
54 | #define BB_ID | 56 | #define BB_ID |
55 | //#define BB_IFCONFIG | 57 | //#define BB_IFCONFIG |
56 | #define BB_INIT | 58 | #define BB_INIT |
@@ -58,6 +60,7 @@ | |||
58 | #define BB_KILL | 60 | #define BB_KILL |
59 | #define BB_KILLALL | 61 | #define BB_KILLALL |
60 | #define BB_KLOGD | 62 | #define BB_KLOGD |
63 | //#define BB_LASH | ||
61 | //#define BB_LENGTH | 64 | //#define BB_LENGTH |
62 | #define BB_LN | 65 | #define BB_LN |
63 | //#define BB_LOADACM | 66 | //#define BB_LOADACM |
@@ -78,6 +81,7 @@ | |||
78 | //#define BB_NC | 81 | //#define BB_NC |
79 | #define BB_MORE | 82 | #define BB_MORE |
80 | #define BB_MOUNT | 83 | #define BB_MOUNT |
84 | //#define BB_MSH | ||
81 | //#define BB_MT | 85 | //#define BB_MT |
82 | #define BB_MV | 86 | #define BB_MV |
83 | //#define BB_NSLOOKUP | 87 | //#define BB_NSLOOKUP |
@@ -99,7 +103,6 @@ | |||
99 | //#define BB_RPM2CPIO | 103 | //#define BB_RPM2CPIO |
100 | #define BB_SED | 104 | #define BB_SED |
101 | //#define BB_SETKEYCODES | 105 | //#define BB_SETKEYCODES |
102 | //#define BB_SH | ||
103 | #define BB_SLEEP | 106 | #define BB_SLEEP |
104 | #define BB_SORT | 107 | #define BB_SORT |
105 | //#define BB_STTY | 108 | //#define BB_STTY |
@@ -143,40 +146,12 @@ | |||
143 | // pretty/useful). | 146 | // pretty/useful). |
144 | // | 147 | // |
145 | // | 148 | // |
146 | // If you enabled BB_SH above, you may select one of the following shells. | 149 | // If you enabled one or more of the shells, you may select which one |
147 | // You can only select ONE of the following shells. Sorry. | 150 | // should be run when sh is invoked: |
148 | // | 151 | //#define BB_FEATURE_SH_IS_ASH |
149 | // lash is the very smallest shell (adds just 10k) and it is quite usable as a | 152 | //#define BB_FEATURE_SH_IS_HUSH |
150 | // command prompt, but it is not suitable for any but the most trivial scripting | 153 | //#define BB_FEATURE_SH_IS_LASH |
151 | // (such as an initrd that calls insmod a few times) since it does not | 154 | #define BB_FEATURE_SH_IS_MSH |
152 | // understand Bourne shell grammer. It does handle pipes, redirects, and job | ||
153 | // control though. Adding in command editing makes it very nice lightweight | ||
154 | // command prompt. | ||
155 | //#define BB_FEATURE_LASH | ||
156 | // | ||
157 | // hush is also quite small (just 18k) and it has very complete Bourne shell | ||
158 | // grammer. It handles if/then/else/fi just fine, but doesn't handle loops | ||
159 | // like for/do/done or case/esac and such. It also currently has a problem | ||
160 | // with job control. | ||
161 | //#define BB_FEATURE_HUSH | ||
162 | // | ||
163 | // msh: The minix shell (adds just 30k) is quite complete and handles things | ||
164 | // like for/do/done, case/esac and all the things you expect a Bourne shell to | ||
165 | // do. It is not always pedantically correct about Bourne shell grammer (try | ||
166 | // running the shell testscript "tests/sh.testcases" on it and compare vs | ||
167 | // bash) but for most things it works quite well. It also uses only vfork, so | ||
168 | // it can be used on uClinux systems. This was only recently added, so there is | ||
169 | // still room to shrink it further... | ||
170 | #define BB_FEATURE_MSH | ||
171 | // | ||
172 | // ash: This adds about 60k in the default configuration and is the most | ||
173 | // complete and most pedantically correct shell included with busybox. This | ||
174 | // shell was also recently added, and several people (mainly Vladimir and Erik) | ||
175 | // have been working on it. There are a number of configurable things at the | ||
176 | // top of ash.c as well, so check those out if you want to tweak things. The | ||
177 | // Posix math support is currently disabled (that bit of code was horrible) but | ||
178 | // will be restored for the next BusyBox release. | ||
179 | //#define BB_FEATURE_ASH | ||
180 | // | 155 | // |
181 | // BusyBox will, by default, malloc space for its buffers. This costs code | 156 | // BusyBox will, by default, malloc space for its buffers. This costs code |
182 | // size for the call to xmalloc. You can use the following feature to have | 157 | // size for the call to xmalloc. You can use the following feature to have |
@@ -283,11 +258,11 @@ | |||
283 | #define BB_FEATURE_SORT_UNIQUE | 258 | #define BB_FEATURE_SORT_UNIQUE |
284 | // | 259 | // |
285 | // Enable command line editing in the shell. | 260 | // Enable command line editing in the shell. |
286 | // Only relevant if BB_SH is enabled. On by default. | 261 | // Only relevant if a shell is enabled. On by default. |
287 | #define BB_FEATURE_COMMAND_EDITING | 262 | #define BB_FEATURE_COMMAND_EDITING |
288 | // | 263 | // |
289 | // Enable tab completion in the shell. This is now working quite nicely. | 264 | // Enable tab completion in the shell. This is now working quite nicely. |
290 | // This feature adds a bit over 4k. Only relevant if BB_SH is enabled. | 265 | // This feature adds a bit over 4k. Only relevant if a shell is enabled. |
291 | #define BB_FEATURE_COMMAND_TAB_COMPLETION | 266 | #define BB_FEATURE_COMMAND_TAB_COMPLETION |
292 | // | 267 | // |
293 | // Attempts to match usernames in a ~-prefixed path | 268 | // Attempts to match usernames in a ~-prefixed path |
@@ -296,7 +271,7 @@ | |||
296 | //Allow the shell to invoke all the compiled in BusyBox applets as if they | 271 | //Allow the shell to invoke all the compiled in BusyBox applets as if they |
297 | //were shell builtins. Nice for staticly linking an emergency rescue shell, | 272 | //were shell builtins. Nice for staticly linking an emergency rescue shell, |
298 | //among other things. Off by default. | 273 | //among other things. Off by default. |
299 | // Only relevant if BB_SH is enabled. | 274 | // Only relevant if a shell is enabled. |
300 | //#define BB_FEATURE_SH_STANDALONE_SHELL | 275 | //#define BB_FEATURE_SH_STANDALONE_SHELL |
301 | // | 276 | // |
302 | //When this is enabled, busybox shell applets can be called using full path | 277 | //When this is enabled, busybox shell applets can be called using full path |
@@ -305,13 +280,13 @@ | |||
305 | //will use BusyBox cat even if /bin/cat exists on the filesystem and is _not_ | 280 | //will use BusyBox cat even if /bin/cat exists on the filesystem and is _not_ |
306 | //busybox. Some systems want this, others do not. Choose wisely. :-) This | 281 | //busybox. Some systems want this, others do not. Choose wisely. :-) This |
307 | //only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled. | 282 | //only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled. |
308 | // Only relevant if BB_SH is enabled. Off by default. | 283 | // Only relevant if a shell is enabled. Off by default. |
309 | //#define BB_FEATURE_SH_APPLETS_ALWAYS_WIN | 284 | //#define BB_FEATURE_SH_APPLETS_ALWAYS_WIN |
310 | // | 285 | // |
311 | // Uncomment this option for a fancy shell prompt that includes the | 286 | // Uncomment this option for a fancy shell prompt that includes the |
312 | // current username and hostname. On systems that don't have usernames | 287 | // current username and hostname. On systems that don't have usernames |
313 | // or hostnames, this can look hideous. | 288 | // or hostnames, this can look hideous. |
314 | // Only relevant if BB_SH is enabled. | 289 | // Only relevant if a shell is enabled. |
315 | //#define BB_FEATURE_SH_FANCY_PROMPT | 290 | //#define BB_FEATURE_SH_FANCY_PROMPT |
316 | // | 291 | // |
317 | //Turn on extra fbset options | 292 | //Turn on extra fbset options |
@@ -416,8 +391,8 @@ | |||
416 | // Nothing beyond this point should ever be touched by | 391 | // Nothing beyond this point should ever be touched by |
417 | // mere mortals so leave this stuff alone. | 392 | // mere mortals so leave this stuff alone. |
418 | // | 393 | // |
419 | #if defined BB_SH | 394 | #if defined BB_ASH || defined BB_HUSH || defined BB_LASH || defined BB_MSH |
420 | #if defined BB_FEATURE_COMMAND_EDITING | 395 | #if defined BB_FEATURE_COMMAND_EDITING |
421 | #define BB_CMDEDIT | 396 | #define BB_CMDEDIT |
422 | #else | 397 | #else |
423 | #undef BB_FEATURE_COMMAND_EDITING | 398 | #undef BB_FEATURE_COMMAND_EDITING |
@@ -482,3 +457,17 @@ | |||
482 | #define BB_LOGREAD | 457 | #define BB_LOGREAD |
483 | #endif | 458 | #endif |
484 | #endif | 459 | #endif |
460 | // | ||
461 | #if defined BB_ASH && defined BB_FEATURE_SH_IS_ASH | ||
462 | # define BB_SH | ||
463 | # define shell_main ash_main | ||
464 | #elif defined BB_HUSH && defined BB_FEATURE_SH_IS_HUSH | ||
465 | # define BB_SH | ||
466 | # define shell_main hush_main | ||
467 | #elif defined BB_LASH && defined BB_FEATURE_SH_IS_LASH | ||
468 | # define BB_SH | ||
469 | # define shell_main lash_main | ||
470 | #elif defined BB_MSH && defined BB_FEATURE_SH_IS_MSH | ||
471 | # define BB_SH | ||
472 | # define shell_main msh_main | ||
473 | #endif | ||