Changes

Jump to: navigation, search

Installation

1,066 bytes added, 01:33, 26 July 2014
no edit summary
{{Note|Most probably you don't need manual installation, but rather [[Packages]] for your distro.}}
== Prerequisites Obtaining CRIU Source == You can download the source code as a release tarball or sync the [http://git.criu.org/?p=criu.git;a=summary git repository]. {{Out|{{Latest release}}}}  git clone git://git.criu.org/criu.git cd criu == Dependencies ==
=== Compiler and C Library ===
For native compilation on Debian based systems, install the <code>build-essential</code> package. For cross compiling for ARM and AArch64, the Linaro prebuilt toolchains are a good choice. Installing them is described below.
mkdir toolchainsdeps cd toolchainsdeps
wget http://releases.linaro.org/14.06/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.06_linux.tar.xz
tar --strip=1 -xf gcc-linaro-arm-linux-gnueabihf-4.9-2014.06_linux.tar.xz
wget http://releases.linaro.org/14.06/components/toolchain/binaries/gcc-linaro-aarch64-linux-gnu-4.9-2014.06-02_linux.tar.xz
tar --strip=1 -xf gcc-linaro-aarch64-linux-gnu-4.9-2014.06-02_linux.tar.xz
export PATH="`pwd`/bin:$PATH"
cd ..
If you would like to build from source, you can use the following commands to obtain the source code repositories, configure, and build the code.
mkdir deps
cd deps
git svn clone http://protobuf.googlecode.com/svn/trunk protobuf
cd protobuf
./autogen.sh
./configure --prefix=`pwd`/../`uname -m`-linux-gnu
make
make install
git svn clone http://protobuf-c.googlecode.com/svn/trunk protobuf-c
cd protobuf-c
./autogenbootstrap.sh mkdir ../pbc-`uname -m` cd ../pbc-`uname -m` ../protobuf-c/configure --prefix=`pwd`/../`uname -m` -linux-gnu CPPFLAGS=-I`pwd`/../`uname -m`-linux-gnu/include LDFLAGS=-L`pwd`/../`uname -m`-linux-gnu/lib make make install cd ../.. If you would like to cross-compile for armv7:  cd deps mkdir -p pbc-arm cd pbc-arm ../protobuf-c/configure --host=arm-linux-gnueabihf --prefix=`pwd`/../arm-linux-gnueabihf --disable-protocCC=`pwd`/../bin/arm-linux-gnueabihf-gcc
make
make install
cd ../.. If you would like to cross-compile for armv8:  cd deps mkdir -p pbc-aarch64 cd pbc-aarch64 ../protobuf-c/configure --host=aarch64-linux-gnu --prefix=`pwd`/../aarch64-linux-gnu --disable-protoc CC=`pwd`/../bin/aarch64-linux-gnu-gcc make make install cd ../.. == Building CRIU From Source == With the CRIU source obtained in the first step and dependencies satisfied in the second step, we are now compile CRIU. For native compilation with the dependencies met using distribution packages, simply run <code>make</code> in the CRIU source directory. Here is an example of building natively specifying manually built dependencies.  make USERCFLAGS="-I`pwd`/deps/`uname -m`-linux-gnu/include -L`pwd`/deps/`uname -m`-linux-gnu/lib" Here is an example of cross compiling for armv7. 
=== Linux Kernel ===
The iproute2 tool version 3.5.0 or higher is needed for dumping network namespaces.
The latest one can be cloned from [http://git.kernel.org/?p=linux/kernel/git/shemminger/iproute2.git;a=summary iproute2]. It should be compiled and a path to ip written in the environment variable <code>CR_IP_TOOL</code>.
 
== Building CRIU From Source ==
 
Get the latest release:
{{Out|{{Latest release}}}}
 
Alternatively, use [http://git.criu.org/?p=criu.git;a=summary git.criu.org] git repository. Clone this repo to test new functionality.
 
Then run <code>make</code> in the sources root. Please note that the tool only supports x86_64 and ARM architectures.
== Checking That It Works ==
50
edits

Navigation menu