diff --git a/sys-kernel/linux-firmware/Manifest b/sys-kernel/linux-firmware/Manifest index 0d868d7..964dc8d 100644 --- a/sys-kernel/linux-firmware/Manifest +++ b/sys-kernel/linux-firmware/Manifest @@ -1,3 +1,4 @@ DIST linux-firmware-20260221.tar.xz 610993132 BLAKE2B b81f3560d30ebc3a8c1a81cd0431b97dfc1ec595841a4e4b8a2118abaf912be2abb3175b3042c84c859edf98947ef9975ed1c2a70e4e3a3e464734af7404f499 SHA512 6d627228992b090b47758355d7717bbfd356792df201c3beb4860a75fa30d7eba1bcbf833b316ddb9dcfed0d931fa25e6ef4b23533ef529f086085699ceaa83c DIST linux-firmware-20260309.tar.xz 610973936 BLAKE2B 62ec056ad09d3e6740b12454845ffeea250785b566f9c6239ebae19e52d3237a49eeb18bae3726cb7a1bb0bca7ad24b9bbac440132ba8fac3d0adccf654ab4c4 SHA512 2feb9f1221d72e909e36b1d56f50c8f4f20eb00dfcbbb1fa0e9661d0f4cc1a731ef9d8167e1dbe3edd637be9fcc20a3844dae44e05826bd441f77d6b44614e53 DIST linux-firmware-20260410.tar.xz 619615856 BLAKE2B c35531a94841d733690dbfd1e08c6be6c24124a20eac1c75b290820839e962773640a33b29c29376137d55be95d8e5304a86425e2a631b1a0dcc62d45a5d1f6d SHA512 b16c603e058cb1a92cf199c95318adc6dee874920bee377b7c95ca8cc8dabd26d53a97f3aef52c01fde8d186352895e909483fa7c729c8793b9974ccc130a4a6 +DIST linux-firmware-20260519.tar.xz 622942528 BLAKE2B ff91ed099c4df0cc59dcca628270d5e533ab522d616fbf4f40fda79977f409a49c9cc57826dcc999470ce6c117526ce07cf595d01dea202184bfb55d1efadfd6 SHA512 c7177fc092e5f1a896d98690ce13f3f1ba023b003caf0cd5bfb6286d90b9b23e763d5c9bc54532e90d97b37286a872a4071915478f87706f4392253543cd40af diff --git a/sys-kernel/linux-firmware/linux-firmware-20260519.ebuild b/sys-kernel/linux-firmware/linux-firmware-20260519.ebuild new file mode 100644 index 0000000..b6bb33d --- /dev/null +++ b/sys-kernel/linux-firmware/linux-firmware-20260519.ebuild @@ -0,0 +1,81 @@ +# Distributed under the terms of the GNU General Public License v2 +# Autogen by MARK Devkit + +EAPI=7 +QA_PREBUILT="*" + +DESCRIPTION="Linux firmware files" +HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git" +SRC_URI="https://mirrors.edge.kernel.org/pub/linux/kernel/firmware/linux-firmware-20260519.tar.xz -> linux-firmware-20260519.tar.xz" +LICENSE="GPL-2 GPL-2+ GPL-3 BSD MIT MPL-1.1 linux-fw-redistributable BSD-2 BSD-4 ISC no-source-code" +SLOT="0" +KEYWORDS="*" +PATCHES=( + "${FILESDIR}/linux-firmware-copy-firmware.patch" +) +IUSE="initramfs" +RESTRICT="strip" +BDEPEND="initramfs? ( app-arch/cpio ) app-misc/rdfind + +" +RDEPEND="initramfs? ( !<=app-admin/ego-2.8.5 ) + +" +src_prepare() { + default + if use initramfs; then + if [[ -d "${S}/amd-ucode" ]]; then + local UCODETMP="${T}/ucode_tmp" + local UCODEDIR="${UCODETMP}/kernel/x86/microcode" + mkdir -p "${UCODEDIR}" || die + echo 1 > "${UCODETMP}/early_cpio" + local amd_ucode_file="${UCODEDIR}/AuthenticAMD.bin" + cat "${S}"/amd-ucode/*.bin > "${amd_ucode_file}" || die "Failed to concat amd cpu ucode" + if [[ ! -s "${amd_ucode_file}" ]]; then + die "Sanity check failed: '${amd_ucode_file}' is empty!" + fi + pushd "${UCODETMP}" &>/dev/null || die + find . -print0 | cpio --quiet --null -o -H newc -R 0:0 > "${S}"/amd-uc.img + popd &>/dev/null || die + if [[ ! -s "${S}/amd-uc.img" ]]; then + die "Failed to create '${S}/amd-uc.img'!" + fi + else + # If this will ever happen something has changed which + # must be reviewed + die "'${S}/amd-ucode' not found!" + fi + fi + echo "# Remove files that shall not be installed from this list." > ${PN}.conf + find * ! -type d ! \( -name ${PN}.conf -o -name amd-uc.img \) >> ${PN}.conf +} +src_install() { + ./copy-firmware.sh -v "${ED}/lib/firmware" || die + if use initramfs ; then + insinto /lib/firmware/amd-ucode + doins "${S}"/amd-uc.img + fi +} +pkg_preinst() { + # Make sure /boot is available if needed. + use initramfs && ego_pkg_preinst + # Fix 'symlink is blocked by a directory' Bug #871315 on Gentoo and FL-10491 on Funtoo + if has_version "<${CATEGORY}/${PN}-20220913-r1" ; then + rm -rf "${EROOT}"/lib/firmware/qcom/LENOVO/21BX* + fi +} +pkg_postinst() { + # Don't forget to umount /boot if it was previously mounted by us. + use initramfs && ego_pkg_postinst +} +pkg_prerm() { + # Make sure /boot is mounted so that we can remove /boot/amd-uc.img! + use initramfs && ego_pkg_prerm +} +pkg_postrm() { + # Don't forget to umount /boot if it was previously mounted by us. + use initramfs && ego_pkg_postrm +} + + +# vim: filetype=ebuild