deploy.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/bash
  2. # Some useful environment variables
  3. RUNTIME_LINK="http://portablecl.org/downloads/pocl-0.14.tar.gz"
  4. BENCHMARK_LINK="http://www.cs.virginia.edu/~kw5na/lava/Rodinia/Packages/Current/rodinia_3.1.tar.bz2"
  5. BASE_DIR=`pwd`
  6. # Install all the needed dependencies for compiling the runtime
  7. sudo apt-get update && sudo apt-get upgrade -y
  8. sudo apt-get install -y vim build-essential flex bison libtool libncurses5* git-core htop cmake libhwloc-dev libclang-3.8-dev clang-3.8 and llvm-3.8-dev zlib1g ocl-icd-libopencl1 clinfo libglew-dev time gnuplot clinfo ocl-icd-dev ocl-icd-opencl-dev
  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. if [ ! -d "benchmark" ]; then
  15. mkdir benchmark
  16. wget -qO- $BENCHMARK_LINK | tar xjvf - -C benchmark/
  17. fi
  18. RUNTIME_DIR=runtime/`ls runtime`
  19. BENCHMARK_DIR=benchmark/`ls benchmark`
  20. echo $RUNTIME_DIR
  21. echo $BENCHMARK_DIR
  22. if [ ! -d "$RUNTIME_DIR/build" ]; then
  23. mkdir $RUNTIME_DIR/build
  24. fi
  25. # Compile the runtime
  26. cd $RUNTIME_DIR/build
  27. cmake -DLLC_HOST_CPU=cortex-a15 ../
  28. make -j8
  29. # Add the .icd file that enable the ocl-icd loader to identify the mali platform
  30. echo "/usr/lib/arm-linux-gnueabihf/mali-egl/libOpenCL.so" | sudo tee /etc/OpenCL/vendors/mali.icd