sys-kernel/coreos-firmware: update to 20191022

Update coreos-firmware to 20191022, to be compatible with Kernel 5.4.
Also get ebuild in sync with linux-firmware from upstream Gentoo.
This commit is contained in:
Dongsu Park 2020-04-06 17:23:58 +02:00
parent 41542043be
commit 25f179f462
3 changed files with 113 additions and 58 deletions

View File

@ -1 +1 @@
DIST linux-firmware-20181001.tar.gz 158397569 BLAKE2B 2694014f847fb60f5f0c208a479f4cdf0b422ef249735f22f0ef72e0fd385e8ba6737da1b1cf24daf74fd5f28c3c69b96e14850520f16b8a556c7ca734a3557e SHA512 f20b65122381423597cebd5a3018bbe55f0f8697a03b5ae3e7c1c6dd1cddcb1da4f3fddc8e4accb2d780faf1c0e66bed7dda6b1ab1c48d2e0b2435a5a7eb03f7
DIST linux-firmware-20191022.tar.gz 198935619 BLAKE2B 94d90a8e85af7104f08c398d3df20a88dc4d6f86d638565ab6e45e7fc5dff53e4e56a62a859585438812a1438ea7f7c4e4e47ce4adb22b0adf69439feb5803b4 SHA512 2cc99664c8d0275b670373581d7c6e29699f8b84cd6403949182cc1970c3241e5d9c388c34643630a237d87962b7c8e891445969ca9817ac92a4bbbe74e0dc0d

View File

@ -1,37 +1,34 @@
# Copyright 1999-2016 Gentoo Foundation
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild,v 1.30 2013/09/05 05:46:37 vapier Exp $
EAPI=5
EAPI="6"
# Tell linux-info where to find the kernel source/build
KERNEL_DIR="${SYSROOT}/usr/src/linux"
KBUILD_OUTPUT="${SYSROOT}/var/cache/portage/sys-kernel/coreos-kernel"
inherit linux-info
inherit linux-info savedconfig
if [[ ${PV} == 99999999* ]]; then
inherit git-2
inherit git-r3
SRC_URI=""
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
KEYWORDS=""
EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
else
GIT_COMMIT="7c81f23ad903f72e87e2102d8f52408305c0f7a2"
GIT_COMMIT="03dcc2219a339ca826f8966a9005d74dd88c8b26"
SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${GIT_COMMIT}.tar.gz -> linux-firmware-${PV}.tar.gz"
KEYWORDS="~alpha amd64 ~arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 mips ppc ppc64 s390 sh sparc x86"
fi
DESCRIPTION="Linux firmware files"
HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git"
LICENSE="GPL-1 GPL-2 GPL-3 BSD freedist"
SLOT="0/${PVR}"
IUSE=""
LICENSE="linux-firmware ( BSD ISC MIT no-source-code ) GPL-2 GPL-2+"
SLOT="0"
IUSE="savedconfig"
CDEPEND=">=sys-kernel/coreos-modules-4.6.3-r1:="
DEPEND="${CDEPEND}
sys-kernel/coreos-sources"
RDEPEND="${CDEPEND}
!sys-kernel/linux-firmware
RDEPEND="!savedconfig? (
!sys-firmware/alsa-firmware[alsa_cards_ca0132]
!sys-firmware/alsa-firmware[alsa_cards_korg1212]
!sys-firmware/alsa-firmware[alsa_cards_maestro3]
@ -64,8 +61,12 @@ RDEPEND="${CDEPEND}
!sys-firmware/iwl6005-ucode
!sys-firmware/iwl6030-ucode
!sys-firmware/iwl6050-ucode
!x11-drivers/radeon-ucode
"
!sys-firmware/iwl3160-ucode
!sys-firmware/iwl7260-ucode
!sys-firmware/iwl7265-ucode
!sys-firmware/iwl3160-7260-bt-ucode
!sys-firmware/radeon-ucode
)"
#add anything else that collides to this
RESTRICT="binchecks strip"
@ -75,11 +76,19 @@ S="${WORKDIR}/linux-firmware-${PV}"
src_unpack() {
if [[ ${PV} == 99999999* ]]; then
git-2_src_unpack
git-r3_src_unpack
else
default
# rename directory from git snapshot tarball
mv linux-firmware-*/ linux-firmware-${PV} || die
# upstream linux-firmware tarball does not create symlinks for
# cxgb4 firmware files, but "modinfo cxgb4.ko" shows it requires
# t?fw.bin files. So we need to create the symlinks to avoid
# failures at the firmware scanning stage.
ln -sfn t4fw-1.24.3.0.bin linux-firmware-${PV}/cxgb4/t4fw.bin
ln -sfn t5fw-1.24.3.0.bin linux-firmware-${PV}/cxgb4/t5fw.bin
ln -sfn t6fw-1.24.3.0.bin linux-firmware-${PV}/cxgb4/t6fw.bin
fi
}
@ -116,17 +125,63 @@ src_prepare() {
find * -not -type d \
| sort "${T}/firmware" "${T}/firmware" - \
| uniq -u | xargs -r rm
assert
find * -type f -name "* *" -exec rm -f {} \;
# Prune empty directories
default
echo "# Remove files that shall not be installed from this list." > ${PN}.conf
find * \( \! -type d -and \! -name ${PN}.conf \) >> ${PN}.conf
if use savedconfig; then
restore_config ${PN}.conf
ebegin "Removing all files not listed in config"
local file delete_file preserved_file preserved_files=()
while IFS= read -r file; do
# Ignore comments.
if [[ ${file} != "#"* ]]; then
preserved_files+=("${file}")
fi
done < ${PN}.conf || die
while IFS= read -d "" -r file; do
delete_file=true
for preserved_file in "${preserved_files[@]}"; do
if [[ "${file}" == "${preserved_file}" ]]; then
delete_file=false
fi
done
if ${delete_file}; then
rm "${file}" || die
fi
done < <(find * \( \! -type d -and \! -name ${PN}.conf \) -print0 || die)
eend || die
# remove empty directories, bug #396073
find -type d -empty -delete || die
fi
}
src_install() {
if [[ -z "$(find -type f)" ]]; then
die "No firmware files found to install."
if use !savedconfig; then
save_config ${PN}.conf
fi
rm ${PN}.conf || die
insinto /lib/firmware/
doins -r .
doins -r *
}
pkg_preinst() {
if use savedconfig; then
ewarn "USE=savedconfig is active. You must handle file collisions manually."
fi
}
pkg_postinst() {
elog "If you are only interested in particular firmware files, edit the saved"
elog "configfile and remove those that you do not want."
}