Просмотр исходного кода

SCRIPTS: Added required packages installation

Added at the beginning of the deploy script the installation od the
required packages for pocl building, in conjunction with an update of
the whole sistem at the beginning.

Also minor refactor of the pocl building commands
Andrea Gussoni 8 лет назад
Родитель
Сommit
1d74251d80
1 измененных файлов с 12 добавлено и 5 удалено
  1. 12 5
      utils/deploy.sh

+ 12 - 5
utils/deploy.sh

@@ -5,6 +5,10 @@ RUNTIME_LINK="http://portablecl.org/downloads/pocl-0.14.tar.gz"
 BENCHMARK_LINK="http://www.cs.virginia.edu/~kw5na/lava/Rodinia/Packages/Current/rodinia_3.1.tar.bz2"
 BASE_DIR=`pwd`
 
+# Install all the needed dependencies for compiling the runtime
+sudo apt-get update && sudo apt-get upgrade -y
+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
+
 # Create the needed folders
 if [ ! -d "runtime" ]; then
     mkdir runtime
@@ -16,16 +20,19 @@ if [ ! -d "benchmark" ]; then
     wget -qO- $BENCHMARK_LINK | tar xjvf - -C benchmark/
 fi
 
-
 RUNTIME_DIR=runtime/`ls runtime`
 BENCHMARK_DIR=benchmark/`ls benchmark`
 echo $RUNTIME_DIR
 echo $BENCHMARK_DIR
 
 if [ ! -d "$RUNTIME_DIR/build" ]; then
-    mkdir $RUNTIME_DIR/build && cd "$_"
-    cmake -DLLC_HOST_CPU=cortex-a15 ../
-    cd $BASE_DIR
+    mkdir $RUNTIME_DIR/build
 fi
-echo `pwd`
 
+# Compile the runtime
+cd $RUNTIME_DIR/build
+cmake -DLLC_HOST_CPU=cortex-a15 ../
+make -j8
+
+# 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