2005-10-05 07:40:46 +00:00
|
|
|
Building:
|
|
|
|
=========
|
|
|
|
|
|
|
|
You will usually build in the source-tree.
|
|
|
|
|
|
|
|
Alternatively you can build out-of-tree to have the object files separated
|
|
|
|
from the source. This allows for building several different configurations
|
|
|
|
from the same set of sources.
|
|
|
|
|
|
|
|
A) Building in the source-tree:
|
|
|
|
-------------------------------
|
|
|
|
|
2004-03-15 08:29:22 +00:00
|
|
|
1) Run 'make config' or 'make menuconfig' and select the
|
2001-11-10 11:22:46 +00:00
|
|
|
functionality that you wish to enable.
|
2001-05-10 14:12:20 +00:00
|
|
|
|
2005-09-16 04:21:25 +00:00
|
|
|
2) Run 'make'
|
2001-05-10 14:12:20 +00:00
|
|
|
|
2005-10-05 07:40:46 +00:00
|
|
|
3) Run 'make install' or 'make PREFIX=/target install' to
|
2003-07-14 21:21:08 +00:00
|
|
|
install busybox and all the needed links. Some people
|
|
|
|
will prefer to install using hardlinks and will instead
|
|
|
|
want to run 'make install-hardlinks'....
|
2005-10-05 07:40:46 +00:00
|
|
|
|
|
|
|
B) Building out-of-tree:
|
|
|
|
------------------------
|
|
|
|
|
2005-10-07 17:44:14 +00:00
|
|
|
Note that top_srcdir, O and top_builddir have to be given as absolute paths.
|
|
|
|
|
2005-10-05 07:40:46 +00:00
|
|
|
1) make the directory to hold the object files and chdir to it:
|
|
|
|
'mkdir /tmp/bb ; cd /tmp/bb'
|
|
|
|
Then prepare the config giving the full path to the source in top_srcdir:
|
|
|
|
make top_srcdir=/path/busybox -f /path/busybox/Makefile O=/tmp/b allyesconfig
|
|
|
|
|
|
|
|
Note that O=$(pwd) is the default if no O= was specified.
|
|
|
|
|
|
|
|
You now have a buildable tree in $O and can run 'make' without the need
|
|
|
|
to specify any paths.
|
|
|
|
|
|
|
|
Proceed with step #A2 above.
|
|
|
|
|
|
|
|
|
|
|
|
Installation:
|
|
|
|
=============
|
|
|
|
|
|
|
|
After the build is complete, a busybox.links file is generated. This is
|
|
|
|
used by 'make install' to create symlinks to the BusyBox binary for all
|
|
|
|
compiled in functions. By default, 'make install' will place the symlink
|
|
|
|
forest into `pwd`/_install unless you have defined the PREFIX environment
|
|
|
|
variable (i.e., 'make PREFIX=/tmp/foo install')
|
|
|
|
|
|
|
|
If you wish to install hard links, rather than symlinks, you can use
|
|
|
|
'make PREFIX=/tmp/foo install-hardlinks' instead.
|
|
|
|
|