Difference between revisions of "Bering-uClibc 5.x - Developer Guide - Preparing the Build Environment"
m (buildenv is now toolchain) |
Davidmbrooke (Talk | contribs) m (Minor corrections and enhancements to "Cloning the Git Repository") |
||
Line 64: | Line 64: | ||
==Cloning the Git Repository== | ==Cloning the Git Repository== | ||
− | The first step in building [[Bering-uClibc-next]] from source is | + | The first step in building [[Bering-uClibc-next]] from source is to copy or "clone" the Git repository hosted by SourceForge. |
− | Further information on using Git can be found in Appendix [[Bering-uClibc 4. | + | Further information on using Git can be found in Appendix [[Bering-uClibc 4.x - Developer Guide - Hints and Tips for using Git SCM|Hints and Tips for using Git SCM]] but the basic steps are as follows: |
# Change to the directory where you wish to do your [[Bering-uClibc-next]] development. | # Change to the directory where you wish to do your [[Bering-uClibc-next]] development. | ||
− | # Run the following command, replacing ''USERNAME'' with your SourceForge username: <pre>git clone ssh://USERNAME@leaf.git.sourceforge.net/gitroot/leaf/bering- | + | # Run the following command, replacing ''USERNAME'' with your SourceForge username: <pre>git clone ssh://USERNAME@leaf.git.sourceforge.net/gitroot/leaf/bering-uclibc --branch next bering-uclibc-next</pre>Note that this will take some time to run, since it has to download the build toolchain source as well as the source for most of the [[Bering-uClibc-next]] Packages. The arguments to the <code>git glone</code> command are desribed below: |
− | # | + | #* The string "<code>ssh://USERNAME@leaf.git.sourceforge.net/gitroot/leaf/bering-uclibc</code>" specifies the name of the Git repository to be cloned (including the access mechanism, ssh) |
+ | #* The string "<code>--branch next</code>" specifies the name of the branch ('<code>next</code>') to be cloned (in place of the default branch, '<code>master</code>'). Note that this automatically sets up a local branch (called '<code>next</code>') which is configured to automatically "track" the remote branch of the same name. | ||
+ | #* The string "<code>bering-uclibc-next</code>" specifies the name of the local directory to be created, under the current working directory, to hold the clone repository. By default the local directory name would match the name of the repository being cloned (i.e. "<code class="filename">bering-uclibc</code>"). | ||
+ | # Change directory to the <code class="filename">bering-uclibc-next</code> directory created during the clone operation | ||
+ | |||
==Building the Build environment== | ==Building the Build environment== |
Revision as of 20:28, 13 March 2012
Preparing the Build Environment | ||
---|---|---|
Prev | Bering-uClibc-next - Developer Guide | Next |
Contents
Pre-Requisites
Hardware
CPU & RAM
Compiling source code is a CPU- and RAM-intensive operation, so a reasonably powerful machine is advisable. Multiple CPU cores are a benefit - almost all packages are compiled using all cores.
Examples of build performance for "buildtool.pl build" (unpack and build all packages) are:
- 120 minutes
- AMD Athlon(tm) II X4 645 Processor (Quad Core) with 2GB DDR2 RAM, Gentoo (64-bit)
Disk Space
A fully built development environment with all of the Bering-uClibc 4.x Packages and all of the kernel variants occupies more than 8.1 Gigabytes of disk space.
Assume that 8.5 Gigabytes are required.
Operating System
The Bering-uClibc-next kernel and Packages can be built on any modern Linux distribution which has the necessary software development utilities installed. Examples of distributions which are known to work include:
- Gentoo (64-bit)
Required Software on the Build Host
- perl
- All of the "build" utilities (buildtool, buildpackage, buildimage) are written in Perl and require Perl version 5.6 or higher.
- In addition there is a requirement for the Config::General Perl module which is not part of most standard Perl installations. On distributions which use the "yum" package manager (Red Hat, Fedora etc.) the required RPM can usually be installed with:
yum install perl-Config-General
- Furthermore, the
buildimage.pl
utility relies on the Date::Format Perl module which is part of the TimeDate Perl package and can be installed with a command like:yum install perl-TimeDate
- On distributions which use the "dpkg" package manager (Debian, Ubuntu etc.) the required packages can usually be installed with:
aptitude install libconfig-general-perl libdatetime-perl
- cvs
- LEAF currently uses git for source code version control, so the git utility is required.
- patch
- The patch utility is required to apply patches to upstream source distributions.
- texinfo
- Required for the makeinfo utility used for some compilation steps, though the resulting .info files are not used.
- nasm
- Required to build e3.
- zlib-devel (headers for zlib)
- Required to build toolchain (depmod with gzipped modules support).
- bison
- Required to build the (TBC) Package.
- asciidoc
- Required to build the (TBC) Package.
- fakeroot
- Required when building Packages and disk Images, avoiding the need to actually run as the root user on the build host.
- cmake
- Required to build accel-ppp
In addition, the following RPM or similar packages are also required on the build host but are normally a standard part of the base Linux distribution:
- autoconf
- automake
- binutils (for command strip)
- bzip2 (for command bzcat)
- cpio (for generating initrd.lrp)
- flex
- gawk
- gcc
- gzip (for a gzip-compatible zcat)
- libtool
- lzma
- m4
- make
- sed
- tar
- wget
SourceForge User Account
TODO
Cloning the Git Repository
The first step in building Bering-uClibc-next from source is to copy or "clone" the Git repository hosted by SourceForge. Further information on using Git can be found in Appendix Hints and Tips for using Git SCM but the basic steps are as follows:
- Change to the directory where you wish to do your Bering-uClibc-next development.
- Run the following command, replacing USERNAME with your SourceForge username:
git clone ssh://USERNAME@leaf.git.sourceforge.net/gitroot/leaf/bering-uclibc --branch next bering-uclibc-next
Note that this will take some time to run, since it has to download the build toolchain source as well as the source for most of the Bering-uClibc-next Packages. The arguments to thegit glone
command are desribed below:- The string "
ssh://USERNAME@leaf.git.sourceforge.net/gitroot/leaf/bering-uclibc
" specifies the name of the Git repository to be cloned (including the access mechanism, ssh) - The string "
--branch next
" specifies the name of the branch ('next
') to be cloned (in place of the default branch, 'master
'). Note that this automatically sets up a local branch (called 'next
') which is configured to automatically "track" the remote branch of the same name. - The string "
bering-uclibc-next
" specifies the name of the local directory to be created, under the current working directory, to hold the clone repository. By default the local directory name would match the name of the repository being cloned (i.e. "bering-uclibc
").
- The string "
- Change directory to the
bering-uclibc-next
directory created during the clone operation
Building the Build environment
With the source code for the build toolchain downloaded this now has to be compiled for your build host. Run the following command:
./buildtool.pl build toolchain
This will take some considerable time.
Build messages, including any errors, are written to file log/buildtoollog
so you may wish to run the following command in another shell window to keep track of progress:
tail -f log/buildtoollog
Prev | Up | Next |