6 Replies Latest reply on Mar 14, 2018 3:17 AM by tkalfaoglu

    Attempt to bring the amdgpu-pro driver to all linux distros.

    volumetricsteve

      I've written a script that is ^no longer^ a sprawling nightmare, but it looks like it successfully 'undebians' the amdgpu-pro driver.  Below is the code I wrote that reworks the driver package into /etc /lib /usr and /opt.  If you know how to optimize bash particularly well, I'm open to suggestions.  Please note:  If you're using one of the officially supported Linux distributions (presently, RHEL/Cent OS, Ubuntu and SLES)  Use the official AMDGPU-PRO driver for that distribution.  Additionally, those are supported by AMD where as mine is not.

       

      Instructions:

      # Download the Ubuntu driver package (I develop around the one for Ubuntu):: AMDGPU-PRO Driver for Linux® Release Notes

      # Download my script and run it from the same path as the Ubuntu tar:: AMDGPU-INSTALL/amdgpu-pro.sh at master · volumetricsteve/AMDGPU-INSTALL · GitHub

      # Be sure to chmod (using whatever file name you used)::

      chmod +x amdgpu-pro.sh

      # Pray

      # Consider rebooting

       

      This merges the contents of the driver package into your base system, this is pretty unclean and largely unreversable, so only do so with extreme caution and if it busts up your system, it's no fault of mine and not for lack of warning.  However, this is what I did and nothing exploded.  I was able to do a reboot and start up with success, however I still need to configure xorg I suppose, X11 seems confused now. - This has been tested with the 10/13/2016 code, it seems to do just fine.  Configuring Xorg is still up to you - I'm working on it.

       

      Also, be sure to get the AMDAPP-SDK::

      http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/

       

      There is also a development version of my script, don't use it::

      AMDGPU-INSTALL/dev-amdgpu-pro.sh at master · volumetricsteve/AMDGPU-INSTALL · GitHub

       

      Also follow development at::

      VolumetricSteve (@VolumetricSteve) | Twitter

      GitHub - volumetricsteve/AMDGPU-INSTALL

       

      Latest News:

      (11/17/2017) I wanted to clean this thread up and I also realized I've been offering my script 'as is' with the most vital parts of the script commented out, so to all of you using it thinking it may be broken, for some reason I assumed people would go through and uncomment those lines.  I've uncommented them for you, and they will be forevermore.  I've also shuffled things around so this is all more streamlined.  I'm still working on the uninstaller.  I'm going to edit the amdgpu-pro.sh script to provide more useful help about the things it can do and the available options.

       

      (11/15/2017) I've partially tested support for 17.40 and it looks good so far.  I put the new script on GitHub, I'd say it's safe enough to have at it.  I'm going to test it more soon, at present I still don't have the uninstaller where I want it to be, so this installer is still a one-way trip.  I've brought back x64 install support that installs the "all" and "amd64" packages, which should be ok.  More testing is needed, if anyone is feeling brave, please let me know if it works for you.  I also just realized I've been at this for over a year, so that's neat.

       

      (6/24/2017) After a half a week of trying to solve problems that don't need to be solved, I finally have a big chunk of the uninstaller code written.  In the interests of not littering Dev Gurus with constant minor updates, I'll be posting GitHub changes to Twitter and will only announce larger milestones here.  Rip and tear until it is done.

       

      (6/20/2017) As of 10:34 last night, the script has reached a point where OpenCL apps can be compiled, linked against, and run - out of the box.  I believe I've automated everything that's necessary to make the install "complete" so after months of tinkering, I'd say this is the first 'stable' release of the install script.  Version 1 has been reached.  Last night, I was able to run Luxmark on cpu+gpu and BOINC is able to tell I have a gpu as well.  I also rebuilt ffmpeg with opencl but that's not news.  The script on github needed an additional copy command to get the ICD files into a path where my system actually looks for them.  I have to imagine the red hats and ubuntus of the world have some other mechanism for figuring out where libraries/headers/drivers are located, but shoving things into /lib seems to fix the problem.

       

      Old program notes can be found here:

      AMDGPU-INSTALL/Note_history.txt at master · volumetricsteve/AMDGPU-INSTALL · GitHub

        • Re: Attempt to bring the amdgpu-pro driver to Crux (I can't edit or post in my other thread?)
          volumetricsteve

          I think this might turn into a whole installer/uninstaller.  My "installer" code is ugly, but paired with a manifest of md5sums, I should be able to cobble together a pretty decent uninstaller, making all of this much safer.  I'm going to try and have the uninstaller seek within /etc/ /lib/ and /usr/ for matching filenames, compare md5sums and delete.  I figure that should be sufficiently safe.  I'll provide this with the standard, "It's not my problem if it ruins your life, good luck though" warranty that should come with all code on the internet.

           

          I've cleaned up the output of the script as well so you don't get blasted with 2,000 lines of verbose output.  I'm still working on overall efficiency and implementing loops in csh/bash as opposed to C.

          1 of 1 people found this helpful
          • Re: Attempt to bring the amdgpu-pro driver to all linux distros.
            tkalfaoglu

            This is great, thank you.. The output I got was:

            # amdgpu-installer

             

             

            TAR name:amdgpu-pro-17.40-483984.tar.xz

            Root tar Directory:/root

             

            #####################################

            #    AMDGPU-PRO X86/64 INSTALLER    #

            etc

             

            EXTRACTING AMD DEBIAN PACKAGE

            changing working directory to: /root/amdgpu-pro-installdir/

            rm: cannot remove '/root/amdgpu-pro-installdir/Packages': No such file or directory

            rm: cannot remove '/root/amdgpu-pro-installdir/Release': No such file or directory

            mv: cannot stat '/root/amdgpu-pro-installdir/etc': No such file or directory

            mv: cannot stat '/root/amdgpu-pro-installdir/usr': No such file or directory

            mv: cannot stat '/root/amdgpu-pro-installdir/lib': No such file or directory

            mv: cannot stat '/root/amdgpu-pro-installdir/opt': No such file or directory

             

            MERGING ETC

            rsync: change_dir "/root/amdgpu-pro-installdir/DRIVER//etc" failed: No such file or directory (2)

            rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]

            MERGING LIB

            rsync: change_dir "/root/amdgpu-pro-installdir/DRIVER//lib" failed: No such file or directory (2)

            rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]

            MERGING USR

            rsync: change_dir "/root/amdgpu-pro-installdir/DRIVER//usr" failed: No such file or directory (2)

            rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]

            MERGING OPT

            rsync: change_dir "/root/amdgpu-pro-installdir/DRIVER//opt" failed: No such file or directory (2)

            rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]

             

             

            This is Fedora 27 btw..

            -t