1 | initial version |
If we want to cross-compile OpenCV for ARM, OpenCV source files contain some script files for Cmake to create make files
download the OpenCV sources and extract it to where if we want (for example /opt and version 2.4.9)
copy the cmake_carma.sh
(for ARM with CUDA) from /opt/opencv-2.4.9/platforms/scripts/
to /opt/opencv-2.4.9/platforms/linux/
or change the -DCMAKE_TOOLCHAIN_FILE
option (open the scrip file) with ../linux/arm-gnueabi.toolchain.cmake
if we want to change (we may need to change gcc version and cuda toolkit path), add or delete some optional parameters open our copied (.../platforms/linux/cmake_carma.sh
) and do what if we want then close
or use cmake_arm_gnueabi_hardfp.sh
/cmake_arm_gnueabi_softfp.sh
(for ARM without CUDA) then
check the toolchain file which is arm-gnueabi.toolchain.cmake
at the .../platforms/linux/
we should check gcc and g++ version for just toolchain file
then go to the script file's folder from terminal then type (I used cmake_carma.sh) sudo sh ./cmake_carma.sh
and enter it will set build files probably with no error
go to the build folder (which we can see from script files 3rd line) from terminal then
sudo make
we must not use -j<n> option for make (I'm trying it with make errors 6 hours -_- ) when it finish
sudo make install
I've installed by this way just before wrote this.