diff options
author | Rob Landley <rob@landley.net> | 2005-10-09 20:18:32 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2005-10-09 20:18:32 +0000 |
commit | ff9f2f6fbae538d27197e7e357da187031ef33df (patch) | |
tree | 807192cc47eeca3d0fcddf864d262bd4be6713d0 | |
parent | 332fc1006c4387d430e37e6e6858debc08bf9a74 (diff) | |
download | busybox-w32-ff9f2f6fbae538d27197e7e357da187031ef33df.tar.gz busybox-w32-ff9f2f6fbae538d27197e7e357da187031ef33df.tar.bz2 busybox-w32-ff9f2f6fbae538d27197e7e357da187031ef33df.zip |
Fluff out INSTALL a bit.
-rw-r--r-- | INSTALL | 116 | ||||
-rw-r--r-- | README | 1 |
2 files changed, 83 insertions, 34 deletions
@@ -1,52 +1,100 @@ | |||
1 | Building: | 1 | Building: |
2 | ========= | 2 | ========= |
3 | 3 | ||
4 | You will usually build in the source-tree. | 4 | The BusyBox build process is similar to the Linux kernel build: |
5 | 5 | ||
6 | Alternatively you can build out-of-tree to have the object files separated | 6 | make menuconfig # This creates a file called ".config" |
7 | from the source. This allows for building several different configurations | 7 | make # This creates the "busybox" executable |
8 | from the same set of sources. | 8 | make install # or make PREFIX=/path/from/root install |
9 | 9 | ||
10 | A) Building in the source-tree: | 10 | The full list of configuration and install options is available by typing: |
11 | ------------------------------- | ||
12 | 11 | ||
13 | 1) Run 'make config' or 'make menuconfig' and select the | 12 | make help |
14 | functionality that you wish to enable. | ||
15 | 13 | ||
16 | 2) Run 'make' | 14 | Quick Start: |
15 | ============ | ||
17 | 16 | ||
18 | 3) Run 'make install' or 'make PREFIX=/target install' to | 17 | The easy way to try out BusyBox for the first time, without having to install |
19 | install busybox and all the needed links. Some people | 18 | it, is to enable all features and then use "standalone shell" mode with a |
20 | will prefer to install using hardlinks and will instead | 19 | blank command $PATH: |
21 | want to run 'make install-hardlinks'.... | ||
22 | 20 | ||
23 | B) Building out-of-tree: | 21 | make allyesconfig |
24 | ------------------------ | 22 | make |
23 | PATH= ./busybox ash | ||
25 | 24 | ||
26 | Note that top_srcdir, O and top_builddir have to be given as absolute paths. | 25 | Standalone shell mode causes busybox's built-in command shell to run |
26 | any built-in busybox applets directly, without looking for external | ||
27 | programs by that name. Supplying an empty command path (as above) means | ||
28 | the only commands busybox can find are the built-in ones. | ||
27 | 29 | ||
28 | 1) make the directory to hold the object files and chdir to it: | 30 | (Note that the standalone shell requires the /proc directory to function.) |
29 | 'mkdir /tmp/bb ; cd /tmp/bb' | ||
30 | Then prepare the config giving the full path to the source in top_srcdir: | ||
31 | make top_srcdir=/path/busybox -f /path/busybox/Makefile O=/tmp/b allyesconfig | ||
32 | |||
33 | Note that O=$(pwd) is the default if no O= was specified. | ||
34 | 31 | ||
35 | You now have a buildable tree in $O and can run 'make' without the need | 32 | Configuring Busybox: |
36 | to specify any paths. | 33 | ==================== |
37 | 34 | ||
38 | Proceed with step #A2 above. | 35 | Busybox is optimized for size, but enabling the full set of functionality |
36 | still results in a fairly large executable (more than 1 megabyte when | ||
37 | statically linked). To save space, busybox can be configured with only the | ||
38 | set of applets needed for each environment. The minimal configuration, with | ||
39 | all applets disabled, produces a 4k executable. (It's useless, but very small.) | ||
39 | 40 | ||
41 | The manual configurators "make config" and "make menuconfig" modify the | ||
42 | existing configuration. Quick ways to get starting configurations include | ||
43 | "make allyesconfig" (enables almost all options), "make allnoconfig" (disables | ||
44 | all options), "make allbaseconfig" (enables all applets but disables all | ||
45 | optional features), and "make defconfig" (reset to defaults). | ||
40 | 46 | ||
41 | Installation: | 47 | Configuring BusyBox produces a file ".config", which can be saved for future |
42 | ============= | 48 | use. |
43 | 49 | ||
44 | After the build is complete, a busybox.links file is generated. This is | 50 | Installing Busybox: |
45 | used by 'make install' to create symlinks to the BusyBox binary for all | 51 | =================== |
46 | compiled in functions. By default, 'make install' will place the symlink | ||
47 | forest into `pwd`/_install unless you have defined the PREFIX environment | ||
48 | variable (i.e., 'make PREFIX=/tmp/foo install') | ||
49 | 52 | ||
50 | If you wish to install hard links, rather than symlinks, you can use | 53 | Busybox is a single executable that can behave like many different commands, |
51 | 'make PREFIX=/tmp/foo install-hardlinks' instead. | 54 | and BusyBox uses the name it was invoked under to determine the desired |
55 | behavior. (Try "mv busybox ls" and then "./ls -l".) | ||
52 | 56 | ||
57 | Installing busybox consists of creating symlinks (or hardlinks) to the busybox | ||
58 | binary for each applet enabled in busybox, and making sure these symlinks are | ||
59 | in the shell's command $PATH. Running "make install" creates these symlinks, | ||
60 | or "make install-hardlinks" creates hardlinks instead (useful on systems with | ||
61 | a limited number of inodes). This install process ues the file | ||
62 | "busybox.links" (created by make), which contains the list of enabled applets | ||
63 | and the path at which to install them. | ||
64 | |||
65 | The special applet name "busybox" (or with any optional suffix, such as | ||
66 | "busybox-static") uses the first argument to determine which applet to behave | ||
67 | as (for example, "./busybox cat LICENSE"). (Running the busybox applet with | ||
68 | no arguments gives a list of all enabled applets.) | ||
69 | |||
70 | Building out-of-tree: | ||
71 | ===================== | ||
72 | |||
73 | By default, the BusyBox build puts its temporary files in the source tree. | ||
74 | Building from a read-only source tree, or to building multiple | ||
75 | configurations from the same source directory, requires the ability to | ||
76 | put the temporary files somewhere else. | ||
77 | |||
78 | To build out of tree, use the O=$BUILDPATH option during the configuration | ||
79 | step, as in: | ||
80 | |||
81 | make O=/some/empty/directory allyesconfig | ||
82 | cd /some/empty/directory | ||
83 | make | ||
84 | make PREFIX=. install | ||
85 | |||
86 | (Note, O= requires an absolute path.) | ||
87 | |||
88 | Alternately, cd to the empty directory and do this instead: | ||
89 | |||
90 | make top_srcdir=/path/to/source -f /path/to/source/Makefile allyesconfig | ||
91 | make | ||
92 | make install | ||
93 | |||
94 | More Information: | ||
95 | ================= | ||
96 | |||
97 | Se also the busybox FAQ, under the questions "How can I get started using | ||
98 | BusyBox" and "How do I build a BusyBox-based system?" The BusyBox FAQ is | ||
99 | available from http://www.busybox.net/FAQ.html or as the file | ||
100 | docs/busybox.net/FAQ.html in this tarball. | ||
@@ -1,4 +1,5 @@ | |||
1 | Please see the LICENSE file for details on copying and usage. | 1 | Please see the LICENSE file for details on copying and usage. |
2 | Please refer to the INSTALL file for instructions on how to build. | ||
2 | 3 | ||
3 | What is busybox: | 4 | What is busybox: |
4 | 5 | ||