Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 1 | <!--#include file="header.html" --> |
| 2 | |
| 3 | |
| 4 | <h3>Frequently Asked Questions</h3> |
| 5 | |
| 6 | This is a collection of some of the more frequently asked questions |
| 7 | about BusyBox. Some of the questions even have answers. If you |
| 8 | have additions to this FAQ document, we would love to add them, |
| 9 | |
| 10 | <ol> |
Rob Landley | 380ad12 | 2005-09-23 16:52:09 +0000 | [diff] [blame] | 11 | <li><a href="#getting_started">How can I get started using BusyBox?</a> |
| 12 | <li><a href="#build_system">How do I build a BusyBox-based system?</a> |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 13 | <li><a href="#kernel">Which Linux kernel versions are supported?</a> |
| 14 | <li><a href="#arch">Which architectures does BusyBox run on?</a> |
| 15 | <li><a href="#libc">Which C libraries are supported?</a> |
| 16 | <li><a href="#commercial">Can I include BusyBox as part of the software on my device?</a> |
| 17 | <li><a href="#bugs">I think I found a bug in BusyBox! What should I do?!</a> |
| 18 | <li><a href="#job_control">Why do I keep getting "sh: can't access tty; job control |
| 19 | turned off" errors? Why doesn't Control-C work within my shell?</a> |
| 20 | <li><a href="#demanding">I demand that you to add <favorite feature> right now! How come |
| 21 | you don't answer all my questions on the mailing list instantly? I demand |
| 22 | that you help me with all of my problems <em>Right Now</em>!</a> |
| 23 | <li><a href="#helpme">I need help with BusyBox! What should I do?</a> |
| 24 | <li><a href="#contracts">I need you to add <favorite feature>! Are the BusyBox developers willing to |
| 25 | be paid in order to fix bugs or add in <favorite feature>? Are you willing to provide |
| 26 | support contracts?</a> |
Mike Frysinger | 77dbe73 | 2005-04-17 04:32:22 +0000 | [diff] [blame] | 27 | <li><a href="#external">Where can I find other small utilities since busybox does not include the features I want?</a></li> |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 28 | <li><a href="#support">I think you guys are great and I want to help support your work!</a> |
Rob Landley | de7f9b7 | 2005-07-31 04:27:19 +0000 | [diff] [blame] | 29 | <li><a href="#optimize">I want to make busybox even smaller, how do I go about it?</a> |
| 30 | |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 31 | |
| 32 | |
| 33 | </ol> |
| 34 | |
Rob Landley | 380ad12 | 2005-09-23 16:52:09 +0000 | [diff] [blame] | 35 | <hr /> |
| 36 | <p> |
| 37 | <h2><a name="getting_started">How can I get started using BusyBox?</a></h2> |
| 38 | <p> If you just want to try out busybox without installing it, download the |
| 39 | tarball, extract it, run "make allyesconfig", and then run "make". |
| 40 | </p> |
| 41 | <p> |
| 42 | This will create a busybox binary with all features enabled. To try |
| 43 | out a busybox applet, type "./busybox [appletname] [options]", for |
| 44 | example "./busybox ls -l" or "./busybox cat LICENSE". Type "./busybox" |
| 45 | to see a command list, and "busybox appletname --help" to see a brief |
| 46 | usage message for a given applet. |
| 47 | </p> |
| 48 | <p> |
| 49 | BusyBox uses the name it was invoked under to determine which applet is |
| 50 | being invoked. (Try "mv busybox ls" and then "./ls -l".) Installing |
| 51 | busybox consists of creating symlinks (or hardlinks) to the busybox |
| 52 | binary for each applet in busybox, and making sure these symlinks are in |
| 53 | the shell's command $PATH. ("make install" creates these symlinks, and |
| 54 | "make install-hardlinks" creates hardlinks instead.) The special applet |
| 55 | name "busybox" (or with any optional suffix, such as "busybox-static") |
| 56 | uses the first argument to determine which applet to run, as shown above. |
| 57 | </p> |
| 58 | <p> |
| 59 | BusyBox also has a feature called the "standalone shell", where the busybox |
| 60 | shell runs any built-in applets before checking the command path. This |
| 61 | feature is also enabled by "make allyesconfig", and to try it out run |
| 62 | the command line "PATH= ./busybox ash". This will blank your command path |
| 63 | and run busybox as your command shell, so the only commands it can find |
| 64 | (without an explicit path such as /bin/ls) are the built-in busybox ones. |
| 65 | This is another good way to see what's built into busybox. (Note that the |
| 66 | standalone shell is dependent on the existence of /proc/self/exe, so before |
| 67 | using it in a chroot environment you must mount /proc.) |
| 68 | </p> |
| 69 | <p> |
| 70 | To build a smaller busybox binary, run "make menuconfig" and disable the |
| 71 | features you don't need. (Or run "make allnoconfig" and then use |
| 72 | menuconfig to add just the features you need. Don't forget to recompile |
| 73 | with "make" once you've finished configuring.) |
| 74 | </p> |
| 75 | <hr/> |
| 76 | <p/> |
| 77 | <h2><a name="build_system">How do I build a BusyBox-based system?</a></h2> |
| 78 | <p> |
| 79 | BusyBox is a package that replaces a dozen standard packages, but it is |
| 80 | not by itself a complete bootable system. Building an entire Linux |
| 81 | distribution from source is a bit beyond the scope of this FAQ, but it |
| 82 | understandably keeps cropping up on the mailing list, so here are some |
| 83 | pointers. |
| 84 | </p> |
| 85 | <p> |
| 86 | Start by learning how to strip a working system down to the bare essentials |
| 87 | needed to run one or two commands, so you know what it is you actually |
| 88 | need. An excellent practical place to do |
| 89 | this is the <a href="http://www.tldp.org/HOWTO/Bootdisk-HOWTO/">Linux |
| 90 | BootDisk Howto</a>, or for a more theoretical approach try |
| 91 | <a href="http://www.tldp.org/HOWTO/From-PowerUp-To-Bash-Prompt-HOWTO.html">From |
| 92 | PowerUp to Bash Prompt</a>. |
| 93 | </p> |
| 94 | <p> |
| 95 | To learn how to build a working Linux system entirely from source code, |
| 96 | the place to go is the <a href="http://www.linuxfromscratch.org">Linux |
| 97 | From Scratch</a> project. They have an entire book of step-by-step |
| 98 | instructions you can |
| 99 | <a href="http://www.linuxfromscratch.org/lfs/view/stable/">read online</a> |
| 100 | or |
| 101 | <a href="http://www.linuxfromscratch.org/lfs/downloads/stable/">download</a>. |
| 102 | Be sure to check out the other sections of their main page, including |
| 103 | Beyond Linux From Scratch, Hardened Linux From Scratch, their Hints |
| 104 | directory, and their LiveCD project. (They also have mailing lists which |
| 105 | are better sources of answers to Linux-system building questions than |
| 106 | the busybox list.) |
| 107 | </p> |
| 108 | <p> |
| 109 | If you want an automated yet customizable system builder which produces |
| 110 | a BusyBox and uClibc based system, try |
| 111 | <a href="http://buildroot.uclibc.org">buildroot</a>, which is |
| 112 | another project by the maintainer of the uClibc and BusyBox projects |
| 113 | (Erik Andersen). Download the tarball, extract it, unset CC, make. |
| 114 | For more instructions, see the website. |
| 115 | </p> |
| 116 | |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 117 | |
| 118 | <hr /> |
| 119 | <p> |
| 120 | <h2><a name="kernel">Which Linux kernel versions are supported?</a></h2> |
| 121 | <p> |
Rob Landley | 380ad12 | 2005-09-23 16:52:09 +0000 | [diff] [blame] | 122 | Full functionality requires Linux 2.4.x or better. (Earlier versions may |
| 123 | still work, but are no longer regularly tested.) A large fraction of the |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 124 | code should run on just about anything. While the current code is fairly |
| 125 | Linux specific, it should be fairly easy to port the majority of the code |
| 126 | to support, say, FreeBSD or Solaris, or Mac OS X, or even Windows (if you |
| 127 | are into that sort of thing). |
Rob Landley | 380ad12 | 2005-09-23 16:52:09 +0000 | [diff] [blame] | 128 | </p> |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 129 | <hr /> |
| 130 | <p> |
| 131 | <h2><a name="arch">Which architectures does BusyBox run on?</a></h2> |
| 132 | <p> |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 133 | BusyBox in general will build on any architecture supported by gcc. |
Rob Landley | 380ad12 | 2005-09-23 16:52:09 +0000 | [diff] [blame] | 134 | Kernel module loading for 2.4 Linux kernels is currently |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 135 | limited to ARM, CRIS, H8/300, x86, ia64, x86_64, m68k, MIPS, PowerPC, |
| 136 | S390, SH3/4/5, Sparc, v850e, and x86_64 for 2.4.x kernels. |
Rob Landley | 380ad12 | 2005-09-23 16:52:09 +0000 | [diff] [blame] | 137 | </p> |
| 138 | <p> |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 139 | With 2.6.x kernels, module loading support should work on all architectures. |
Rob Landley | 380ad12 | 2005-09-23 16:52:09 +0000 | [diff] [blame] | 140 | </p> |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 141 | <hr /> |
| 142 | <p> |
| 143 | <h2><a name="libc">Which C libraries are supported?</a></h2> |
| 144 | <p> |
Rob Landley | 380ad12 | 2005-09-23 16:52:09 +0000 | [diff] [blame] | 145 | On Linux, BusyBox releases are tested against uClibc (0.9.27 or later) and |
| 146 | glibc (2.2 or later). Both should provide full functionality with busybox, |
| 147 | and if you find a bug we want to hear about it. |
| 148 | </p> |
| 149 | </p> |
| 150 | Linux-libc5 is no longer maintained (and has no known advantages over |
| 151 | uClibc), dietlibc is known to have numerous unfixed bugs, and klibc is |
| 152 | missing too many features to build BusyBox. If you require a small C |
| 153 | library for Linux, the busybox developers recommend uClibc. |
| 154 | </p> |
| 155 | <p> |
| 156 | Some BusyBox applets have been built and run under a combination |
| 157 | of newlib and libgloss (see |
| 158 | <a href="http://www.busybox.net/lists/busybox/2005-March/013759.html">this thread</a>). |
| 159 | This is still experimental, but may be supported in a future release. |
| 160 | </p> |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 161 | <hr /> |
| 162 | <p> |
Mike Frysinger | 86097b3 | 2005-09-15 01:37:36 +0000 | [diff] [blame] | 163 | <h2><a name="commercial">Can I include BusyBox as part of the software on my device?</a></h2> |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 164 | |
| 165 | Yes. As long as you <a href="http://busybox.net/license.html">fully comply |
| 166 | with the generous terms of the GPL BusyBox license</a> you can ship BusyBox |
| 167 | as part of the software on your device. |
| 168 | |
Eric Andersen | 75a7e19 | 2005-01-13 17:23:28 +0000 | [diff] [blame] | 169 | <br> |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 170 | <a href="#support">Please consider sharing some of the money you make.</a> |
| 171 | |
| 172 | |
| 173 | <hr /> |
| 174 | <p> |
Mike Frysinger | 86097b3 | 2005-09-15 01:37:36 +0000 | [diff] [blame] | 175 | <h2><a name="bugs">I think I found a bug in BusyBox! What should I do?</a></h2> |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 176 | <p> |
| 177 | |
Eric Andersen | ff4b924 | 2005-01-31 13:05:02 +0000 | [diff] [blame] | 178 | |
| 179 | <p> |
| 180 | |
| 181 | If you simply need help with using or configuring BusyBox, please submit a |
| 182 | detailed description of your problem to the BusyBox mailing list at <a |
| 183 | href="mailto:busybox@mail.busybox.net"> busybox@mail.busybox.net</a>. |
| 184 | Please do not send private email to Erik (the maintainer of BusyBox) asking |
| 185 | for private help unless you are planning on paying for consulting services. |
| 186 | When we answer questions on the BusyBox mailing list, it helps everyone, |
| 187 | while private answers help only you... |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 188 | |
| 189 | <p> |
| 190 | |
Eric Andersen | ff4b924 | 2005-01-31 13:05:02 +0000 | [diff] [blame] | 191 | The developers of BusyBox are busy people, and have only so much they can |
| 192 | keep in their brains at a time. As a result, bug reports sometimes get |
| 193 | lost when posted to the mailing list. To prevent your bug report from |
| 194 | getting lost, if you find a bug in BusyBox, please use the <a |
| 195 | href="http://bugs.busybox.net/">BusyBox Bug and Patch Tracking System</a> |
| 196 | to submit a detailed bug report. |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 197 | |
Eric Andersen | ff4b924 | 2005-01-31 13:05:02 +0000 | [diff] [blame] | 198 | <p> |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 199 | |
Eric Andersen | ff4b924 | 2005-01-31 13:05:02 +0000 | [diff] [blame] | 200 | The same also applies to patches... Regardless of whether your patch is a |
| 201 | bug fix or adds shiney new features, please post your patch to the <a |
| 202 | href="http://bugs.busybox.net/">BusyBox Bug and Patch Tracking System</a> |
| 203 | to make certain it is properly considered. |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 204 | |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 205 | |
| 206 | <hr /> |
| 207 | <p> |
| 208 | <h2><a name="job_control">Why do I keep getting "sh: can't access tty; job control |
| 209 | turned off" errors? Why doesn't Control-C work within my shell?</a></h2> |
| 210 | <p> |
| 211 | |
| 212 | Job control will be turned off since your shell can not obtain a controlling |
| 213 | terminal. This typically happens when you run your shell on /dev/console. |
| 214 | The kernel will not provide a controlling terminal on the /dev/console |
| 215 | device. Your should run your shell on a normal tty such as tty1 or ttyS0 |
| 216 | and everything will work perfectly. If you <em>REALLY</em> want your shell |
| 217 | to run on /dev/console, then you can hack your kernel (if you are into that |
| 218 | sortof thing) by changing drivers/char/tty_io.c to change the lines where |
| 219 | it sets "noctty = 1;" to instead set it to "0". I recommend you instead |
| 220 | run your shell on a real console... |
| 221 | |
| 222 | |
| 223 | <hr /> |
| 224 | <p> |
| 225 | <h2><a name="demanding">I demand that you to add <favorite feature> right now! How come |
| 226 | you don't answer all my questions on the mailing list instantly? I demand |
| 227 | that you help me with all of my problems <em>Right Now</em>!</a></h2> |
| 228 | <p> |
| 229 | |
| 230 | You have not paid us a single cent and yet you still have the product of |
| 231 | many years of our work. We are not your slaves! We work on BusyBox |
| 232 | because we find it useful and interesting. If you go off flaming us, we |
| 233 | will ignore you. |
| 234 | |
| 235 | |
| 236 | <hr /> |
| 237 | <p> |
| 238 | <h2><a name="helpme">I need help with BusyBox! What should I do?</a></h2> |
| 239 | <p> |
| 240 | |
| 241 | If you find that you need help with BusyBox, you can ask for help on the |
| 242 | BusyBox mailing list at busybox@mail.busybox.net. In addition to the BusyBox |
| 243 | mailing list, Erik (andersee), Manuel (mjn3) and others are known to hang out |
Rob Landley | e4164b5 | 2005-10-12 19:10:34 +0000 | [diff] [blame] | 244 | on the uClibc IRC channel: #uclibc on irc.freenode.net. (Daily logs of |
| 245 | that IRC channel, going back to 2002, are available |
| 246 | <a href=http://ibot.Rikers.org/%23uclibc/>here</a>.) |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 247 | |
| 248 | <p> |
| 249 | |
| 250 | <b>Please do not send private email to Erik, Manuel, or the other BusyBox |
| 251 | contributors asking for private help unless you are planning on paying for |
| 252 | consulting services.</b> |
| 253 | |
| 254 | <p> |
| 255 | |
| 256 | When we answer questions on the BusyBox mailing list, it helps everyone |
| 257 | since people with similar problems in the future will be able to get help |
| 258 | by searching the mailing list archives. Private help is reserved as a paid |
| 259 | service. If you need to use private communication, or if you are serious |
| 260 | about getting timely assistance with BusyBox, you should seriously consider |
| 261 | paying for consulting services. |
| 262 | |
| 263 | <p> |
| 264 | |
| 265 | |
| 266 | |
| 267 | <hr /> |
| 268 | <p> |
| 269 | <h2><a name="contracts">I need you to add <favorite feature>! Are the BusyBox |
| 270 | developers willing to be paid in order to fix bugs or add in <favorite feature>? |
| 271 | Are you willing to provide support contracts?</a></h2> |
| 272 | <p> |
| 273 | |
| 274 | Sure! Now you have our attention! What you should do is contact <a |
| 275 | href="mailto:andersen@codepoet.org">Erik Andersen</a> of <a |
| 276 | href="http://codepoet-consulting.com/">CodePoet Consulting</a> to bid |
| 277 | on your project. If Erik is too busy to personally add your feature, there |
| 278 | are many other active BusyBox contributors who will almost certainly be able |
Eric Andersen | 6feb200 | 2004-12-20 18:10:03 +0000 | [diff] [blame] | 279 | to help you out. Erik can contact them privately, and may even let you to |
Eric Andersen | 9395ca4 | 2004-10-13 09:42:10 +0000 | [diff] [blame] | 280 | post your request for services on the mailing list. |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 281 | |
| 282 | |
| 283 | <hr /> |
| 284 | <p> |
Mike Frysinger | ef614ec | 2005-04-17 07:25:32 +0000 | [diff] [blame] | 285 | <h2><a name="external">Where can I find other small utilities since busybox |
Mike Frysinger | 77dbe73 | 2005-04-17 04:32:22 +0000 | [diff] [blame] | 286 | does not include the features I want?</a></h2> |
| 287 | <p> |
| 288 | We maintain such a <a href="tinyutils.html">list</a> on this site! |
| 289 | |
| 290 | |
| 291 | <hr /> |
| 292 | <p> |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 293 | <h2><a name="support">I think you guys are great and I want to help support your work!</a></h2> |
| 294 | <p> |
| 295 | |
Eric Andersen | fdab4b1 | 2005-02-09 06:44:36 +0000 | [diff] [blame] | 296 | Wow, that would be great! If you would like to make a donation to help |
| 297 | support BusyBox, and/or request features, you can click here: |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 298 | |
| 299 | <!-- Begin PayPal Logo --> |
| 300 | <center> |
| 301 | <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> |
| 302 | <input type="hidden" name="cmd" value="_xclick"> |
| 303 | <input type="hidden" name="business" value="andersen@codepoet.org"> |
| 304 | <input type="hidden" name="item_name" value="Support BusyBox"> |
Eric Andersen | 9395ca4 | 2004-10-13 09:42:10 +0000 | [diff] [blame] | 305 | <input type="hidden" name="image_url" value="http://codepoet-consulting.com/images/codepoet.png"> |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 306 | <input type="hidden" name="no_shipping" value="1"> |
| 307 | <input type="image" src="images/donate.png" name="submit" alt="Make donation using PayPal"> |
| 308 | </form> |
| 309 | </center> |
| 310 | <!-- End PayPal Logo --> |
| 311 | |
| 312 | If you prefer to contact Erik directly to make a donation, donate hardware, |
| 313 | request support, etc, you can contact |
| 314 | <a href="http://codepoet-consulting.com/">CodePoet Consulting</a> here. |
| 315 | CodePoet Consulting can accept both Visa and MasterCard for those that do not |
| 316 | trust PayPal... |
| 317 | |
| 318 | <hr /> |
Rob Landley | c7a3e1b | 2005-07-31 04:25:00 +0000 | [diff] [blame] | 319 | <p> |
| 320 | <h2><a name="optimize">I want to make busybox even smaller, how do I go about it?</a></h2> |
| 321 | <p> |
| 322 | To conserve bytes it's good to know where they're being used, and the |
| 323 | size of the final executable isn't always a reliable indicator of |
| 324 | the size of the components (since various structures are rounded up, |
| 325 | so a small change may not even be visible by itself, but many small |
| 326 | savings add up). |
| 327 | </p> |
| 328 | <p> |
Rob Landley | d1fa585 | 2005-09-05 10:25:51 +0000 | [diff] [blame] | 329 | The busybox Makefile can generate a report of how much space is actually |
| 330 | being used by each function and variable. Run "<b>make sizes</b>" (preferably |
| 331 | with CONFIG_DEBUG off) to get a list of symbols and the amount of |
| 332 | space allocated for each one, sorted by size. |
Rob Landley | c7a3e1b | 2005-07-31 04:25:00 +0000 | [diff] [blame] | 333 | </p> |
| 334 | <hr /> |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 335 | |
Rob Landley | c7a3e1b | 2005-07-31 04:25:00 +0000 | [diff] [blame] | 336 | |
| 337 | |
Eric Andersen | 6c4a6b1 | 2004-10-08 10:50:08 +0000 | [diff] [blame] | 338 | <br> |
| 339 | <br> |
| 340 | <br> |
| 341 | |
| 342 | <!--#include file="footer.html" --> |