From d9e20305cb2d0ad19d2b93d1efd5e99d1c530846 Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Fri, 23 Oct 2015 13:52:51 -0700 Subject: [PATCH] add package 'xf86-video-amdgpu' --- config/graphic | 2 +- packages/graphics/libdrm/package.mk | 5 ++- .../x11/driver/xf86-video-amdgpu/package.mk | 41 ++++++++++++++++++ .../xserver/xorg-server/udev.d/97-xorg.rules | 1 + tools/mkpkg/mkpkg_xf86-video-amdgpu | 43 +++++++++++++++++++ 5 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 packages/x11/driver/xf86-video-amdgpu/package.mk create mode 100755 tools/mkpkg/mkpkg_xf86-video-amdgpu diff --git a/config/graphic b/config/graphic index a0758352e2..50421bd7e0 100644 --- a/config/graphic +++ b/config/graphic @@ -64,7 +64,7 @@ get_graphicdrivers() { if [ "$drv" = "radeonsi" ]; then GALLIUM_DRIVERS="$GALLIUM_DRIVERS,radeonsi" - XORG_DRIVERS="$XORG_DRIVERS ati" + XORG_DRIVERS="$XORG_DRIVERS ati amdgpu" LLVM_SUPPORT="yes" COMPOSITE_SUPPORT="yes" VDPAU_SUPPORT="yes" diff --git a/packages/graphics/libdrm/package.mk b/packages/graphics/libdrm/package.mk index 41b2ca54f6..9db967fd57 100644 --- a/packages/graphics/libdrm/package.mk +++ b/packages/graphics/libdrm/package.mk @@ -34,7 +34,7 @@ PKG_AUTORECONF="yes" get_graphicdrivers -DRM_CONFIG="--disable-libkms --disable-intel --disable-radeon" +DRM_CONFIG="--disable-libkms --disable-intel --disable-radeon --disable-amdgpu" DRM_CONFIG="$DRM_CONFIG --disable-nouveau --disable-vmwgfx" for drv in $GRAPHIC_DRIVERS; do @@ -44,7 +44,8 @@ for drv in $GRAPHIC_DRIVERS; do [ "$drv" = "r200" -o "$drv" = "r300" -o "$drv" = "r600" -o "$drv" = "radeonsi" ] && \ DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-libkms/enable-libkms/'` && \ - DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-radeon/enable-radeon/'` + DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-radeon/enable-radeon/'` && \ + DRM_CONFIG=`echo $DRM_CONFIG | sed -e 's/disable-amdgpu/enable-amdgpu/'` done PKG_CONFIGURE_OPTS_TARGET="--disable-udev \ diff --git a/packages/x11/driver/xf86-video-amdgpu/package.mk b/packages/x11/driver/xf86-video-amdgpu/package.mk new file mode 100644 index 0000000000..eb27bd1d19 --- /dev/null +++ b/packages/x11/driver/xf86-video-amdgpu/package.mk @@ -0,0 +1,41 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv) +# +# OpenELEC is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# OpenELEC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC. If not, see . +################################################################################ + +PKG_NAME="xf86-video-amdgpu" +PKG_VERSION="3b0a3c8" +PKG_REV="1" +PKG_ARCH="x86_64" +PKG_LICENSE="OSS" +PKG_SITE="http://www.x.org/" +PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_DEPENDS_TARGET="toolchain xorg-server" +PKG_PRIORITY="optional" +PKG_SECTION="x11/driver" +PKG_SHORTDESC="xf86-video-amdgpu - AMD Radeon video driver for the Xorg X server" +PKG_LONGDESC="AMD Xorg video driver" + +PKG_IS_ADDON="no" +PKG_AUTORECONF="yes" + +PKG_CONFIGURE_OPTS_TARGET="--enable-udev \ + --enable-glamor \ + --with-xorg-module-dir=$XORG_PATH_MODULES" + +post_makeinstall_target() { + rm -r $INSTALL/usr/share +} diff --git a/packages/x11/xserver/xorg-server/udev.d/97-xorg.rules b/packages/x11/xserver/xorg-server/udev.d/97-xorg.rules index 481a06764d..4dfbd29530 100644 --- a/packages/x11/xserver/xorg-server/udev.d/97-xorg.rules +++ b/packages/x11/xserver/xorg-server/udev.d/97-xorg.rules @@ -31,6 +31,7 @@ GOTO="end_video" # check for drivers using the pci substem LABEL="subsystem_pci" DRIVER=="i915", ENV{xorg_driver}="i915", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xorg-configure@i915.service" +DRIVER=="amdgpu", ENV{xorg_driver}="amdgpu", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xorg-configure@amdgpu.service" DRIVER=="radeon", ENV{xorg_driver}="radeon", TAG+="systemd", ENV{SYSTEMD_WANTS}+="xorg-configure@radeon.service" GOTO="end_video" diff --git a/tools/mkpkg/mkpkg_xf86-video-amdgpu b/tools/mkpkg/mkpkg_xf86-video-amdgpu new file mode 100755 index 0000000000..764e56c59f --- /dev/null +++ b/tools/mkpkg/mkpkg_xf86-video-amdgpu @@ -0,0 +1,43 @@ +#!/bin/sh +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +echo "getting sources..." + if [ ! -d xf86-video-amdgpu.git ]; then + git clone git://anongit.freedesktop.org/xorg/driver/xf86-video-amdgpu xf86-video-amdgpu.git + fi + + cd xf86-video-amdgpu.git + git pull + GIT_REV=`git log -n1 --format=%h` + cd .. + +echo "copying sources..." + rm -rf xf86-video-amdgpu-$GIT_REV + cp -R xf86-video-amdgpu.git xf86-video-amdgpu-$GIT_REV + +echo "cleaning sources..." + rm -rf xf86-video-amdgpu-$GIT_REV/.git + +echo "packing sources..." + tar cvJf xf86-video-amdgpu-$GIT_REV.tar.xz xf86-video-amdgpu-$GIT_REV + +echo "remove temporary sourcedir..." + rm -rf xf86-video-amdgpu-$GIT_REV