Add support for amdgpu #180

Closed
opened 2016-02-06 08:42:33 +00:00 by philm · 8 comments
philm commented 2016-02-06 08:42:33 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

I'm working currently on adding support for amdgpu. Followed issues we have:

  • the driver only works with kernel 4.2 or higher
  • we have to add a function to disable mhwd config for amdgpu (done)
  • we have to find a way to remove the package xf86-video-amdgpu from being installed when the kernel is not ready for it yet
*Created by: philmmanjaro* I'm working currently on adding support for amdgpu. Followed issues we have: - the driver only works with kernel 4.2 or higher - we have to add a function to disable mhwd config for amdgpu (done) - we have to find a way to remove the package **xf86-video-amdgpu** from being installed when the kernel is not ready for it yet
philm commented 2016-02-06 09:06:47 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

In util-iso followed functions it seems we have to add a kernel version detection routine and add xf86-video-amdgpu to be removed if the kernel doesn't support amdgpu yet:

    if [[ ${1##*/} == 'Packages-Mhwd' ]]; then
        packages_cleanup=$(sed "$_com_rm" "$1" \
            | grep cleanup \
            | sed "$_purge_rm" \
            | sed "$_kernel" \
            | sed "$_clean")
    fi
*Created by: philmmanjaro* In **util-iso** followed functions it seems we have to add a kernel version detection routine and add **xf86-video-amdgpu** to be removed if the kernel doesn't support **amdgpu** yet: ``` if [[ ${1##*/} == 'Packages-Mhwd' ]]; then packages_cleanup=$(sed "$_com_rm" "$1" \ | grep cleanup \ | sed "$_purge_rm" \ | sed "$_kernel" \ | sed "$_clean") fi ```
philm commented 2016-02-06 09:51:48 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

@udeved: any thoughts on this one?

*Created by: philmmanjaro* @udeved: any thoughts on this one?
philm commented 2016-02-06 10:09:25 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

Can't we check /proc/config.gz nd grep the config string?
If it exists, we remove xorg driver?

*Created by: udeved* Can't we check /proc/config.gz nd grep the config string? If it exists, we remove xorg driver?
philm commented 2016-02-06 10:13:25 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

You mean some like zcat /proc/config.gz | grep CONFIG_DRM_AMDGPU=?

*Created by: philmmanjaro* You mean some like `zcat /proc/config.gz | grep CONFIG_DRM_AMDGPU=`?
philm commented 2016-02-06 10:17:42 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

so replace [[ ${_used_kernel} < "42" ]] && packages_cleanup="$packages_cleanup xf86-video-amdgpu" with [[ -z $(zcat /proc/config.gz | grep CONFIG_DRM_AMDGPU=) ]] && packages_cleanup="$packages_cleanup xf86-video-amdgpu" then? Remove _used_kernel=${kernel:5:2} \ ...

*Created by: philmmanjaro* so replace `[[ ${_used_kernel} < "42" ]] && packages_cleanup="$packages_cleanup xf86-video-amdgpu"` with `[[ -z $(zcat /proc/config.gz | grep CONFIG_DRM_AMDGPU=) ]] && packages_cleanup="$packages_cleanup xf86-video-amdgpu"` then? Remove `_used_kernel=${kernel:5:2} \` ...
philm commented 2016-02-06 10:32:40 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: udeved

Yes, something like that.
Haven't looked at our changes yet, but if we check for config string, we are basically no bound to a specific kernel version.

*Created by: udeved* Yes, something like that. Haven't looked at our changes yet, but if we check for config string, we are basically no bound to a specific kernel version.
philm commented 2016-02-06 10:54:22 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

Well, I think proc is only active on the host system. We have to find that config file in the root-image folder and check for that one.

*Created by: philmmanjaro* Well, I think proc is only active on the host system. We have to find that config file in the **root-image folder** and check for that one.
philm commented 2016-02-06 10:57:00 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

... as of now it should work by detecting the kernel version. It is not perfect but for having the config file it seems we have to install kernel headers.

*Created by: philmmanjaro* ... as of now it should work by detecting the kernel version. It is not perfect but for having the config file it seems we have to install kernel headers.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tools/manjaro-tools#180
No description provided.