summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2015-09-02 04:16:35 +0200
committerChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2015-09-02 04:16:35 +0200
commit5bd3914a01c40ebbf9adc75f65ef41f8f9f6bbf7 (patch)
treedee11115779de870fcf61f2e8dca84b5dbd204b3 /sys-firmware
parentwww-client/google-chrome-unstable: automated update (diff)
downloadgentoo-5bd3914a01c40ebbf9adc75f65ef41f8f9f6bbf7.tar.gz
gentoo-5bd3914a01c40ebbf9adc75f65ef41f8f9f6bbf7.tar.bz2
gentoo-5bd3914a01c40ebbf9adc75f65ef41f8f9f6bbf7.zip
sys-firmware/amdgpu-ucode: initial commit
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'sys-firmware')
-rw-r--r--sys-firmware/amdgpu-ucode/Manifest1
-rw-r--r--sys-firmware/amdgpu-ucode/amdgpu-ucode-20150803.ebuild57
-rw-r--r--sys-firmware/amdgpu-ucode/metadata.xml8
3 files changed, 66 insertions, 0 deletions
diff --git a/sys-firmware/amdgpu-ucode/Manifest b/sys-firmware/amdgpu-ucode/Manifest
new file mode 100644
index 000000000000..3fe3b392f63f
--- /dev/null
+++ b/sys-firmware/amdgpu-ucode/Manifest
@@ -0,0 +1 @@
+DIST amdgpu-ucode-20150803.tar.xz 735616 SHA256 8854abd0f356159e20e8abe83f66831d4857a98fd0ffc5856deb13d2c5e6d60d SHA512 821fc3ec12bae64bfdc533bba641b9ac3ca96ba2126bc96830e5b8d552ca188c97f35fcd5b601d6b4798e8c0857f67bfd4fcd1c336b4be58d863adf1103b9fa8 WHIRLPOOL 560820c6f4cd261810421e8cdfbdb4f577488c814ab2b94c6d6329420b562cb014e5adc66601c210699260bb57c92b779bca1a21516f711e906f9e6e1f34a033
diff --git a/sys-firmware/amdgpu-ucode/amdgpu-ucode-20150803.ebuild b/sys-firmware/amdgpu-ucode/amdgpu-ucode-20150803.ebuild
new file mode 100644
index 000000000000..0f31d2dc62bc
--- /dev/null
+++ b/sys-firmware/amdgpu-ucode/amdgpu-ucode-20150803.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit linux-info
+
+DESCRIPTION="Microcode for V.Islands Radeon GPUs and APUs"
+HOMEPAGE="http://people.freedesktop.org/~agd5f/radeon_ucode/"
+SRC_URI="mirror://gentoo/${P}.tar.xz"
+
+LICENSE="radeon-ucode"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="legacy"
+
+RDEPEND="legacy? ( !sys-firmware/radeon-ucode )
+ !>sys-kernel/linux-firmware-20150812[-savedconfig]"
+
+S=${WORKDIR}/radeon_ucode
+
+AMDGPU_LEGACY_CIK="bonaire hawaii kabini kaveri mullins"
+
+src_install() {
+ local directory files legacyfiles
+ if use legacy; then
+ for directory in ${AMDGPU_LEGACY_CIK}; do
+ legacyfiles+=( ${directory}/*.bin )
+ done
+ insinto /lib/firmware/radeon
+ doins ${legacyfiles[@]}
+ fi
+ for directory in */; do
+ if [[ ${AMDGPU_LEGACY_CIK} != *${directory%/}* ]]; then
+ files+=( ${directory}/*.bin )
+ fi
+ done
+ insinto /lib/firmware/amdgpu
+ doins ${files[@]}
+ FILES=( ${files[@]/*\//amdgpu/} ${legacyfiles[@]/*\//radeon/} )
+}
+
+pkg_postinst() {
+ if linux_config_exists && linux_chkconfig_builtin DRM_AMDGPU; then
+ if ! linux_chkconfig_present FIRMWARE_IN_KERNEL || \
+ ! [[ "$(linux_chkconfig_string EXTRA_FIRMWARE)" == *_rlc.bin* ]]; then
+ ewarn "Your kernel has amdgpu DRM built-in but not the microcode."
+ ewarn "For kernel modesetting to work, please set in kernel config"
+ ewarn "CONFIG_FIRMWARE_IN_KERNEL=y"
+ ewarn "CONFIG_EXTRA_FIRMWARE_DIR=\"/lib/firmware\""
+ ewarn "CONFIG_EXTRA_FIRMWARE=\"${FILES[@]}\""
+ ewarn "You may skip microcode files for which no hardware is installed."
+ ewarn "More information at https://wiki.gentoo.org/wiki/AMDGPU#Firmware"
+ fi
+ fi
+}
diff --git a/sys-firmware/amdgpu-ucode/metadata.xml b/sys-firmware/amdgpu-ucode/metadata.xml
new file mode 100644
index 000000000000..5229625eab8b
--- /dev/null
+++ b/sys-firmware/amdgpu-ucode/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>x11</herd>
+ <use>
+ <flag name="legacy">Install firmware for older chipsets which are optionally supported by AMDGPU</flag>
+ </use>
+</pkgmetadata>