get-and-compile-runtime.sh 786 B

123456789101112131415161718192021222324252627282930313233
  1. # Some useful environment variables
  2. RUNTIME_LINK="http://portablecl.org/downloads/pocl-0.14.tar.gz"
  3. BASE_DIR=`pwd`
  4. # Check if the build direcroty already exists, otherwise create it
  5. if [ ! -d "build" ]; then
  6. mkdir build
  7. fi
  8. cd build
  9. # Create the needed folders
  10. if [ ! -d "runtime" ]; then
  11. mkdir runtime
  12. wget -qO- $RUNTIME_LINK | tar xzvf - -C runtime/
  13. fi
  14. RUNTIME_DIR=runtime/`ls runtime`
  15. if [ ! -d "$RUNTIME_DIR/build" ]; then
  16. mkdir $RUNTIME_DIR/build
  17. fi
  18. # Compile the runtime
  19. cd $RUNTIME_DIR/build
  20. make clean
  21. cmake -DLLC_HOST_CPU=cortex-a15 ../
  22. make clean
  23. make -j8
  24. #sudo make install
  25. # Add the .icd file that enable the ocl-icd loader to identify the mali platform
  26. echo "/usr/lib/arm-linux-gnueabihf/mali-egl/libOpenCL.so" | sudo tee /etc/OpenCL/vendors/mali.icd