RPM using zypper for OpenSUSE, SLES SP2 & SP3

OpenSUSE and SLES SP2 version must be updated to the latest kernel version for the installation of the drivers to succeed. Make sure the system is at the latest version by executing the following commands:

$ sudo zypper update

$ sudo reboot

Untar the repository

tar -jxvf rocm-1.7-opensuse.tar.bz2

The OpenSUSE/SLES operating systems use the zypper command to manage repositories as well. The dkms driver requires DKMS support, which is provided on SLES from a Bumblebee-Project repository. You can install on SLES with the following command:

$ sudo zypper ar -f file://<untar direcgtory>/rocm-1.7-opensuse ROCm

$ sudo zypper ar -f http://download.opensuse.org/repositories/home:/Bumblebee-Project:/Bumblebee3/SLE_12/ Bumblebee-Project
OpenSUSE only? May be required for SLES as well

Before installing the dkms package, there are 2 workarounds that must be done:

$ sudo zypper remove drm-kmp-default

[This is because it will conflict with the kcl definitions for some display functions]

$ sudo rm -f /lib/modules/*/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko

[This is because even with the --force flag, the new amdgpu won't overwrite the stock amdgpu provided by the OS]
 

If you want to install the firmware without overwriting the firmware for the kernel-firmware package (since linux-firmware obsoletes kernel-firmware in the rpm file), you can extract and replace the firmware files with:

$ rpm2cpio <linux-firmware>.rpm | cpio -idmv

$ sudo cp ./usr/lib/firmware/amdgpu/* /lib/firmware/amdgpu

 

Finally, install the rocm packages and update the ramfs image with:

$ sudo zypper install rocm-dkms rocm-opencl-devel

$ sudo dracut --regenerate-all --force
