Skip to content

Instantly share code, notes, and snippets.

@raym0n
Forked from kusayuzayushko/RX-kernel.sh
Created January 12, 2018 21:40
Show Gist options
  • Save raym0n/2e914e2720d6b54bc76bc3ba727b1f4e to your computer and use it in GitHub Desktop.
Save raym0n/2e914e2720d6b54bc76bc3ba727b1f4e to your computer and use it in GitHub Desktop.
RX-kernel-upgrade.sh
#!/bin/bash
update="http://5.129.88.102:8000/RX-UPDATE.tar.gz"
dir=/var/tmp/RX-UPDATE
echo " stopping miner "
echo "########################################################################"
sudo killall -9 screen
sudo killall -9 Xorg
echo " preparing installation "
echo "########################################################################"
cd /var/tmp
rm -rf RX-UPDATE*
wget $update
tar -xzvf RX-UPDATE.tar.gz
echo " updating amdgpu firmware "
echo "########################################################################"
sudo rm -rf /lib/firmware/amdgpu/*
sudo cp $dir/amdgpu-pro-fw/* /lib/firmware/amdgpu/
echo " installing new kernel "
echo "########################################################################"
sudo dpkg -i -E $dir/linux-headers-4.13.10-smos+_2_amd64.deb $dir/linux-image-4.13.10-smos+_2_amd64.deb || echo "Something is wrong, contact SMOS support and report the problem"
echo " updating amdgpu-pro "
sudo apt-get update -y
cd $dir/amdgpu-pro-17.40 && chmod +x amdgpu-pro-install && sudo ./amdgpu-pro-install --compute -y
sudo sed 's/amdgpu.vm_fragment_size=9//g' -i /etc/default/grub
sudo update-grub
sudo apt-get clean
echo " Looks like i'm done "
echo " Rebooting"
# sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment