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