diff options
author | Guo Yejun <yejun.guo@intel.com> | 2015-01-09 21:42:55 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2015-01-12 09:05:24 +0800 |
commit | f9a012929bf1f5b6249482ff169f6e86647f1364 (patch) | |
tree | a2daf970216d7218830002d12932a19a1ba50d2d /GetGenID.sh | |
parent | d191ae473190bc47e41df6dc3a73cbfd7d3214bb (diff) |
add CMake option USE_STANDALONE_GBE_COMPILER and STANDALONE_GBE_COMPILER_DIR
At some platforms with old c/c++ environment, C++11 features are not
supported, it results in the failure to build the gbe compiler part
which depends on LLVM/clang using C++11 features.
The way to resolve is to build a standalone gbe compiler within another
feasible system, and build beignet with the already built standalone
gbe compiler by setting USE_STANDALONE_GBE_COMPILER=true. The path of
the standalone compiler is /usr/local/lib/beignet as default or could
be specified by STANDALONE_GBE_COMPILER_DIR.
Once USE_STANDALONE_GBE_COMPILER is given, all the gbe compiler relative
code will not be built any longer, only libcl.so and libgebinterp.so are
built. And libcl.so is special for GEN_PCI_ID, which is queried from the
building machie or could be specified as CMake option.
v2: separate the CMake option name.
update the commit comments.
add back the script for gen pci id, and build driver with it.
v3: add file FindStandaloneGbeCompiler.cmake to make the main cmakefile clean.
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'GetGenID.sh')
-rwxr-xr-x | GetGenID.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/GetGenID.sh b/GetGenID.sh new file mode 100755 index 00000000..7acf9bda --- /dev/null +++ b/GetGenID.sh @@ -0,0 +1,26 @@ +#!/bin/bash +genpciid=(0152 0162 0156 0166 015a 016a 0f31 0402 0412 0422 040a 041a 042a 0406 0416 0426 0c02 0c12 0c22 0c0a 0c1a 0c2a 0c06 0c16 0c26 0a02 0a12 0a22 0a0a 0a1a 0a2a 0a06 0a16 0a26 0d02 0d12 0d22 0d0a 0d1a 0d2a 0d06 0d16 0d26) +pciid=($(lspci -nn | grep "\[8086:.*\]" -o | awk -F : '{print $2}' | awk -F ] '{print $1}')) +n=${#pciid[*]} +i=0 +m=${#genpciid[*]} +j=0 +while [ $i -lt $n ] +do + id1=${pciid[$i]} + let j=0 + + while [ $j -lt $m ] + do + id2=${genpciid[$j]} + + if [ ${id1} == ${id2} ] + then + echo ${id1} + exit 0 + fi + let j=j+1 + done + + let i=i+1 +done |