diff options
author | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2016-06-28 23:23:24 +0200 |
---|---|---|
committer | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2016-06-28 23:23:24 +0200 |
commit | 587479a0669c3859241b0bcd50ed4fdc2fc3e26f (patch) | |
tree | e929cae5d33a4bfa139cb539bee11f493eae77e9 /sys-firmware/amdgpu-ucode/amdgpu-ucode-20160628.ebuild | |
parent | 0ff6cbe29216d8421f834abe53d2529f214f4ccf (diff) | |
download | gentoo-587479a0669c3859241b0bcd50ed4fdc2fc3e26f.tar.gz gentoo-587479a0669c3859241b0bcd50ed4fdc2fc3e26f.tar.xz |
sys-firmware/amdgpu-ucode: update snapshot to 20160628
Package-Manager: portage-2.2.28
Diffstat (limited to 'sys-firmware/amdgpu-ucode/amdgpu-ucode-20160628.ebuild')
-rw-r--r-- | sys-firmware/amdgpu-ucode/amdgpu-ucode-20160628.ebuild | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/sys-firmware/amdgpu-ucode/amdgpu-ucode-20160628.ebuild b/sys-firmware/amdgpu-ucode/amdgpu-ucode-20160628.ebuild new file mode 100644 index 00000000000..0779d9b63b1 --- /dev/null +++ b/sys-firmware/amdgpu-ucode/amdgpu-ucode-20160628.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit linux-info + +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/${P}.tar.xz + legacy? ( mirror://gentoo/${P/amdgpu/radeon}.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 + +AMDGPU_LEGACY_CIK="bonaire hawaii kabini kaveri mullins" + +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 +} |