Your Name 7 years ago
parent
commit
4275de6f3c
2 changed files with 71 additions and 70 deletions
  1. 67 65
      setup_amd.sh
  2. 4 5
      setup_nvidia.sh

+ 67 - 65
setup_amd.sh

@@ -84,54 +84,54 @@ sudo apt dist-upgrade -y
 sudo apt-get remove linux-image-4.4.0-116* linux-headers-4.4.0-116* -y
 
 if [ $ROCM_ = "YES" ]
-then
-sudo apt-get install libnuma-dev -y
-echo -e "\n\e[95mInstall ROCm Compute:\e[0m"
-#update ROCM
-sudo apt-get install libnuma-dev -y
-wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
-sudo sh -c 'echo deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main > /etc/apt/sources.list.d/rocm.list'
-sudo apt-get update
-sudo apt-get install rocm-dkms rocm-opencl-dev -y
-sudo usermod -a -G video work
-cd ..
-echo -e "\e[97mDone !\e[0m"
+ then
+ sudo apt-get install libnuma-dev -y
+ echo -e "\n\e[95mInstall ROCm Compute:\e[0m"
+ #update ROCM
+ sudo apt-get install libnuma-dev -y
+ wget -qO - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
+ sudo sh -c 'echo deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main > /etc/apt/sources.list.d/rocm.list'
+ sudo apt-get update
+ sudo apt-get install rocm-dkms rocm-opencl-dev -y
+ sudo usermod -a -G video work
+ cd ..
+ echo -e "\e[97mDone !\e[0m"
 fi
 
 echo -e "\n\e[95mInstall AMD Drivers :\e[0m"
 mkdir /home/work/tempo |true
 cd /home/work/tempo
 if [ $Drivers = "18.20" ]
-then
-echo "Download amdgpu-pro-18.20-606296.tar.xz"
-#curl -sf http://wareck.free.fr/grinder/drivers/amdgpu-pro-17.50-511655.tar.xz | tar xvJ
-wget -c http://wareck.free.fr/grinder/drivers/amdgpu-pro-18.20-606296.tar.xz
-tar xvfJ amdgpu-pro-18.20-606296.tar.xz
-rm amdgpu-pro-18.20-606296.tar.xz
-#cd amdgpu-pro-17.50-511655
-cd amdgpu-pro-18.20-606296
-if [ $ROCM_ = "YES" ]
-then
-sed -i -e "s/amdgpu-pro-dkms libdrm2-amdgpu-pro/libdrm2-amdgpu-pro/g" amdgpu-pro-install
-./amdgpu-pro-install --pro --opencl=legacy,rocm -y
-else
-./amdgpu-pro-install --pro --opencl=legacy -y
-fi
+ then
+ echo "Download amdgpu-pro-18.20-606296.tar.xz"
+ #curl -sf http://wareck.free.fr/grinder/drivers/amdgpu-pro-17.50-511655.tar.xz | tar xvJ
+ wget -c http://wareck.free.fr/grinder/drivers/amdgpu-pro-18.20-606296.tar.xz
+ tar xvfJ amdgpu-pro-18.20-606296.tar.xz
+ rm amdgpu-pro-18.20-606296.tar.xz
+ #cd amdgpu-pro-17.50-511655
+ cd amdgpu-pro-18.20-606296
+  if [ $ROCM_ = "YES" ]
+  then
+  sed -i -e "s/amdgpu-pro-dkms libdrm2-amdgpu-pro/libdrm2-amdgpu-pro/g" amdgpu-pro-install
+  ./amdgpu-pro-install --pro --opencl=legacy,rocm -y
+  else
+  ./amdgpu-pro-install --pro --opencl=legacy -y
+  fi
 fi
 
 if [ $Drivers = "17.50" ]
-then
-wget -c http://wareck.free.fr/grinder/drivers/amdgpu-pro-17.50-511655.tar.xz
-tar xvfJ amdgpu-pro-17.50-511655.tar.xz
-rm amdgpu-pro-17.50-511655.tar.xz
-cd amdgpu-pro-17.50-511655
-if [ $ROCM_ = "YES" ]
-then
-sed -i -e "s/amdgpu-pro-dkms libdrm2-amdgpu-pro/libdrm2-amdgpu-pro/g" amdgpu-pro-install
-./amdgpu-pro-install --pro --opencl=legacy,rocm -y
-else
-./amdgpu-pro-install --pro --opencl=legacy -y
-fi
+ then
+ wget -c http://wareck.free.fr/grinder/drivers/amdgpu-pro-17.50-511655.tar.xz
+ tar xvfJ amdgpu-pro-17.50-511655.tar.xz
+ rm amdgpu-pro-17.50-511655.tar.xz
+ cd amdgpu-pro-17.50-511655
+  if [ $ROCM_ = "YES" ]
+  then
+  sed -i -e "s/amdgpu-pro-dkms libdrm2-amdgpu-pro/libdrm2-amdgpu-pro/g" amdgpu-pro-install
+  ./amdgpu-pro-install --pro --opencl=legacy,rocm -y
+  else
+  ./amdgpu-pro-install --pro --opencl=legacy -y
+  fi
 fi
 
 echo -e "\n\e[95mInstall AMD SDK :\e[0m"
@@ -163,17 +163,17 @@ sudo chown work claymore_zcash
 sudo chown work /home/work/miner.sh
 
 if [ $ETHMine = "YES" ]
-then
-echo -e "\n\e[95mInstall ETHMiner :\e[0m"
-cd ~
-if [ ! -d cpp_ethminer ]
-then
-git clone https://github.com/ethereum-mining/ethminer.git cpp_ethminer
-else
-cd cpp_ethminer
-git pull
-cd ~
-fi
+ then
+ echo -e "\n\e[95mInstall ETHMiner :\e[0m"
+ cd ~
+  if [ ! -d cpp_ethminer ]
+  then
+  git clone https://github.com/ethereum-mining/ethminer.git cpp_ethminer
+  else
+  cd cpp_ethminer
+  git pull
+  cd ~
+  fi
 cd cpp_ethminer
 git submodule update --init --recursive
 mkdir build |true
@@ -189,14 +189,14 @@ if [ $SGMINER = "YES" ]
 then
 echo -e "\n\e[95mInstall Sgminer-Nicehash:\e[0m"
 cd ~
-if [ ! -d sgminer ]
-then
-git clone https://github.com/nicehash/sgminer.git
-cd sgminer
-else
-cd sgminer
-git pull
-fi
+ if [ ! -d sgminer ]
+ then
+ git clone https://github.com/nicehash/sgminer.git
+ cd sgminer
+ else
+ cd sgminer
+ git pull
+ fi
 sudo apt install git autoconf automake libtool build-essential libncurses5-dev libcurl4-gnutls-dev -y
 git submodule init
 git submodule update
@@ -211,12 +211,12 @@ if [ $SGMINER_TT = "YES" ]
 then
 echo -e "\n\e[95mInstall Sgminer-Timetravel:\e[0m"
 cd ~
-if [ ! -d sgminer-timetravel ]
-then
-sudo -u work curl -sf http://wareck.free.fr/openrig/miners/sgminer-timetravel.tar.xz | tar xvJ
-cd ~
-echo -e "\e[97mDone !\e[0m"
-fi
+  if [ ! -d sgminer-timetravel ]
+  then
+  sudo -u work curl -sf http://wareck.free.fr/openrig/miners/sgminer-timetravel.tar.xz | tar xvJ
+  cd ~
+  echo -e "\e[97mDone !\e[0m"
+  fi
 fi
 
 if [ $Lyra2z = "YES" ]
@@ -420,7 +420,9 @@ then
 cat <<EOF>> /home/work/.bashrc
 export DISPLAY=:0
 echo -e "
-Open Mining Platform v$script_version
+\e[97mOpen Mining Platform \e[96mv123 \e[0m
+wareck@gmail.com
+
 "
 EOF
 fi

+ 4 - 5
setup_nvidia.sh

@@ -165,7 +165,7 @@ sudo sed -i -e "s/nvcc_ARCH += -gencode=arch=compute_50,code/#nvcc_ARCH += -genc
 else
 cd ccminer
 git pull
-make
+make -j $(nproc)
 fi
 fi
 
@@ -184,7 +184,7 @@ cd ~/xmrig
 mkdir build | true
 cd build
 cmake ..
-make
+make -j $(nproc)
 fi
 
 if [ $XmrStak = "YES" ]
@@ -195,7 +195,7 @@ wget https://www.open-mpi.org/software/hwloc/v1.11/downloads/hwloc-1.11.8.tar.gz
 tar xzvf hwloc-1.11.8.tar.gz
 cd hwloc-1.11.8
 ./configure --prefix=/usr/local
-make
+make -j $(nproc)
 sudo make install
 cd ~
 if ! [ -d xmr-stak ];then git clone https://github.com/fireice-uk/xmr-stak.git;fi
@@ -206,13 +206,12 @@ if [ -d build ]
 then
 rm -r build
 fi
-
 mkdir build
 sed -i -e "s/= 2.0/= 0.0/g" xmrstak/donate-level.hpp
 cd build
 cmake -DCUDA_ENABLE=ON -DHWLOC_ENABLE=OFF -DCPU_ENABLE=OFF -DOpenCL_ENABLE=OFF -DOpenSSL_ENABLE=ON -DMICROHTTPD_ENABLE=OFF -DCMAKE_LINK_STATIC=ON ..
 sleep 2
-make $(if $(THREADS="-j$(($(tail -c 2 /sys/devices/system/node/node0/cpulist 2>/dev/null)+2))"); then echo $THREADS; fi)
+make -j $(nproc)
 cd ~
 if [ -f ~/xmr-miner ];
 then