Skip to content

Commit 5643ae2

Browse files
authored
patch away mesa amdgpu kernel version check (#65)
1 parent e47a0a0 commit 5643ae2

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

mesa-mini.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ sed -i \
4949
-e 's/-D video-codecs=all/-D video-codecs=all -D amd-use-llvm=false -D draw-use-llvm=false/' \
5050
"$PKGBUILD"
5151

52+
# Patch AMDGPU DRM version check for compatibility with older kernels
53+
sed -i '/^ cd mesa-\$_pkgver$/a\
54+
echo "Patching amdgpu DRM version check..."\
55+
find . -name "ac_gpu_info.c" -print -exec sed -i "s/info->drm_minor < 54/info->drm_minor < 0/" {} \\;' "$PKGBUILD"
56+
5257
cat "$PKGBUILD"
5358

5459
# Do not build if version does not match with upstream

mesa-nano.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ sed -i \
5151
-e 's/-D video-codecs=all/-D video-codecs=all -D amd-use-llvm=false -D draw-use-llvm=false/' \
5252
"$PKGBUILD"
5353

54+
# Patch AMDGPU DRM version check for compatibility with older kernels
55+
sed -i '/^ cd mesa-\$_pkgver$/a\
56+
echo "Patching amdgpu DRM version check..."\
57+
find . -name "ac_gpu_info.c" -print -exec sed -i "s/info->drm_minor < 54/info->drm_minor < 0/" {} \\;' "$PKGBUILD"
58+
5459
cat "$PKGBUILD"
5560

5661
# Do not build if version does not match with upstream

0 commit comments

Comments
 (0)