Build

"Easy Build"

There is an easy way to build Pedigree out of the box on the following systems:
  • Debian-based systems with apt-get (Ubuntu and Mint included)
  • OpenSuSE with zypper
  • Cygwin (albeit without automatic installation)
  • OSX with macports

If you can provide patches to the easy build scripts to support alternative systems, please contact the developers.

The "Easy Build" script automatically obtains required dependencies for a full Pedigree build, creates a cross-compiler for you if one does not exist, and then builds Pedigree. Note that this script can take anyware from a few minutes to 2 or 3 hours, depending on your system specifications. If you have a Pentium 4, don't expect the cross-compiler step to run quickly.

To use the "Easy Build" system run the scripts in the root of the source tree, like so:

user@shell $ pwd
/home/user/pedigree
user@shell $ ./easy_build_x86.sh

The script will ask a few questions and then begin checking dependencies and preparing to compile Pedigree.

When the script completes it will give you the command you should run in future to build Pedigree. Of course, if you want, you can continue to use the easy build script, but it is quite verbose.

Note: if you make a typo on the operating system, just "rm .easy_os" and run the script again.

Prerequisites (if not using "Easy Build")

You will need to make sure you have the following packages (Debian names):
  • libmpfr-dev
  • libgmp3-dev
  • libmpc-dev
  • sqlite3
  • texinfo
  • scons
  • genisoimage
  • mtools on Windows
  • uboot-mkimage for ARM targets that use uboot

Building the Toolchain (if not using "Easy Build")

In order to build Pedigree, you have to build the toolchain.
To build a toolchain for ia32 target, you can use the following:

./scripts/checkBuildSystem.pl i686-pedigree

When asked, you have to provide an absolute path, where the toolchain will be installed.
It can take even a few hours, depending on your system, so better do something useful meanwhile.

Building Pedigree (if not using "Easy Build")

The first time you build Pedigree, you should use:

scons CROSS=/path/to/toolchain/bin/i686-pedigree-

Note that you need to run scons once more after the first compile to ensure applications are injected correctly into the output image.

Once these first two compiles are complete, running scons once gives you a proper build without needing any repeated builds for applications to be injected.

Note that the CROSS variable contains a string to which "gcc", "g++" etc can be added to create a valid compiler path. You shouldn't need any variables on the command line after the first successful compile, as it caches options across runs.

Run scons --help to view additional options that can be set.

Switching Build Targets

To switch build targets, you need to do the following:

scons -c
rm options.cache
rm .sconsign.dblite

Once this is complete (latter rm commands may fail, that's okay), you can use a new cross-compiler in the CROSS parameter to build a new target.

Also available in: HTML TXT