summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2017-01-20 17:23:39 +0100
committerChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2017-01-20 17:25:30 +0100
commit8c3ec9d0085f21b69beb4f6f157f7db5b4ad9eb6 (patch)
treef7fef7e61aee45574449527acc3e759da949e75e /sys-firmware
parentgames-strategy/uqm: Remove old (diff)
downloadgentoo-8c3ec9d0085f21b69beb4f6f157f7db5b4ad9eb6.tar.gz
gentoo-8c3ec9d0085f21b69beb4f6f157f7db5b4ad9eb6.tar.bz2
gentoo-8c3ec9d0085f21b69beb4f6f157f7db5b4ad9eb6.zip
sys-firmware/amdgpu-ucode: update to latest firmware, switch to linux-firmware distfile
Bug: https://bugs.gentoo.org/show_bug.cgi?id=605526 Package-Manager: portage-2.3.0
Diffstat (limited to 'sys-firmware')
-rw-r--r--sys-firmware/amdgpu-ucode/Manifest1
-rw-r--r--sys-firmware/amdgpu-ucode/amdgpu-ucode-20161121.ebuild62
2 files changed, 63 insertions, 0 deletions
diff --git a/sys-firmware/amdgpu-ucode/Manifest b/sys-firmware/amdgpu-ucode/Manifest
index d6e78bba208..9b8791e5afa 100644
--- a/sys-firmware/amdgpu-ucode/Manifest
+++ b/sys-firmware/amdgpu-ucode/Manifest
@@ -1,2 +1,3 @@
DIST amdgpu-ucode-20160628.tar.xz 788428 SHA256 7a864a14bedda9a8c6833076afe7070f7d61b9e6288a71ce4f80ce561ae02bd3 SHA512 7a7a50660b8b9c9d4547fa4fcdfd47cf8b55e258ae1ff5900370be0fd2669d4feeb6565f33704d7ed4a171b05ee1bd6e137d14afff091e170514b1bb4984cc8a WHIRLPOOL 0f48ddecf4ab2d4bd9d6307d2afba5b8844cba41bcbddcbe221c403593bc1f73c2586115880ed44b29abc2e1759309f68214cd651fcf4c5f60d8ca4722bf0fc7
+DIST linux-firmware-20170113.tar.xz 40606424 SHA256 dbc63d53ff12bff9ca0bc35ce91436356c2878dce41dc64d0f2b0c25b39e447b SHA512 28b9f4452f7b29d0a641585d792a19fe6eabe3aa9d383934f995c62a6f62db0cb877db16aaac4b2e2b7966f98e0f7b5737e206d0d8cd8a61aa64b2fb5a554749 WHIRLPOOL f63477f35d66c685039a6c85449eaf4416ee0fd32a3a8f5b69a0aa77c1f67759f7a8da05bb49d7cf82a9ac5a52ab44fe75ae6767347c73bb3538e70c3fb79e80
DIST radeon-ucode-20160628.tar.xz 831920 SHA256 342827150d83e2e986e1673dbddb8bf7c63008ae9525de15dfc2284845594a30 SHA512 7ecad7f3c7c734b04a9bf4d01cd7436298ac397fecc97bc0a27d10d26b2c1ee07e5c8428f4ad75dd15aec297a3e15f6c8cc9c227dbb5b6a58a5d9a541d59340e WHIRLPOOL bd1b672eb34853d2fb4c97baf39413bc648584d287bd46a51ae81aaba43faca5702d04a921c798ee6f0f91f5b98a971882f10bb70499c574af3ccfa94796523b
diff --git a/sys-firmware/amdgpu-ucode/amdgpu-ucode-20161121.ebuild b/sys-firmware/amdgpu-ucode/amdgpu-ucode-20161121.ebuild
new file mode 100644
index 00000000000..8b75a1c79ca
--- /dev/null
+++ b/sys-firmware/amdgpu-ucode/amdgpu-ucode-20161121.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit linux-info
+
+AMDGPU_UCODE_LINUX_FIRMWARE="linux-firmware-20170113"
+
+DESCRIPTION="Microcode for C.Islands/V.Islands/A.Islands Radeon GPUs and APUs"
+HOMEPAGE="https://people.freedesktop.org/~agd5f/radeon_ucode/"
+SRC_URI="mirror://gentoo/${AMDGPU_UCODE_LINUX_FIRMWARE}.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}/${AMDGPU_UCODE_LINUX_FIRMWARE}/amdgpu
+
+AMDGPU_LEGACY_CIK="bonaire hainan hawaii kabini kaveri mullins oland pitcairn tahiti verde"
+
+src_unpack() {
+ unpack ${A}
+ mv linux-firmware-* "${AMDGPU_UCODE_LINUX_FIRMWARE}" || die
+}
+
+src_install() {
+ local chip files legacyfiles
+ if use legacy; then
+ pushd ../radeon || die
+ for chip in ${AMDGPU_LEGACY_CIK}; do
+ legacyfiles+=( ${chip}*.bin )
+ done
+ insinto /lib/firmware/radeon
+ doins ${legacyfiles[@]}
+ popd
+ fi
+ files=( *.bin )
+ 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
+}