diff --git a/sys-kernel/linux-firmware/Manifest b/sys-kernel/linux-firmware/Manifest index e42e93c..541bddb 100644 --- a/sys-kernel/linux-firmware/Manifest +++ b/sys-kernel/linux-firmware/Manifest @@ -2,3 +2,4 @@ DIST linux-firmware-20260519.tar.xz 622942528 BLAKE2B ff91ed099c4df0cc59dcca6282 DIST linux-firmware-20260622.tar.xz 638944264 BLAKE2B 37463e95e4528c9168a5ea970b0d1b3d1dc18c03fdbb79e1998035e53649228367294318fe8fe276cb69a20551b6eda93d08c42198f0b69ae4f1c6ea54e1da0f SHA512 01355ec0eaad07960c1a447832058787c30b3231883b98d1ce667569d3286e98acc0b138ebfe35f8e9b4abbf48dd0cc0dbdd1629616b72df240013e90cfba9da DIST linux-firmware-20260810.tar.xz 648855508 BLAKE2B 9dd9c6656a026d1d5336c58deecb46ff8b62ef7c5c7870af366c2ce7857bdc9c0a3342aca6a67798c1560cdff146a8299d381188d20bda83b80bd4fa20b9debb SHA512 2ef755194eb022e539aa677474ca5c6c8c3616b3302ebc14e1698c62ccb6ba6f8149e507b46c2a0563297c53502defb892ce4d37eb02646d99d955ae899eebe7 DIST linux-firmware-20260910.tar.xz 656677324 BLAKE2B efaac94064019b7d17bf39ff50a2edd14dc776975e9b3c376e8dcd218c01c7be29567d369a5db1886b463655f572ac8c54aeb3792de2bbe72aa14eda2b75c350 SHA512 b16fa1356b3b22003b24aed69baeca13a361c381ca8f1452a9b5e299e4cc7ff24bf840c539ac9f7a34bf02b469951a66b98d2a15a2c5437ddd8005c96c91e2bc +DIST linux-firmware-20260916.tar.xz 662182768 BLAKE2B 28dcab37ea42571e73787c4868e524ec0186070ed69ac29cf07e1e0d935335c037358364a151faf792e7f07112efb01a773284b471007f94dfa872750bd68627 SHA512 3deda43f570b8cf8e1a81a0e209fd3b261fb43dcb8cd9a8183b49ae719402d68f47c66659e20feb79be8d20f5815c858e7010f435b544b07c59ee78526d86149 diff --git a/sys-kernel/linux-firmware/linux-firmware-20260916.ebuild b/sys-kernel/linux-firmware/linux-firmware-20260916.ebuild new file mode 100644 index 0000000..c1daed3 --- /dev/null +++ b/sys-kernel/linux-firmware/linux-firmware-20260916.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-20260916.tar.xz -> linux-firmware-20260916.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