summaryrefslogtreecommitdiff
path: root/sys-firmware
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
committerV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
commit752d6256e5204b958b0ef7905675a940b5e9172f (patch)
tree330d16e6362a49cbed8875a777fe641a43376cd3 /sys-firmware
parent0c100b7dd2b30e75b799d806df4ef899fd98e1ea (diff)
gentoo resync : 12.05.2022
Diffstat (limited to 'sys-firmware')
-rw-r--r--sys-firmware/Manifest.gzbin5382 -> 5377 bytes
-rw-r--r--sys-firmware/intel-microcode/Manifest6
-rw-r--r--sys-firmware/intel-microcode/intel-microcode-20220419_p20220421.ebuild263
-rw-r--r--sys-firmware/intel-microcode/intel-microcode-20220510_p20220508.ebuild263
-rw-r--r--sys-firmware/raspberrypi-wifi-ucode/Manifest1
-rw-r--r--sys-firmware/raspberrypi-wifi-ucode/raspberrypi-wifi-ucode-20210315.3_p5-r1.ebuild69
-rw-r--r--sys-firmware/sof-firmware/Manifest6
-rw-r--r--sys-firmware/sof-firmware/sof-firmware-1.6.1.ebuild25
-rw-r--r--sys-firmware/sof-firmware/sof-firmware-2.1.1-r1.ebuild (renamed from sys-firmware/sof-firmware/sof-firmware-1.9.ebuild)18
9 files changed, 618 insertions, 33 deletions
diff --git a/sys-firmware/Manifest.gz b/sys-firmware/Manifest.gz
index 3ddf2024c111..e6fc7313ac10 100644
--- a/sys-firmware/Manifest.gz
+++ b/sys-firmware/Manifest.gz
Binary files differ
diff --git a/sys-firmware/intel-microcode/Manifest b/sys-firmware/intel-microcode/Manifest
index 2c9f3cbf92d5..ac488c7c52b0 100644
--- a/sys-firmware/intel-microcode/Manifest
+++ b/sys-firmware/intel-microcode/Manifest
@@ -4,15 +4,21 @@ DIST intel-microcode-collection-20210514.tar.xz 7907672 BLAKE2B d5226008e50e804c
DIST intel-microcode-collection-20210608.tar.xz 8012692 BLAKE2B 98df9d18658bfdf06ac7db84ac30707fe8834874583b324ebc882b514975d71b686788fcd1c9b9c5b05448403b27524e29a94ade34facdffb1645333059019a9 SHA512 7fd810cf05334f6442b9a0c77aef5319d3e2006e887d0354dee952647ded3fa6331a30192abf82eda0676af0439b40f5e3ab0210611f96c78fe52f01f106c5d4
DIST intel-microcode-collection-20210830.tar.xz 8681768 BLAKE2B 84f098285ed0b79b953e1f54b9ca077e42e7a2b6b28e862dddcb23a546ebebdd5afb9e54215b6c6493b72bf82121ace4b06f759413d3745571ff8156db52d6b1 SHA512 8a6a7376524888b0e89f9fd9a592d52a3859f4ddf1d961484b60d77098faa6984c5e8efc9cf4258a943cfc2c3503dbb87989868962a7ad8028c391d897e212b6
DIST intel-microcode-collection-20220207.tar.xz 9362888 BLAKE2B 9efb2a943bffc1d702675c4ca5d17b6bc7f5bf5688fb1979caadbf96c516c31c3e1894823aaa16dbdb8c778c933eaf49dec6f2d416483d11e58ed1e75823cef8 SHA512 72458aa64c05ceb8bb21b296da5ad15230af3e6ac63240a10370fadec09523cf7ebefaaddce2b31e2c16570c2700a875cccf86fd1770046ff36cc30eb594f041
+DIST intel-microcode-collection-20220421.tar.xz 9442704 BLAKE2B 9c0d682d4ae07c6c40b7638cd53e559f0d5b672f40676a3fc478d07ac5772f350da777c20f821ed5a0907ba31800874cd15553fcdbdae319e77e17961cf49f9f SHA512 a7b5ef78618a27c6065a78d5302d19f846feb71bc09cc0359342d1f31f1f793242982bc384227b0e59a4b7f246cb9f4aaa2350ad0a4fe1a23ce3504e59b0d2c2
+DIST intel-microcode-collection-20220508.tar.xz 9444060 BLAKE2B 1737143f5227d95590f325f7205c04816d7791bebb27573dc30774fe5f40f74c1e0506d41774474a8b2495b0dc210528fac1362545d670a085c5c502aa903b24 SHA512 b9d7f2d5db0f625a219959f52822c8d6fba2e0bc682257a204c9b33cd19ed2101f5f661e7f2e2b98a8ad8d105fcb3309699d193469ee4d67d99ae188dc7034d9
DIST intel-ucode-sig_0x406e3-rev_0xd6.bin 101376 BLAKE2B 66d55867954d69dda1425febd93bb8c89f7aa836d504f8b5fee127f8505bcf2246f4fcc55cc245bc5e532528d60cca2eee278de7ab5174dc2862db7982a2b36f SHA512 248066b521bf512b5d8e4a8c7e921464ce52169c954d6e4ca580d8c172cd789519e22b4cf56c212e452b4191741f0202019f7061d322c9433b5af9ce5413b567
DIST microcode-20201112.tar.gz 3610834 BLAKE2B 4212924f1673afded961266a25fe6063ec6cdafaa26c8bee1c42372eb8ab5f278dc2501615b23e09e2f9809bf2792a8db317c98c170bf0c5e1dd62b7dc80a084 SHA512 0875675d065a83ee14fa34a31022ee34e46aee579d1ff192414e79861af157ae269ca7c2c462f03b3accbd45590c76e5cbf4f53d7a6ed237e410213a96459211
DIST microcode-20210216.tar.gz 3506111 BLAKE2B e09ab59dcccc77c15545b119dcf5309e626d53649a601c49fc7d6a65d774b8016d9ad44783f75ceb4bf384a03b909bc28693ed2be9f047029342dca9beae9cae SHA512 211ed90a248c891224bb8c569e24c04410d3f67ecc6daee41dc025042bd51c257baaba0da1ac5327df76352d2b53d812e81f06cc8726e43b95ea2f8898bc00bf
DIST microcode-20210608.tar.gz 4782451 BLAKE2B 2eac43aaa7832365e428bf2de20797ef42293a53087545920d205bd3b11a3d8ca2afb33931af5d36b8f3a224b9c22ed89ff828acc8afdcfa1b8220884c55ae89 SHA512 61acd2e76aa019fa0002fbf56c503791080a937ff93d81e020f8f0cc089dc08928b4c7e9884f713b886e2f9d4a8409fea59e39f628ef534a588515e1c3fc861d
DIST microcode-20220207.tar.gz 4590237 BLAKE2B 8c47a330794615b6684084976b6bb9e8800cd2869f81ecc33b28b54441b220a645502c0ade0cbd58e91879a652ff6bca181800004de477fc74033413ea4b1c8f SHA512 efa9f80815947cf2be371e7da7185634cbacefe779d1d6dfef0c15b78ccae7d2740ea6681b967a19dfbcc3014edce5bcdcdba87c9dea1f19d0415a03fca9e936
+DIST microcode-20220419.tar.gz 4590171 BLAKE2B 69d296efad5329324a47640eace5d1a10e38b85cb8b7ac5baa9f14c40391ff809ae17cb7814f99f2e43910fe4c4b02dc77ffea7bb5f2b58069b2c17029e9f76a SHA512 abfe3942c204e42ed121bcea47c366469013a6751ef5d28d9c0d59a3a660bd1ad7010441e000367c052ee1ead00285a252d2b3c3ca86314eaea9f7d0de3f05c6
+DIST microcode-20220510.tar.gz 5912115 BLAKE2B 5f8c238b00970ddda132dbcf9059df759bb768e1eb2fe0b9912ffe69cf9a6104b32ea816e7574660ea74e3d08af1aa45cc46b5f38d0b315e6e466d8ca466f37d SHA512 00329ce62a6d9cc66fb8594d132ef67951086ab1250ceaf908d5a357753ed62557275f55c5eb7b3ad55d1fdd312b5d1a436b214cdcbf6e3e1a840c8bf6f4795d
EBUILD intel-microcode-20201112_p20201116-r1.ebuild 9283 BLAKE2B 80ef0e145d64b3c104400c7c555a4d2436c55b385a870b31b9d3288016c350f0f9f81f0a92d12985e84895bfb051b9113e2a4ba4a439a89d8d28444f03efa0b3 SHA512 13d0dc01a5a253db88756eae947cb447d1fb5e082bd45b86b6a9d083a0c7004e2d721390bc225f2ad63b11409004d5e73b99884a413fc811f90017acc403caf1
EBUILD intel-microcode-20210216_p20210221.ebuild 9283 BLAKE2B 80ef0e145d64b3c104400c7c555a4d2436c55b385a870b31b9d3288016c350f0f9f81f0a92d12985e84895bfb051b9113e2a4ba4a439a89d8d28444f03efa0b3 SHA512 13d0dc01a5a253db88756eae947cb447d1fb5e082bd45b86b6a9d083a0c7004e2d721390bc225f2ad63b11409004d5e73b99884a413fc811f90017acc403caf1
EBUILD intel-microcode-20210216_p20210514.ebuild 9283 BLAKE2B 80ef0e145d64b3c104400c7c555a4d2436c55b385a870b31b9d3288016c350f0f9f81f0a92d12985e84895bfb051b9113e2a4ba4a439a89d8d28444f03efa0b3 SHA512 13d0dc01a5a253db88756eae947cb447d1fb5e082bd45b86b6a9d083a0c7004e2d721390bc225f2ad63b11409004d5e73b99884a413fc811f90017acc403caf1
EBUILD intel-microcode-20210608_p20210608.ebuild 9283 BLAKE2B 80ef0e145d64b3c104400c7c555a4d2436c55b385a870b31b9d3288016c350f0f9f81f0a92d12985e84895bfb051b9113e2a4ba4a439a89d8d28444f03efa0b3 SHA512 13d0dc01a5a253db88756eae947cb447d1fb5e082bd45b86b6a9d083a0c7004e2d721390bc225f2ad63b11409004d5e73b99884a413fc811f90017acc403caf1
EBUILD intel-microcode-20210608_p20210830.ebuild 9283 BLAKE2B 80ef0e145d64b3c104400c7c555a4d2436c55b385a870b31b9d3288016c350f0f9f81f0a92d12985e84895bfb051b9113e2a4ba4a439a89d8d28444f03efa0b3 SHA512 13d0dc01a5a253db88756eae947cb447d1fb5e082bd45b86b6a9d083a0c7004e2d721390bc225f2ad63b11409004d5e73b99884a413fc811f90017acc403caf1
EBUILD intel-microcode-20220207_p20220207.ebuild 9283 BLAKE2B 80ef0e145d64b3c104400c7c555a4d2436c55b385a870b31b9d3288016c350f0f9f81f0a92d12985e84895bfb051b9113e2a4ba4a439a89d8d28444f03efa0b3 SHA512 13d0dc01a5a253db88756eae947cb447d1fb5e082bd45b86b6a9d083a0c7004e2d721390bc225f2ad63b11409004d5e73b99884a413fc811f90017acc403caf1
+EBUILD intel-microcode-20220419_p20220421.ebuild 9269 BLAKE2B b978c98dc2a6caddcf864696e6f9ed868f3419dfabf714bda7be6dd0da157297eb3982d51e2eccb2b0d487d248326dbd38abe0131d3888d9790b2e779eee06cb SHA512 a09e7efb3c32cb9b8f84bb5cd18ceff0c55bacdc325b8bab9f959a92cde0d5e85ab10e69bea51d1fd145a0e843ce19681b7d95ef9960caf9133ac250478b8b9a
+EBUILD intel-microcode-20220510_p20220508.ebuild 9269 BLAKE2B b978c98dc2a6caddcf864696e6f9ed868f3419dfabf714bda7be6dd0da157297eb3982d51e2eccb2b0d487d248326dbd38abe0131d3888d9790b2e779eee06cb SHA512 a09e7efb3c32cb9b8f84bb5cd18ceff0c55bacdc325b8bab9f959a92cde0d5e85ab10e69bea51d1fd145a0e843ce19681b7d95ef9960caf9133ac250478b8b9a
MISC metadata.xml 668 BLAKE2B 9b5e9c5ad6b5889f72758aa76253fc43f0fba9ab9fa51b8393f2b48e76ba61455c257561697a00dd2178c3a563ae76066a3d930cb20e5f51c9534ee1d8db232e SHA512 c1354363370d038f70e20176232dbbe8e66f515a0a28e9da4fa1b792de8c7c785bd70fdc872db774d1f29a50217955becf93a3a55e31c431a4954bada801c6ac
diff --git a/sys-firmware/intel-microcode/intel-microcode-20220419_p20220421.ebuild b/sys-firmware/intel-microcode/intel-microcode-20220419_p20220421.ebuild
new file mode 100644
index 000000000000..4171888a5826
--- /dev/null
+++ b/sys-firmware/intel-microcode/intel-microcode-20220419_p20220421.ebuild
@@ -0,0 +1,263 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit linux-info mount-boot
+
+# Find updates by searching and clicking the first link (hopefully it's the one):
+# https://www.intel.com/content/www/us/en/search.html?keyword=Processor+Microcode+Data+File
+
+COLLECTION_SNAPSHOT="${PV##*_p}"
+INTEL_SNAPSHOT="${PV/_p*}"
+#NUM="28087"
+#https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=${NUM}
+#https://downloadmirror.intel.com/${NUM}/eng/microcode-${INTEL_SNAPSHOT}.tgz
+DESCRIPTION="Intel IA32/IA64 microcode update data"
+HOMEPAGE="https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files http://inertiawar.com/microcode/"
+SRC_URI="https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/archive/microcode-${INTEL_SNAPSHOT}.tar.gz
+ https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/raw/437f382b1be4412b9d03e2bbdcda46d83d581242/intel-ucode/06-4e-03 -> intel-ucode-sig_0x406e3-rev_0xd6.bin
+ https://dev.gentoo.org/~mpagano/dist/intel-microcode/intel-microcode-collection-${COLLECTION_SNAPSHOT}.tar.xz"
+
+LICENSE="intel-ucode"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="hostonly initramfs +split-ucode vanilla"
+REQUIRED_USE="|| ( initramfs split-ucode )"
+
+BDEPEND=">=sys-apps/iucode_tool-2.3"
+
+# !<sys-apps/microcode-ctl-1.17-r2 due to bug #268586
+RDEPEND="hostonly? ( sys-apps/iucode_tool )"
+
+RESTRICT="binchecks strip"
+
+S=${WORKDIR}
+
+# Blacklist bad microcode here.
+# 0x000406f1 aka 06-4f-01 aka CPUID 406F1 require newer microcode loader
+MICROCODE_BLACKLIST_DEFAULT="-s !0x000406f1"
+
+# https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/issues/31
+MICROCODE_BLACKLIST_DEFAULT+=" -s !0x000406e3,0xc0,eq:0x00dc"
+
+# https://bugs.gentoo.org/722768
+MICROCODE_BLACKLIST_DEFAULT+=" -s !0x000406e3,0xc0,eq:0x00da"
+
+# https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/commit/49bb67f32a2e3e631ba1a9a73da1c52e1cac7fd9
+MICROCODE_BLACKLIST_DEFAULT+=" -s !0x000806c1,0x80,eq:0x0068"
+
+# In case we want to set some defaults ...
+MICROCODE_SIGNATURES_DEFAULT=""
+
+# Advanced users only!
+# Set MIRCOCODE_SIGNATURES to merge with:
+# only current CPU: MICROCODE_SIGNATURES="-S"
+# only specific CPU: MICROCODE_SIGNATURES="-s 0x00000f4a -s 0x00010676"
+# exclude specific CPU: MICROCODE_SIGNATURES="-s !0x00000686"
+
+pkg_pretend() {
+ use initramfs && mount-boot_pkg_pretend
+}
+
+src_prepare() {
+ default
+
+ if cd Intel-Linux-Processor-Microcode-Data* &>/dev/null; then
+ # new tarball format from GitHub
+ mv * ../ || die "Failed to move Intel-Linux-Processor-Microcode-Data*"
+ cd .. || die
+ rm -r Intel-Linux-Processor-Microcode-Data* || die
+ fi
+
+ mkdir intel-ucode-old || die
+ cp "${DISTDIR}"/intel-ucode-sig_0x406e3-rev_0xd6.bin "${S}"/intel-ucode-old/ || die
+
+ # Prevent "invalid file format" errors from iucode_tool
+ rm -f "${S}"/intel-ucod*/list || die
+
+}
+
+src_install() {
+ # This will take ALL of the upstream microcode sources:
+ # - microcode.dat
+ # - intel-ucode/
+ # In some cases, they have not contained the same content (eg the directory has newer stuff).
+ MICROCODE_SRC=(
+ "${S}"/intel-ucode/
+ "${S}"/intel-ucode-with-caveats/
+ "${S}"/intel-ucode-old/
+ )
+
+ # Allow users who are scared about microcode updates not included in Intel's official
+ # microcode tarball to opt-out and comply with Intel marketing
+ if ! use vanilla; then
+ MICROCODE_SRC+=( "${S}"/intel-microcode-collection-${COLLECTION_SNAPSHOT} )
+ fi
+
+ # These will carry into pkg_preinst via env saving.
+ : ${MICROCODE_BLACKLIST=${MICROCODE_BLACKLIST_DEFAULT}}
+ : ${MICROCODE_SIGNATURES=${MICROCODE_SIGNATUES_DEFAULT}}
+
+ opts=(
+ ${MICROCODE_BLACKLIST}
+ ${MICROCODE_SIGNATURES}
+ # be strict about what we are doing
+ --overwrite
+ --strict-checks
+ --no-ignore-broken
+ # we want to install latest version
+ --no-downgrade
+ # show everything we find
+ --list-all
+ # show what we selected
+ --list
+ )
+
+ # The earlyfw cpio needs to be in /boot because it must be loaded before
+ # rootfs is mounted.
+ use initramfs && dodir /boot && opts+=( --write-earlyfw="${ED}/boot/intel-uc.img" )
+
+ keepdir /lib/firmware/intel-ucode
+ opts+=( --write-firmware="${ED}/lib/firmware/intel-ucode" )
+
+ iucode_tool \
+ "${opts[@]}" \
+ "${MICROCODE_SRC[@]}" \
+ || die "iucode_tool ${opts[@]} ${MICROCODE_SRC[@]}"
+
+ dodoc releasenote.md
+}
+
+pkg_preinst() {
+ if [[ ${MICROCODE_BLACKLIST} != ${MICROCODE_BLACKLIST_DEFAULT} ]]; then
+ ewarn "MICROCODE_BLACKLIST is set to \"${MICROCODE_BLACKLIST}\" instead of default \"${MICROCODE_BLACKLIST_DEFAULT}\". You are on your own!"
+ fi
+
+ if [[ ${MICROCODE_SIGNATURES} != ${MICROCODE_SIGNATURES_DEFAULT} ]]; then
+ ewarn "Package was created using advanced options:"
+ ewarn "MICROCODE_SIGNATURES is set to \"${MICROCODE_SIGNATURES}\" instead of default \"${MICROCODE_SIGNATURES_DEFAULT}\"!"
+ fi
+
+ # Make sure /boot is available if needed.
+ use initramfs && mount-boot_pkg_preinst
+
+ local _initramfs_file="${ED}/boot/intel-uc.img"
+
+ if use hostonly; then
+ # While this output looks redundant we do this check to detect
+ # rare cases where iucode_tool was unable to detect system's processor(s).
+ local _detected_processors=$(iucode_tool --scan-system 2>&1)
+ if [[ -z "${_detected_processors}" ]]; then
+ ewarn "Looks like iucode_tool was unable to detect any processor!"
+ else
+ einfo "Only installing ucode(s) for ${_detected_processors#iucode_tool: system has } due to USE=hostonly ..."
+ fi
+
+ opts=(
+ --scan-system
+ # be strict about what we are doing
+ --overwrite
+ --strict-checks
+ --no-ignore-broken
+ # we want to install latest version
+ --no-downgrade
+ # show everything we find
+ --list-all
+ # show what we selected
+ --list
+ )
+
+ # The earlyfw cpio needs to be in /boot because it must be loaded before
+ # rootfs is mounted.
+ use initramfs && opts+=( --write-earlyfw=${_initramfs_file} )
+
+ if use split-ucode; then
+ opts+=( --write-firmware="${ED}/lib/firmware/intel-ucode" )
+ fi
+
+ opts+=( "${ED}/lib/firmware/intel-ucode-temp" )
+
+ mv "${ED}"/lib/firmware/intel-ucode{,-temp} || die
+ keepdir /lib/firmware/intel-ucode
+
+ iucode_tool "${opts[@]}" || die "iucode_tool ${opts[@]}"
+
+ rm -r "${ED}"/lib/firmware/intel-ucode-temp || die
+
+ elif ! use split-ucode; then # hostonly disabled
+ rm -r "${ED}"/lib/firmware/intel-ucode || die
+ fi
+
+ # Because it is possible that this package will install not one single file
+ # due to user selection which is still somehow unexpected we add the following
+ # check to inform user so that the user has at least a chance to detect
+ # a problem/invalid select.
+ local _has_installed_something=
+ if use initramfs && [[ -s "${_initramfs_file}" ]]; then
+ _has_installed_something="yes"
+ elif use split-ucode; then
+ _has_installed_something=$(find "${ED}/lib/firmware/intel-ucode" -maxdepth 0 -not -empty -exec echo yes \;)
+ fi
+
+ if use hostonly && [[ -n "${_has_installed_something}" ]]; then
+ elog "You only installed ucode(s) for all currently available (=online)"
+ elog "processor(s). Remember to re-emerge this package whenever you"
+ elog "change the system's processor model."
+ elog ""
+ elif [[ -z "${_has_installed_something}" ]]; then
+ ewarn "WARNING:"
+ if [[ ${MICROCODE_SIGNATURES} != ${MICROCODE_SIGNATURES_DEFAULT} ]]; then
+ ewarn "No ucode was installed! Because you have created this package"
+ ewarn "using MICROCODE_SIGNATURES variable please double check if you"
+ ewarn "have an invalid select."
+ ewarn "It's rare but it is also possible that just no ucode update"
+ ewarn "is available for your processor(s). In this case it is safe"
+ ewarn "to ignore this warning."
+ else
+ ewarn "No ucode was installed! It's rare but it is also possible"
+ ewarn "that just no ucode update is available for your processor(s)."
+ ewarn "In this case it is safe to ignore this warning."
+ fi
+
+ ewarn ""
+
+ if use hostonly; then
+ ewarn "Unset \"hostonly\" USE flag to install all available ucodes."
+ ewarn ""
+ fi
+ fi
+}
+
+pkg_prerm() {
+ # Make sure /boot is mounted so that we can remove /boot/intel-uc.img!
+ use initramfs && mount-boot_pkg_prerm
+}
+
+pkg_postrm() {
+ # Don't forget to umount /boot if it was previously mounted by us.
+ use initramfs && mount-boot_pkg_postrm
+}
+
+pkg_postinst() {
+ # Don't forget to umount /boot if it was previously mounted by us.
+ use initramfs && mount-boot_pkg_postinst
+
+ # We cannot give detailed information if user is affected or not:
+ # If MICROCODE_BLACKLIST wasn't modified, user can still use MICROCODE_SIGNATURES
+ # to to force a specific, otherwise blacklisted, microcode. So we
+ # only show a generic warning based on running kernel version:
+ if kernel_is -lt 4 14 34; then
+ ewarn "${P} contains microcode updates which require"
+ ewarn "additional kernel patches which aren't yet included in kernel <4.14.34."
+ ewarn "Loading such a microcode through kernel interface from an unpatched kernel"
+ ewarn "can crash your system!"
+ ewarn ""
+ ewarn "Those microcodes are blacklisted per default. However, if you have altered"
+ ewarn "MICROCODE_BLACKLIST or MICROCODE_SIGNATURES, you maybe have unintentionally"
+ ewarn "re-enabled those microcodes...!"
+ ewarn ""
+ ewarn "Check \"${EROOT}/usr/share/doc/${PN}-*/releasenot*\" if your microcode update"
+ ewarn "requires additional kernel patches or not."
+ fi
+}
diff --git a/sys-firmware/intel-microcode/intel-microcode-20220510_p20220508.ebuild b/sys-firmware/intel-microcode/intel-microcode-20220510_p20220508.ebuild
new file mode 100644
index 000000000000..4171888a5826
--- /dev/null
+++ b/sys-firmware/intel-microcode/intel-microcode-20220510_p20220508.ebuild
@@ -0,0 +1,263 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit linux-info mount-boot
+
+# Find updates by searching and clicking the first link (hopefully it's the one):
+# https://www.intel.com/content/www/us/en/search.html?keyword=Processor+Microcode+Data+File
+
+COLLECTION_SNAPSHOT="${PV##*_p}"
+INTEL_SNAPSHOT="${PV/_p*}"
+#NUM="28087"
+#https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=${NUM}
+#https://downloadmirror.intel.com/${NUM}/eng/microcode-${INTEL_SNAPSHOT}.tgz
+DESCRIPTION="Intel IA32/IA64 microcode update data"
+HOMEPAGE="https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files http://inertiawar.com/microcode/"
+SRC_URI="https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/archive/microcode-${INTEL_SNAPSHOT}.tar.gz
+ https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/raw/437f382b1be4412b9d03e2bbdcda46d83d581242/intel-ucode/06-4e-03 -> intel-ucode-sig_0x406e3-rev_0xd6.bin
+ https://dev.gentoo.org/~mpagano/dist/intel-microcode/intel-microcode-collection-${COLLECTION_SNAPSHOT}.tar.xz"
+
+LICENSE="intel-ucode"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE="hostonly initramfs +split-ucode vanilla"
+REQUIRED_USE="|| ( initramfs split-ucode )"
+
+BDEPEND=">=sys-apps/iucode_tool-2.3"
+
+# !<sys-apps/microcode-ctl-1.17-r2 due to bug #268586
+RDEPEND="hostonly? ( sys-apps/iucode_tool )"
+
+RESTRICT="binchecks strip"
+
+S=${WORKDIR}
+
+# Blacklist bad microcode here.
+# 0x000406f1 aka 06-4f-01 aka CPUID 406F1 require newer microcode loader
+MICROCODE_BLACKLIST_DEFAULT="-s !0x000406f1"
+
+# https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/issues/31
+MICROCODE_BLACKLIST_DEFAULT+=" -s !0x000406e3,0xc0,eq:0x00dc"
+
+# https://bugs.gentoo.org/722768
+MICROCODE_BLACKLIST_DEFAULT+=" -s !0x000406e3,0xc0,eq:0x00da"
+
+# https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/commit/49bb67f32a2e3e631ba1a9a73da1c52e1cac7fd9
+MICROCODE_BLACKLIST_DEFAULT+=" -s !0x000806c1,0x80,eq:0x0068"
+
+# In case we want to set some defaults ...
+MICROCODE_SIGNATURES_DEFAULT=""
+
+# Advanced users only!
+# Set MIRCOCODE_SIGNATURES to merge with:
+# only current CPU: MICROCODE_SIGNATURES="-S"
+# only specific CPU: MICROCODE_SIGNATURES="-s 0x00000f4a -s 0x00010676"
+# exclude specific CPU: MICROCODE_SIGNATURES="-s !0x00000686"
+
+pkg_pretend() {
+ use initramfs && mount-boot_pkg_pretend
+}
+
+src_prepare() {
+ default
+
+ if cd Intel-Linux-Processor-Microcode-Data* &>/dev/null; then
+ # new tarball format from GitHub
+ mv * ../ || die "Failed to move Intel-Linux-Processor-Microcode-Data*"
+ cd .. || die
+ rm -r Intel-Linux-Processor-Microcode-Data* || die
+ fi
+
+ mkdir intel-ucode-old || die
+ cp "${DISTDIR}"/intel-ucode-sig_0x406e3-rev_0xd6.bin "${S}"/intel-ucode-old/ || die
+
+ # Prevent "invalid file format" errors from iucode_tool
+ rm -f "${S}"/intel-ucod*/list || die
+
+}
+
+src_install() {
+ # This will take ALL of the upstream microcode sources:
+ # - microcode.dat
+ # - intel-ucode/
+ # In some cases, they have not contained the same content (eg the directory has newer stuff).
+ MICROCODE_SRC=(
+ "${S}"/intel-ucode/
+ "${S}"/intel-ucode-with-caveats/
+ "${S}"/intel-ucode-old/
+ )
+
+ # Allow users who are scared about microcode updates not included in Intel's official
+ # microcode tarball to opt-out and comply with Intel marketing
+ if ! use vanilla; then
+ MICROCODE_SRC+=( "${S}"/intel-microcode-collection-${COLLECTION_SNAPSHOT} )
+ fi
+
+ # These will carry into pkg_preinst via env saving.
+ : ${MICROCODE_BLACKLIST=${MICROCODE_BLACKLIST_DEFAULT}}
+ : ${MICROCODE_SIGNATURES=${MICROCODE_SIGNATUES_DEFAULT}}
+
+ opts=(
+ ${MICROCODE_BLACKLIST}
+ ${MICROCODE_SIGNATURES}
+ # be strict about what we are doing
+ --overwrite
+ --strict-checks
+ --no-ignore-broken
+ # we want to install latest version
+ --no-downgrade
+ # show everything we find
+ --list-all
+ # show what we selected
+ --list
+ )
+
+ # The earlyfw cpio needs to be in /boot because it must be loaded before
+ # rootfs is mounted.
+ use initramfs && dodir /boot && opts+=( --write-earlyfw="${ED}/boot/intel-uc.img" )
+
+ keepdir /lib/firmware/intel-ucode
+ opts+=( --write-firmware="${ED}/lib/firmware/intel-ucode" )
+
+ iucode_tool \
+ "${opts[@]}" \
+ "${MICROCODE_SRC[@]}" \
+ || die "iucode_tool ${opts[@]} ${MICROCODE_SRC[@]}"
+
+ dodoc releasenote.md
+}
+
+pkg_preinst() {
+ if [[ ${MICROCODE_BLACKLIST} != ${MICROCODE_BLACKLIST_DEFAULT} ]]; then
+ ewarn "MICROCODE_BLACKLIST is set to \"${MICROCODE_BLACKLIST}\" instead of default \"${MICROCODE_BLACKLIST_DEFAULT}\". You are on your own!"
+ fi
+
+ if [[ ${MICROCODE_SIGNATURES} != ${MICROCODE_SIGNATURES_DEFAULT} ]]; then
+ ewarn "Package was created using advanced options:"
+ ewarn "MICROCODE_SIGNATURES is set to \"${MICROCODE_SIGNATURES}\" instead of default \"${MICROCODE_SIGNATURES_DEFAULT}\"!"
+ fi
+
+ # Make sure /boot is available if needed.
+ use initramfs && mount-boot_pkg_preinst
+
+ local _initramfs_file="${ED}/boot/intel-uc.img"
+
+ if use hostonly; then
+ # While this output looks redundant we do this check to detect
+ # rare cases where iucode_tool was unable to detect system's processor(s).
+ local _detected_processors=$(iucode_tool --scan-system 2>&1)
+ if [[ -z "${_detected_processors}" ]]; then
+ ewarn "Looks like iucode_tool was unable to detect any processor!"
+ else
+ einfo "Only installing ucode(s) for ${_detected_processors#iucode_tool: system has } due to USE=hostonly ..."
+ fi
+
+ opts=(
+ --scan-system
+ # be strict about what we are doing
+ --overwrite
+ --strict-checks
+ --no-ignore-broken
+ # we want to install latest version
+ --no-downgrade
+ # show everything we find
+ --list-all
+ # show what we selected
+ --list
+ )
+
+ # The earlyfw cpio needs to be in /boot because it must be loaded before
+ # rootfs is mounted.
+ use initramfs && opts+=( --write-earlyfw=${_initramfs_file} )
+
+ if use split-ucode; then
+ opts+=( --write-firmware="${ED}/lib/firmware/intel-ucode" )
+ fi
+
+ opts+=( "${ED}/lib/firmware/intel-ucode-temp" )
+
+ mv "${ED}"/lib/firmware/intel-ucode{,-temp} || die
+ keepdir /lib/firmware/intel-ucode
+
+ iucode_tool "${opts[@]}" || die "iucode_tool ${opts[@]}"
+
+ rm -r "${ED}"/lib/firmware/intel-ucode-temp || die
+
+ elif ! use split-ucode; then # hostonly disabled
+ rm -r "${ED}"/lib/firmware/intel-ucode || die
+ fi
+
+ # Because it is possible that this package will install not one single file
+ # due to user selection which is still somehow unexpected we add the following
+ # check to inform user so that the user has at least a chance to detect
+ # a problem/invalid select.
+ local _has_installed_something=
+ if use initramfs && [[ -s "${_initramfs_file}" ]]; then
+ _has_installed_something="yes"
+ elif use split-ucode; then
+ _has_installed_something=$(find "${ED}/lib/firmware/intel-ucode" -maxdepth 0 -not -empty -exec echo yes \;)
+ fi
+
+ if use hostonly && [[ -n "${_has_installed_something}" ]]; then
+ elog "You only installed ucode(s) for all currently available (=online)"
+ elog "processor(s). Remember to re-emerge this package whenever you"
+ elog "change the system's processor model."
+ elog ""
+ elif [[ -z "${_has_installed_something}" ]]; then
+ ewarn "WARNING:"
+ if [[ ${MICROCODE_SIGNATURES} != ${MICROCODE_SIGNATURES_DEFAULT} ]]; then
+ ewarn "No ucode was installed! Because you have created this package"
+ ewarn "using MICROCODE_SIGNATURES variable please double check if you"
+ ewarn "have an invalid select."
+ ewarn "It's rare but it is also possible that just no ucode update"
+ ewarn "is available for your processor(s). In this case it is safe"
+ ewarn "to ignore this warning."
+ else
+ ewarn "No ucode was installed! It's rare but it is also possible"
+ ewarn "that just no ucode update is available for your processor(s)."
+ ewarn "In this case it is safe to ignore this warning."
+ fi
+
+ ewarn ""
+
+ if use hostonly; then
+ ewarn "Unset \"hostonly\" USE flag to install all available ucodes."
+ ewarn ""
+ fi
+ fi
+}
+
+pkg_prerm() {
+ # Make sure /boot is mounted so that we can remove /boot/intel-uc.img!
+ use initramfs && mount-boot_pkg_prerm
+}
+
+pkg_postrm() {
+ # Don't forget to umount /boot if it was previously mounted by us.
+ use initramfs && mount-boot_pkg_postrm
+}
+
+pkg_postinst() {
+ # Don't forget to umount /boot if it was previously mounted by us.
+ use initramfs && mount-boot_pkg_postinst
+
+ # We cannot give detailed information if user is affected or not:
+ # If MICROCODE_BLACKLIST wasn't modified, user can still use MICROCODE_SIGNATURES
+ # to to force a specific, otherwise blacklisted, microcode. So we
+ # only show a generic warning based on running kernel version:
+ if kernel_is -lt 4 14 34; then
+ ewarn "${P} contains microcode updates which require"
+ ewarn "additional kernel patches which aren't yet included in kernel <4.14.34."
+ ewarn "Loading such a microcode through kernel interface from an unpatched kernel"
+ ewarn "can crash your system!"
+ ewarn ""
+ ewarn "Those microcodes are blacklisted per default. However, if you have altered"
+ ewarn "MICROCODE_BLACKLIST or MICROCODE_SIGNATURES, you maybe have unintentionally"
+ ewarn "re-enabled those microcodes...!"
+ ewarn ""
+ ewarn "Check \"${EROOT}/usr/share/doc/${PN}-*/releasenot*\" if your microcode update"
+ ewarn "requires additional kernel patches or not."
+ fi
+}
diff --git a/sys-firmware/raspberrypi-wifi-ucode/Manifest b/sys-firmware/raspberrypi-wifi-ucode/Manifest
index 40eaad6544f0..4e90c0a8932c 100644
--- a/sys-firmware/raspberrypi-wifi-ucode/Manifest
+++ b/sys-firmware/raspberrypi-wifi-ucode/Manifest
@@ -1,5 +1,6 @@
DIST firmware-nonfree_20190114-1+rpt11.debian.tar.xz 2038892 BLAKE2B a2d66e637cd26928c23855f5369c13b83e25b6b4353c82e9a62cb14b010a8c1fda566f6d200e0e7a706c7fb140238082238b7af80fe1f75fe3f07c815fc0eb6a SHA512 5ba6783dc3f3903f20321571a1fb2e11d7781de6d49689c68e6e1f194dad9cdddec90abc94a32a130323b2c8f9839af387c46aee895caf30ffb2f6dfe6d95b7d
DIST firmware-nonfree_20210315-3+rpt5.debian.tar.xz 1743300 BLAKE2B 5de090eefc68ba34df43c58a08554891b8e98d1c8ebce37c63275af8ca438b42880d95dcddf902a1491e19007ccab8cec950f74f50c4f84df092c76e6ffb437b SHA512 8a2151b8c96b0ba806eb25fb0eed12c3b3b91d3386f8ed4ab8058dc5c5989ed5eee39c8c24ceaa8f343042a5031a8c4a2cd759b42cb12d76b58209de50c44083
EBUILD raspberrypi-wifi-ucode-20190114.1_p11.ebuild 2379 BLAKE2B 6f3569abe1d0c0071bcd03e7cbed2b45ce7eafdb59a20b793e6a6cb77e70c49c3acb432f2db4727acba3d8b0a2f00a62d7c80a9fc1d83f96940a153d8e8e7979 SHA512 63e2b279a8ca863d7837e6f2d864f4ad3ebb1a1bdb3555415415fb7b92e7739f8623322a41e479a442512df4d967a4ae9b8c04ead4ab1502d72b97873228b7c0
+EBUILD raspberrypi-wifi-ucode-20210315.3_p5-r1.ebuild 2469 BLAKE2B e53483e6971e8a1a71ab50de3011eee09b5df84ed7526617fb7206504b5161860c470db9be1b07c7ccf521c3859cfb12e005443d99b853c0e80f3dc1da4305cd SHA512 8da229dcd2ba62f120abebb9273dcea1d962209082e0fc72d23dc6170d412f42f1f0a8855c69bf961170f6c83669f7ec58cd6ff7a886747da35e1d26cf1e06e1
EBUILD raspberrypi-wifi-ucode-20210315.3_p5.ebuild 2437 BLAKE2B e27c8c4773a6c22bf3270ab969766868ae33ffd579bd593da1598baaf5c3c593442346262d4cc7cffd1420328d08f7f2812b3576a9cbbde63e328216dc040c28 SHA512 adf77ca6d9ee3eec6fad4fbbee2c6e628620d3e0dffec45600011631b3219d40a9b70e948fe145e91283e916faec8f13b3546b8a6a9fa862cc72a07358818b85
MISC metadata.xml 713 BLAKE2B 0440fb00ea20009509c7d0aeb24bb26aa0e982e69457fd7f325aef56f810c448b5776fee4ec4aec58c40e4b895a724e7d0cec605037dea44f19cc487a9b423c3 SHA512 6fbe06d1c2c3913d2d4c40b575b9b0178110184e89be41302a176b15beafa81c7dbc4f755d92fa045210869902b2a37fe5f42bbaae69760c860a63a42d1ab04e
diff --git a/sys-firmware/raspberrypi-wifi-ucode/raspberrypi-wifi-ucode-20210315.3_p5-r1.ebuild b/sys-firmware/raspberrypi-wifi-ucode/raspberrypi-wifi-ucode-20210315.3_p5-r1.ebuild
new file mode 100644
index 000000000000..ce8516611329
--- /dev/null
+++ b/sys-firmware/raspberrypi-wifi-ucode/raspberrypi-wifi-ucode-20210315.3_p5-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Most up-to-date uCode for the Broadcom wifi chips on Raspberry Pi SBCs"
+HOMEPAGE="
+ https://github.com/RPi-Distro/firmware-nonfree
+ https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree"
+MY_PN=firmware-nonfree
+SRC_URI="https://archive.raspberrypi.org/debian/pool/main/f/${MY_PN}/${MY_PN}_$(ver_cut 1)-$(ver_cut 2)+rpt$(ver_cut 4).debian.tar.xz"
+S="${WORKDIR}"
+
+LICENSE="Broadcom"
+SLOT="0"
+KEYWORDS="~arm ~arm64"
+
+RDEPEND="
+ net-wireless/wireless-regdb
+ !sys-kernel/linux-firmware[-savedconfig]
+"
+
+pkg_pretend() {
+ local -a BADFILES=()
+ local txt file
+ # /lib/firmware/brcm/brcmfmac434{30,36,55,56}-sdio.*.txt
+ # The above pattern works because the files we want to hit
+ # have names of the form:
+ # * /lib/firmware/brcm/brcmfmac43430-sdio.AP6212.txt
+ # * /lib/firmware/brcm/brcmfmac43430-sdio.Hampoo-D2D3_Vi8A1.txt
+ # * /lib/firmware/brcm/brcmfmac43430-sdio.MUR1DX.txt
+ # * /lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt
+ # * /lib/firmware/brcm/brcmfmac43455-sdio.MINIX-NEO Z83-4.txt
+ # * /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-a-plus.txt
+ # * /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
+ # * /lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
+ # While the files installed by raspberrypi-wifi-ucode have names
+ # of the form:
+ # * /lib/firmware/brcm/brcmfmac43430-sdio.txt
+ # * /lib/firmware/brcm/brcmfmac43436-sdio.txt
+ # * /lib/firmware/brcm/brcmfmac43455-sdio.txt
+ # * /lib/firmware/brcm/brcmfmac43456-sdio.txt
+ # So no overlap is assured.
+ for txt in "${EPREFIX}"/lib/firmware/brcm/brcmfmac434{30,36,55,56}-sdio.*.txt; do
+ [[ -e "${txt}" ]] && BADFILES+=( "${txt}" )
+ done
+
+ if [[ "${#BADFILES[@]}" -gt 1 ]]; then
+ eerror "The following files should be excluded from the savedconfig of"
+ eerror "linux-firmware and linux-firmware should be re-emerged. Even"
+ eerror "though they do not collide with files from ${PN},"
+ eerror "they may be loaded preferentially to the files included in"
+ eerror "${PN}, leading to undefined behaviour."
+ eerror "List of files:"
+ for file in "${BADFILES[@]}"; do
+ eerror "${file}"
+ done
+ fi
+}
+
+src_install() {
+ insinto /lib/firmware/brcm
+ doins debian/config/brcm80211/brcm/*
+
+ insinto /lib/firmware/cypress
+ doins debian/config/brcm80211/cypress/*
+
+ dodoc debian/config/brcm80211/LICENSE debian/changelog
+}
diff --git a/sys-firmware/sof-firmware/Manifest b/sys-firmware/sof-firmware/Manifest
index 95d4349a9cea..2b90b21f7aa0 100644
--- a/sys-firmware/sof-firmware/Manifest
+++ b/sys-firmware/sof-firmware/Manifest
@@ -1,7 +1,5 @@
-DIST sof-firmware-1.6.1.tar.gz 3033953 BLAKE2B 0c33bd9a5d17c3b889219bf926d3619e3e448ff6b16e39b4caffe19e87c98d1227b303ebe80d185f93480ead29f37de39093f3e76f275df7836d3250ae47c566 SHA512 71acd34662ffd4d93f6111dfd046ed358184fdf24d0e118da43770aeee45bd15105b688bc5a569f2cb7941724ec822d2cfbab8a08e9caee1a77aa5763ac7b48e
DIST sof-firmware-1.9.3.tar.gz 3710193 BLAKE2B d52fe0660c73c8e76fb60c492abe19f9e64b3064441880b84488193aa66710e49ef022c7cd1b8ece69d010aa5e416fbf4307a9c92d823525dbdc734194b0a98f SHA512 0c04bf47ecf65d3352b730e79968cb020211c274f64a3cc21e4c5e49c5a9706ab4d541aaea931e72c1bcc67fcde6387bc6bf952a33691aaab06e6b93aa73a024
-DIST sof-firmware-1.9.tar.gz 3470302 BLAKE2B 597467915a658beda5611177c550b51a15720dfde23f1a55ea91217e7e809ff5c6417c6cc449e5d4a1732ffc03f9f817407951410646c9431ec189e8b141f60e SHA512 aee733381edb2150f2132c296e9151b1d6a71246e204b15c2394587c528286f730ceaf02002e1e58ccea0deba5e4ae81cb7a03efb858ac954633b0cfaec81a22
-EBUILD sof-firmware-1.6.1.ebuild 641 BLAKE2B 3ec766a6799d4a6e482522d79c8d985f4927240b31553578b1aa9edd314a8900d11aba8c89cf1a8d2cb49fe01e9c56719768cb6bbfad38e7a865a4f24ee53d7e SHA512 7433f8983f80b1fa8b7af27e50c8036d860ad16149917fd6457521166797e846fcbd2ae54936388bab1d36965dc3ba5570d83f75228e9e9adcc89c7e44b3b642
+DIST sof-firmware-2.1.1.tar.gz 4056718 BLAKE2B 0246f6240504d3e8b609b402c41ffe6ed9b8350b6a31c6567851069354e5de5b4ca6d803e78fdde77cdaba7be87c8a8923b2d0fdd0544fd3b28d1e332cd59b63 SHA512 77e9562f67014d78b213fe428edef6a08dcc058a9a762da09a486c002c3aa0b907ea7c8ba6d4f88f5ddab5e564de06df9f2ed77206341a0fe2e1aaab1d9740ce
EBUILD sof-firmware-1.9.3-r1.ebuild 721 BLAKE2B d4621f609e37290410c46fc89a8f9e7f472439b001e6f2e0ac3b2f9197579dea2870efaf75f4912cbc886892bc3d4fa95e32527eefaac1fb48b93600b38f24a0 SHA512 556aefe2f7bd6128de89891689e6843acb7f5b23acd424dc112266b7a6eed1081cd39f3bf47fa0a49269582d09d1237edf24908ff7898b9093c03cc5a4a834b5
-EBUILD sof-firmware-1.9.ebuild 657 BLAKE2B 3f95821a60304502fefe03f615462cc7103283019799634db50953d903dce7faea714a5ee5a53cd005880ce54915b42442db35a9adfcbc504183cefcd62af761 SHA512 c97d3b1d28a8581ab60622f1843bf5168a36697744817d8a9a650114e6a7246941c6727489ba2f8e015c3838c7321b9532ccb95410e2c92554800391b1bea58b
+EBUILD sof-firmware-2.1.1-r1.ebuild 899 BLAKE2B 6510a99bbadde60caad29440742a93c9f31878f65122f428f991efab01e2fbe9c13ffb26dd3e80b19f9b5556536f17e386b58db60d38867846690c7e5bd4f7d2 SHA512 91a698791d36560e74d1bed08fa1bc26f64788985efaa99f9cfd80d9bf6a9c78a29b573ed161d7724a5870e1d55a55150352ade276e4aea2f485d2bff0f0d288
MISC metadata.xml 218 BLAKE2B b13b149202bf20882c38ce2cfd0e1c4ea9a15f584ff819022fd74261c2f73dc52efe21fe1e621fd84406527ab86bd29147ef34c895ccf9de3596ce58cb59d846 SHA512 068fda6c090090d62a719b26812505efa881b855004ed63dea86b1ee9b698d5d6ccd3210366e7cfa886f886c77e31b90cd69ec015e67286ce0611483304e798f
diff --git a/sys-firmware/sof-firmware/sof-firmware-1.6.1.ebuild b/sys-firmware/sof-firmware/sof-firmware-1.6.1.ebuild
deleted file mode 100644
index d62dacb90048..000000000000
--- a/sys-firmware/sof-firmware/sof-firmware-1.6.1.ebuild
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="Sound Open Firmware (SOF) binary files"
-
-HOMEPAGE="https://www.sofproject.org https://github.com/thesofproject/sof https://github.com/thesofproject/sof-bin"
-SRC_URI="https://github.com/thesofproject/sof-bin/archive/stable-v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64"
-IUSE=""
-
-S=${WORKDIR}/sof-bin-stable-v${PV}
-
-src_compile() {
- sed -i -e '1i #!/bin/bash\nset -e' go.sh || die
-}
-
-src_install() {
- mkdir -p "${D}/lib/firmware/intel" || die
- SOF_VERSION=v${PV} ROOT=${D} ${S}/go.sh || die
-}
diff --git a/sys-firmware/sof-firmware/sof-firmware-1.9.ebuild b/sys-firmware/sof-firmware/sof-firmware-2.1.1-r1.ebuild
index 73dbc489b0e4..b51c9026bd32 100644
--- a/sys-firmware/sof-firmware/sof-firmware-1.9.ebuild
+++ b/sys-firmware/sof-firmware/sof-firmware-2.1.1-r1.ebuild
@@ -1,23 +1,33 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Sound Open Firmware (SOF) binary files"
-
HOMEPAGE="https://www.sofproject.org https://github.com/thesofproject/sof https://github.com/thesofproject/sof-bin"
SRC_URI="https://github.com/thesofproject/sof-bin/releases/download/v${PV}/sof-bin-v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}"/sof-bin-v${PV}
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
-S=${WORKDIR}/sof-bin-v${PV}
+# Needed for sof-ctl
+RDEPEND="media-libs/alsa-lib"
-QA_PREBUILT="/usr/bin/sof-logger"
+QA_PREBUILT="usr/bin/sof-ctl
+ usr/bin/sof-logger
+ usr/bin/sof-probes"
src_install() {
dodir /lib/firmware/intel
dodir /usr/bin
FW_DEST="${D}/lib/firmware/intel" TOOLS_DEST="${D}/usr/bin" "${S}/install.sh" v${PV} || die
}
+
+pkg_preinst() {
+ local sofpath="${EROOT}/lib/firmware/intel/sof"
+ if [[ ! -L "${sofpath}" && -d "${sofpath}" ]] ; then
+ rm -r "${sofpath}" || die
+ fi
+}