# Some useful environment variables RUNTIME_LINK="http://portablecl.org/downloads/pocl-0.14.tar.gz" BASE_DIR=`pwd` # Check if the build direcroty already exists, otherwise create it if [ ! -d "build" ]; then mkdir build fi cd build # Create the needed folders if [ ! -d "runtime" ]; then mkdir runtime wget -qO- $RUNTIME_LINK | tar xzvf - -C runtime/ fi RUNTIME_DIR=runtime/`ls runtime` if [ ! -d "$RUNTIME_DIR/build" ]; then mkdir $RUNTIME_DIR/build fi # Compile the runtime cd $RUNTIME_DIR/build make clean cmake -DLLC_HOST_CPU=cortex-a15 ../ make clean make -j8 #sudo make install # Add the .icd file that enable the ocl-icd loader to identify the mali platform echo "/usr/lib/arm-linux-gnueabihf/mali-egl/libOpenCL.so" | sudo tee /etc/OpenCL/vendors/mali.icd