ARM crosscompile
Jump to navigation
Jump to search
Install the toolchain
If you are cross compiling for ARM, use distribution packages or download prebuilt toolchains from Linaro.
sudo apt-get install lib32stdc++6 lib32z1 # These are ia32 binaries mkdir -p deps/`uname -m`-linux-gnu cd deps wget http://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz tar --strip=1 -C `uname -m`-linux-gnu -xf gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz wget http://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.xz tar --strip=1 -C `uname -m`-linux-gnu -xf gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.xz cd ..
Build
ARMv7
cd deps rsync -a --exclude=.git --exclude=deps .. criu-arm cd criu-arm make \ ARCH=arm \ CROSS_COMPILE=`pwd`/../`uname -m`-linux-gnu/bin/arm-linux-gnueabihf- \ USERCFLAGS="-I`pwd`/../arm-linux-gnueabihf/include -L`pwd`/../arm-linux-gnueabihf/lib" \ PATH="`pwd`/../`uname -m`-linux-gnu/bin:$PATH" cd ../..
ARMv8
cd deps rsync -a --exclude=.git --exclude=deps .. criu-aarch64 cd criu-aarch64 make \ ARCH=aarch64 \ CROSS_COMPILE=`pwd`/../`uname -m`-linux-gnu/bin/aarch64-linux-gnu- \ USERCFLAGS="-I`pwd`/../aarch64-linux-gnu/include -L`pwd`/../aarch64-linux-gnu/lib" \ PATH="`pwd`/../`uname -m`-linux-gnu/bin:$PATH" cd ../..