Browse Source

update temporaire suite panne

Votre Nom 2 years ago
parent
commit
29266ab41a
4 changed files with 64 additions and 15 deletions
  1. 49 15
      build_cube.sh
  2. 8 0
      options/download_pack.sh
  3. 3 0
      pack/.gitignore
  4. 4 0
      pack/clean.sh

+ 49 - 15
build_cube.sh

@@ -1,9 +1,9 @@
 #!/bin/bash
 set -e
-Version=4.7
-Cuda=YES
+Version=5.0
+Cuda=NO
 ZFS=NO
-Drivers=RAW
+Drivers=AMD
 
 if (( $EUID != 0 )); then
    echo -e "\nThis must be run as root. Try 'sudo bash $0'."
@@ -93,9 +93,8 @@ sudo reboot
 
 function nvidia_driver_ {
 if [ ! -f /home/wareck/.pass1 ] && [ ! -f /home/wareck/.pass2 ] && [ ! -f /home/wareck/.pass3 ] && [ ! -f /home/wareck/.pass4 ]
-
 then
-echo -e "$(tput setaf 10)\nInstall NVIDIA GT710 Drivers phase 1:$(tput sgr0)"
+echo -e "$(tput setaf 10)\nInstall Drivers phase 1:$(tput sgr0)"
 echo -e ""
 sleep 5
 fi
@@ -116,9 +115,9 @@ fi
 if ! [ -f /home/wareck/.pass2 ]
 then
 sleep 2
-echo -e "$(tput setaf 10)\nInstall NVIDIA GT710 Drivers 470.$Drivers :$(tput sgr0)"
 case $Drivers in
 RAW)
+		echo -e "$(tput setaf 10)\nInstall NVIDIA GT710 Drivers 470.$Drivers :$(tput sgr0)"
                 cd /home/wareck/
                 echo -e "Download MegaDownload:"
                 git clone https://github.com/wareck/megadown.git
@@ -132,8 +131,9 @@ RAW)
                 decompte_
 ;;
 74)
-	if ! [ -f NVIDIA-Linux-x86_64-470.74.run ]
-	then
+		echo -e "$(tput setaf 10)\nInstall NVIDIA GT710 Drivers 470.$Drivers :$(tput sgr0)"
+		if ! [ -f NVIDIA-Linux-x86_64-470.74.run ]
+		then
         	cd /home/wareck/
 		echo -e "Download MegaDownload:"
         	git clone https://github.com/wareck/megadown.git
@@ -150,6 +150,7 @@ RAW)
 	fi
 ;;
 82)
+	echo -e "$(tput setaf 10)\nInstall NVIDIA GT710 Drivers 470.$Drivers :$(tput sgr0)"
 	if ! [ -f NVIDIA-Linux-x86_64-470.82.00.run ]
 	then
 	        cd /home/wareck/
@@ -168,6 +169,22 @@ RAW)
 		decompte_
 	fi
 ;;
+AMD)
+		echo -e "$(tput setaf 10)\nInstall AMD Drivers :$(tput sgr0)"
+                cd /home/wareck
+                echo -e ""
+                echo -e "Install drivers:"
+		wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/amdgpu-install_22.10.2.50102-1_all.deb -O /home/wareck/Build_Cube/pack/amdgpu-install_22.10.2.50102-1_all.deb
+		wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/linux-firmware.tar.xz
+		sudo cp /home/wareck/linux-firmware/amdgpu/* /lib/firmware/amdgpu/
+		sudo rm -r -f /home/wareck/linux-firmware /home/wareck/linux-firmware.tar.xz
+		sudo apt-get install /home/wareck/Build_Cube/pack/amdgpu-install_22.10.2.50102-1_all.deb -y
+		sudo apt-get update
+		sudo amdgpu-install --opencl=legacy -y
+		sudo apt-get install ocl-icd-opencl-dev -y
+		touch /home/wareck/.pass2
+		decompte_
+;;
 *)
 echo -e "$(tput setaf 9)Error driver number ! $(tput sgr0)\n"
 exit 0
@@ -313,12 +330,20 @@ if ! [ -d build ];then mkdir build ;fi
 git config --global --add safe.directory /home/wareck/xmr-stak
 git pull
 cd build
+
+if [ $Drivers = "AMD" ]
+then
+cmake .. -DCUDA_ENABLE=OFF
+else
 cmake .. -DOpenCL_ENABLE=OFF -DCUDA_ENABLE=OFF
+fi
+
 make -j4
 cd ..
 cd ..
 echo "Done."
-if [ $Cuda = "Yes" ]
+
+if [ $Cuda = "YES" ]
 then
 echo -e "$(tput setaf 10)\nBuild xmrig-cuda:$(tput sgr0)"
 sudo apt-get install git build-essential cmake libuv1-dev nvidia-cuda-dev nvidia-cuda-toolkit libmicrohttpd-dev gcc-8 g++-8
@@ -329,6 +354,7 @@ cd build
 cmake .. -DCMAKE_C_COMPILER=$(which gcc-8) -DCMAKE_CXX_COMPILER=$(which g++-8)
 make -j4
 fi
+
 echo "Done"
 touch /home/wareck/.pass3
 decompte_
@@ -391,13 +417,13 @@ cp /etc/fstab /tmp/fstab
 cat <<"EOF">> /tmp/fstab
 
 #ext4
-UUID=2111c51e-b39e-4d8e-a7af-bfe358c8fb38 /media/Raid ext4
-UUID=1df72b63-fca0-45c6-992c-3e2532d5591a /media/Store ext4
-UUID=27821afb-02ed-4b13-8b61-5980787b4ad1 /media/Partage ext4
+#UUID=2111c51e-b39e-4d8e-a7af-bfe358c8fb38 /media/Raid ext4
+#UUID=1df72b63-fca0-45c6-992c-3e2532d5591a /media/Store ext4
+#UUID=27821afb-02ed-4b13-8b61-5980787b4ad1 /media/Partage ext4
 #btrfs
-UUID=3c48d278-076c-4904-a280-4582c6bf8b24 /media/nvme btrfs ssd,nodatacow,discard=async,noatime
-#external drive
-UUID=5C8687930F62EE79 /media/Chia ntfs auto,nofail,noatime,rw,user    0   0
+#UUID=3c48d278-076c-4904-a280-4582c6bf8b24 /media/nvme btrfs ssd,nodatacow,discard=async,noatime
+external drive
+#UUID=5C8687930F62EE79 /media/Chia ntfs auto,nofail,noatime,rw,user    0   0
 EOF
 sudo cp /tmp/fstab /etc/fstab
 fi
@@ -584,6 +610,14 @@ echo "Done"
 fi
 }
 
+function debugME {
+clear
+echo -e "suite panne disque...les fonctions fstab sont desactiviees"
+echo -e ""
+sleep 5
+}
+
+debugME
 intro_
 autoroot_
 nvidia_driver_

+ 8 - 0
options/download_pack.sh

@@ -33,5 +33,13 @@ download_copy
 box=zfsmanager-0.0.4.wbm.gz
 download_copy
 
+box=amdgpu-install_22.10.2.50102-1_all.deb
+download_copy
+
+box=linux-firmware.tar.xz
+download_copy
+
 cd ..
 rm -r -f temp
+
+echo -e ""

+ 3 - 0
pack/.gitignore

@@ -4,3 +4,6 @@ gerbera.tar.xz
 start_cgminer.tar.xz
 webmin*
 zfsmanager-0.0.4.wbm.gz
+amdgpu-install_22.10.2.50102-1_all.deb
+linux-firmware.tar.xz
+gpu-miners.tar.xz

+ 4 - 0
pack/clean.sh

@@ -5,4 +5,8 @@ sudo rm start_cgminer.tar.xz
 sudo rm zfsmanager-0.0.4.wbm.gz
 sudo rm webmin*
 sudo rm cgminer.conf
+sudo rm amdgpu-install_22.10.2.50102-1_all.deb
+if [ -f gpu_miners.tar.xz ];then sudo rm gpu_miners.tar.xz ;fi
+if [ -f linux-firmware.tar.xz ]; then sudo rm linux-firmware.tar.xz;fi
+if [ -f gpu-miners.tar.xz ]; then sudo rm gpu-miners.tar.xz;fi
 echo "Done"