Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/linux-firmware/
Date: Fri, 26 Jun 2020 19:33:20
Message-Id: 1593199867.4c36e920ed87d5ba9f09e5d2a7e6281326c80f1c.whissi@gentoo
1 commit: 4c36e920ed87d5ba9f09e5d2a7e6281326c80f1c
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 26 19:31:07 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 26 19:31:07 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c36e920
7
8 sys-kernel/linux-firmware: drop old
9
10 Package-Manager: Portage-2.3.101, Repoman-2.3.22
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 sys-kernel/linux-firmware/Manifest | 5 -
14 .../linux-firmware/linux-firmware-20190815.ebuild | 354 ---------------------
15 .../linux-firmware/linux-firmware-20190923.ebuild | 354 ---------------------
16 .../linux-firmware/linux-firmware-20191022.ebuild | 354 ---------------------
17 .../linux-firmware/linux-firmware-20191215.ebuild | 354 ---------------------
18 .../linux-firmware/linux-firmware-20200122.ebuild | 354 ---------------------
19 6 files changed, 1775 deletions(-)
20
21 diff --git a/sys-kernel/linux-firmware/Manifest b/sys-kernel/linux-firmware/Manifest
22 index c8a729a3d03..84859c1ecdc 100644
23 --- a/sys-kernel/linux-firmware/Manifest
24 +++ b/sys-kernel/linux-firmware/Manifest
25 @@ -1,8 +1,3 @@
26 -DIST linux-firmware-20190815.tar.gz 195268794 BLAKE2B bc67b4501e1d0c4375000bbcbae754b072a3769703eb214f85468d910f29becbe79f6989d3bf223ffa259326c964cbf153326b64d7756882165d29b576e13703 SHA512 99bcc1372ed51be1692cbc3c7b7c34940ee2f9b89f611afa5266b2b0825ed602cde27ff383edb776c1239eaf37002cd19be7cbb7cdf81e0721c3167d38018e9a
27 -DIST linux-firmware-20190923.tar.gz 198130120 BLAKE2B 21f337e8ef693513b5569ab67bf3ae2323f2c9109ce3fc7d6d0d071974dc8c53301eb21e0b1c279753e867873e4bb04274c0b2b5bfb1160aeaff2f2c92d7f26c SHA512 1421f283602fe889b6fba5d84eab1199c63c597a4fb487583bee188cfa01c7d41bde4ac53eee992a6aa1bb95a77126eee786f96fb682cd7992c5ec581601db54
28 -DIST linux-firmware-20191022.tar.gz 198935619 BLAKE2B 94d90a8e85af7104f08c398d3df20a88dc4d6f86d638565ab6e45e7fc5dff53e4e56a62a859585438812a1438ea7f7c4e4e47ce4adb22b0adf69439feb5803b4 SHA512 2cc99664c8d0275b670373581d7c6e29699f8b84cd6403949182cc1970c3241e5d9c388c34643630a237d87962b7c8e891445969ca9817ac92a4bbbe74e0dc0d
29 -DIST linux-firmware-20191215.tar.gz 203746264 BLAKE2B cd756ac1b1bde9706cd8321133da2e4e620a3236614427ae9836fc5e98fbc62e79060e6cf50717b41391fba9d56e16140f722ffcc5764e4b81ad2e798d1b41ec SHA512 75eb78ef642cc48dc3d8d2cdd7e5312b82ee3c9ebd6ead40a02fdc1d4329c5a9226237fa0ec8e617fc358cc12144dacf4ef6c1441fe444974c1506ef21ea70a0
30 -DIST linux-firmware-20200122.tar.gz 219807963 BLAKE2B 976cf7f8da61213a1210348cffdda8cae1b3f3a2d46aac05fe331fdff37e954620c2768f8941e0d4b6fff8c7b69d68b86516c9df9b9cf96538a4463b0957d1a2 SHA512 23500cc99d31597fe691341404cbe9375f7995783b4bf055a53a67ace380bdf9db1c247f12ae7e63ac02e4078e5089aa33e5cc6c2622b26dfaab4a65bfab1db3
31 DIST linux-firmware-20200316.tar.gz 221745284 BLAKE2B 6ab4944927420dd8c50d3a97beb32aff22917ab13b283c3358de9f5331479c2a4353dde68a221ac221e9ff5202e46cdaaab9b65cd0431a3984877ab44e2bd0ab SHA512 2fb16fcc474753902ab0236cbb116cdd5de10080d5ad5fc19a015ad3881a203c42beeccf5745e18346fc028a5c743d3d6439f0a04b86b2e0abf9f32aa5f55bad
32 DIST linux-firmware-20200421.tar.gz 223307272 BLAKE2B 0f598acd7e88b4dbe275509a6cd7709ee8f6dddf79b262be3967b0ec19f4b51e1deb7bd4be8b392af42a7dcf31e978126b3390b2748ee71fd0172318d5252ccf SHA512 3f8ec2150f9895381e71cb0d0d403694784c4a50f164da59d338dbb37bb643150bed2c6de4729d37f25989b8e799475a53319882c05a06d3eadcc4c349082162
33 DIST linux-firmware-20200519.tar.gz 234290201 BLAKE2B 00852b1e035f28aae5532d6ba92d547857ac6445e17b9f29b0954a460a1af9a98b348ad1700cd9f78baa83a2c63b657b6c10a8944188c6d4edf85c2336cc5763 SHA512 9724cf3d1aea73f264d53564ef160a62e90bb35766f3300bbbeaf7c7c6a356ef50c7d17bfa01197e8e991ff72b1aeef002bb78f5dc78243b2792cafbf1139dff
34
35 diff --git a/sys-kernel/linux-firmware/linux-firmware-20190815.ebuild b/sys-kernel/linux-firmware/linux-firmware-20190815.ebuild
36 deleted file mode 100644
37 index cf65c9dc98f..00000000000
38 --- a/sys-kernel/linux-firmware/linux-firmware-20190815.ebuild
39 +++ /dev/null
40 @@ -1,354 +0,0 @@
41 -# Copyright 1999-2020 Gentoo Authors
42 -# Distributed under the terms of the GNU General Public License v2
43 -
44 -EAPI=7
45 -inherit mount-boot savedconfig
46 -
47 -if [[ ${PV} == 99999999* ]]; then
48 - inherit git-r3
49 - EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/${PN}.git"
50 -else
51 - GIT_COMMIT="07b925b450bfb4cf3e141c612ec5b104658cd020"
52 - SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
53 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
54 -fi
55 -
56 -DESCRIPTION="Linux firmware files"
57 -HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git"
58 -
59 -LICENSE="GPL-2 GPL-2+ GPL-3 BSD MIT || ( MPL-1.1 GPL-2 )
60 - redistributable? (
61 - linux-fw-redistributable ( BSD-2 BSD BSD-4 ISC MIT no-source-code ) )
62 - unknown-license? ( all-rights-reserved )"
63 -SLOT="0"
64 -IUSE="initramfs +redistributable savedconfig unknown-license"
65 -RESTRICT="binchecks strip
66 - unknown-license? ( bindist )"
67 -
68 -REQUIRED_USE="initramfs? ( redistributable )"
69 -
70 -BDEPEND="initramfs? ( app-arch/cpio )"
71 -
72 -#add anything else that collides to this
73 -RDEPEND="!savedconfig? (
74 - redistributable? (
75 - !sys-firmware/alsa-firmware[alsa_cards_ca0132]
76 - !media-tv/cx18-firmware
77 - !<sys-firmware/ivtv-firmware-20080701-r1
78 - !media-tv/linuxtv-dvb-firmware[dvb_cards_cx231xx]
79 - !media-tv/linuxtv-dvb-firmware[dvb_cards_cx23885]
80 - !media-tv/linuxtv-dvb-firmware[dvb_cards_usb-dib0700]
81 - !net-dialup/ueagle-atm
82 - !net-dialup/ueagle4-atm
83 - !net-wireless/ar9271-firmware
84 - !net-wireless/i2400m-fw
85 - !net-wireless/libertas-firmware
86 - !sys-firmware/rt61-firmware
87 - !net-wireless/rt73-firmware
88 - !net-wireless/rt2860-firmware
89 - !net-wireless/rt2870-firmware
90 - !sys-block/qla-fc-firmware
91 - !sys-firmware/amd-ucode
92 - !sys-firmware/iwl1000-ucode
93 - !sys-firmware/iwl2000-ucode
94 - !sys-firmware/iwl2030-ucode
95 - !sys-firmware/iwl3945-ucode
96 - !sys-firmware/iwl4965-ucode
97 - !sys-firmware/iwl5000-ucode
98 - !sys-firmware/iwl5150-ucode
99 - !sys-firmware/iwl6000-ucode
100 - !sys-firmware/iwl6005-ucode
101 - !sys-firmware/iwl6030-ucode
102 - !sys-firmware/iwl6050-ucode
103 - !sys-firmware/iwl3160-ucode
104 - !sys-firmware/iwl7260-ucode
105 - !sys-firmware/iwl7265-ucode
106 - !sys-firmware/iwl3160-7260-bt-ucode
107 - !sys-firmware/radeon-ucode
108 - )
109 - unknown-license? (
110 - !sys-firmware/alsa-firmware[alsa_cards_korg1212]
111 - !sys-firmware/alsa-firmware[alsa_cards_maestro3]
112 - !sys-firmware/alsa-firmware[alsa_cards_sb16]
113 - !sys-firmware/alsa-firmware[alsa_cards_ymfpci]
114 - )
115 - )"
116 -
117 -pkg_pretend() {
118 - use initramfs && mount-boot_pkg_pretend
119 -}
120 -
121 -src_unpack() {
122 - if [[ ${PV} == 99999999* ]]; then
123 - git-r3_src_unpack
124 - else
125 - default
126 - # rename directory from git snapshot tarball
127 - mv ${PN}-*/ ${P} || die
128 - fi
129 -}
130 -
131 -src_prepare() {
132 - # source and documentation files, not to be installed
133 - local source_files=(
134 - README
135 - WHENCE
136 - "LICEN[CS]E*"
137 - "GPL*"
138 - configure
139 - Makefile
140 - check_whence.py
141 - atusb/ChangeLog
142 - av7110/Boot.S
143 - av7110/Makefile
144 - carl9170fw/
145 - cis/Makefile
146 - cis/src/
147 - dsp56k/bootstrap.asm
148 - dsp56k/concat-bootstrap.pl
149 - dsp56k/Makefile
150 - "isci/*.[ch]"
151 - isci/Makefile
152 - isci/README
153 - "keyspan_pda/*.S"
154 - keyspan_pda/Makefile
155 - usbdux/
156 - )
157 -
158 - # whitelist of images with a free software license
159 - local free_software=(
160 - # keyspan_pda (GPL-2+)
161 - keyspan_pda/keyspan_pda.fw
162 - keyspan_pda/xircom_pgs.fw
163 - # dsp56k (GPL-2+)
164 - dsp56k/bootstrap.bin
165 - # ath9k_htc (BSD GPL-2+ MIT)
166 - ath9k_htc/htc_7010-1.4.0.fw
167 - ath9k_htc/htc_9271-1.4.0.fw
168 - # pcnet_cs, 3c589_cs, 3c574_cs, serial_cs (dual GPL-2/MPL-1.1)
169 - cis/LA-PCM.cis
170 - cis/PCMLM28.cis
171 - cis/DP83903.cis
172 - cis/NE2K.cis
173 - cis/tamarack.cis
174 - cis/PE-200.cis
175 - cis/PE520.cis
176 - cis/3CXEM556.cis
177 - cis/3CCFEM556.cis
178 - cis/MT5634ZLX.cis
179 - cis/RS-COM-2P.cis
180 - cis/COMpad2.cis
181 - cis/COMpad4.cis
182 - # serial_cs (GPL-3)
183 - cis/SW_555_SER.cis
184 - cis/SW_7xx_SER.cis
185 - cis/SW_8xx_SER.cis
186 - # dvb-ttpci (GPL-2+)
187 - av7110/bootcode.bin
188 - # usbdux, usbduxfast, usbduxsigma (GPL-2+)
189 - usbdux_firmware.bin
190 - usbduxfast_firmware.bin
191 - usbduxsigma_firmware.bin
192 - # brcmfmac (GPL-2+)
193 - brcm/brcmfmac4330-sdio.Prowise-PT301.txt
194 - brcm/brcmfmac43340-sdio.meegopad-t08.txt
195 - brcm/brcmfmac43362-sdio.cubietech,cubietruck.txt
196 - brcm/brcmfmac43362-sdio.lemaker,bananapro.txt
197 - brcm/brcmfmac43430a0-sdio.jumper-ezpad-mini3.txt
198 - "brcm/brcmfmac43430a0-sdio.ONDA-V80 PLUS.txt"
199 - brcm/brcmfmac43430-sdio.AP6212.txt
200 - brcm/brcmfmac43430-sdio.Hampoo-D2D3_Vi8A1.txt
201 - brcm/brcmfmac43430-sdio.MUR1DX.txt
202 - brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt
203 - brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
204 - brcm/brcmfmac4356-pcie.gpd-win-pocket.txt
205 - # isci (GPL-2)
206 - isci/isci_firmware.bin
207 - # carl9170 (GPL-2+)
208 - carl9170-1.fw
209 - # atusb (GPL-2+)
210 - atusb/atusb-0.2.dfu
211 - atusb/atusb-0.3.dfu
212 - atusb/rzusb-0.3.bin
213 - # mlxsw_spectrum (dual BSD/GPL-2)
214 - mellanox/mlxsw_spectrum-13.1420.122.mfa2
215 - mellanox/mlxsw_spectrum-13.1530.152.mfa2
216 - mellanox/mlxsw_spectrum-13.1620.192.mfa2
217 - mellanox/mlxsw_spectrum-13.1702.6.mfa2
218 - mellanox/mlxsw_spectrum-13.1703.4.mfa2
219 - mellanox/mlxsw_spectrum-13.1910.622.mfa2
220 - mellanox/mlxsw_spectrum-13.2000.1122.mfa2
221 - )
222 -
223 - # blacklist of images with unknown license
224 - local unknown_license=(
225 - atmsar11.fw
226 - korg/k1212.dsp
227 - ess/maestro3_assp_kernel.fw
228 - ess/maestro3_assp_minisrc.fw
229 - yamaha/ds1_ctrl.fw
230 - yamaha/ds1_dsp.fw
231 - yamaha/ds1e_ctrl.fw
232 - tr_smctr.bin
233 - ttusb-budget/dspbootcode.bin
234 - emi62/bitstream.fw
235 - emi62/loader.fw
236 - emi62/midi.fw
237 - emi62/spdif.fw
238 - ti_3410.fw
239 - ti_5052.fw
240 - mts_mt9234mu.fw
241 - mts_mt9234zba.fw
242 - whiteheat.fw
243 - whiteheat_loader.fw
244 - intelliport2.bin
245 - cpia2/stv0672_vp4.bin
246 - vicam/firmware.fw
247 - edgeport/boot.fw
248 - edgeport/boot2.fw
249 - edgeport/down.fw
250 - edgeport/down2.fw
251 - edgeport/down3.bin
252 - sb16/mulaw_main.csp
253 - sb16/alaw_main.csp
254 - sb16/ima_adpcm_init.csp
255 - sb16/ima_adpcm_playback.csp
256 - sb16/ima_adpcm_capture.csp
257 - sun/cassini.bin
258 - acenic/tg1.bin
259 - acenic/tg2.bin
260 - adaptec/starfire_rx.bin
261 - adaptec/starfire_tx.bin
262 - yam/1200.bin
263 - yam/9600.bin
264 - 3com/3C359.bin
265 - ositech/Xilinx7OD.bin
266 - qlogic/isp1000.bin
267 - myricom/lanai.bin
268 - yamaha/yss225_registers.bin
269 - lgs8g75.fw
270 - )
271 -
272 - default
273 -
274 - # remove sources and documentation (wildcards are expanded)
275 - rm -r ${source_files[@]} || die
276 - rm -rf .git
277 -
278 - if use !unknown-license; then
279 - # remove files in unknown_license
280 - rm "${unknown_license[@]}" || die
281 - fi
282 -
283 - if use !redistributable; then
284 - # remove files _not_ in the free_software or unknown_license lists
285 - # everything else is confirmed (or assumed) to be redistributable
286 - # based on upstream acceptance policy
287 - local IFS=$'\n'
288 - find ! -type d -printf "%P\n" \
289 - | grep -Fvx -e "${free_software[*]}" -e "${unknown_license[*]}" \
290 - | xargs -d '\n' rm || die
291 - IFS=$' \t\n'
292 - fi
293 -
294 - if use initramfs; then
295 - if [[ -d "${S}/amd-ucode" ]]; then
296 - local UCODETMP="${T}/ucode_tmp"
297 - local UCODEDIR="${UCODETMP}/kernel/x86/microcode"
298 - mkdir -p "${UCODEDIR}" || die
299 - echo 1 > "${UCODETMP}/early_cpio"
300 -
301 - local amd_ucode_file="${UCODEDIR}/AuthenticAMD.bin"
302 - cat "${S}"/amd-ucode/*.bin > "${amd_ucode_file}" || die "Failed to concat amd cpu ucode"
303 -
304 - if [[ ! -s "${amd_ucode_file}" ]]; then
305 - die "Sanity check failed: '${amd_ucode_file}' is empty!"
306 - fi
307 -
308 - pushd "${UCODETMP}" &>/dev/null || die
309 - find . -print0 | cpio --quiet --null -o -H newc -R 0:0 > "${S}"/amd-uc.img
310 - popd &>/dev/null || die
311 - if [[ ! -s "${S}/amd-uc.img" ]]; then
312 - die "Failed to create '${S}/amd-uc.img'!"
313 - fi
314 - else
315 - # If this will ever happen something has changed which
316 - # must be reviewed
317 - die "'${S}/amd-ucode' not found!"
318 - fi
319 - fi
320 -
321 - echo "# Remove files that shall not be installed from this list." > ${PN}.conf
322 - find * ! -type d ! \( -name ${PN}.conf -o -name amd-uc.img \) >> ${PN}.conf
323 -
324 - if use savedconfig; then
325 - restore_config ${PN}.conf
326 -
327 - ebegin "Removing all files not listed in config"
328 - find ! -type d ! \( -name ${PN}.conf -o -name amd-uc.img \) -printf "%P\n" \
329 - | grep -Fvx -f <(grep -v '^#' ${PN}.conf \
330 - || die "grep failed, empty config file?") \
331 - | xargs -d '\n' --no-run-if-empty rm
332 - eend $? || die
333 - fi
334 -
335 - # remove empty directories, bug #396073
336 - find -type d -empty -delete || die
337 -}
338 -
339 -src_install() {
340 - save_config ${PN}.conf
341 - rm ${PN}.conf || die
342 -
343 - if use initramfs ; then
344 - mkdir "${ED}/boot" || die
345 - mv "${S}"/amd-uc.img "${ED}/boot" || die
346 - fi
347 -
348 - if ! ( shopt -s failglob; : * ) 2>/dev/null; then
349 - eerror "No files to install. Check your USE flag settings"
350 - eerror "and the list of files in your saved configuration."
351 - die "Refusing to install an empty package"
352 - fi
353 -
354 - insinto /lib/firmware/
355 - doins -r *
356 -}
357 -
358 -pkg_preinst() {
359 - if use savedconfig; then
360 - ewarn "USE=savedconfig is active. You must handle file collisions manually."
361 - fi
362 -
363 - # Make sure /boot is available if needed.
364 - use initramfs && mount-boot_pkg_preinst
365 -}
366 -
367 -pkg_postinst() {
368 - elog "If you are only interested in particular firmware files, edit the saved"
369 - elog "configfile and remove those that you do not want."
370 -
371 - local ver
372 - for ver in ${REPLACING_VERSIONS}; do
373 - if ver_test ${ver} -lt 20190514; then
374 - elog
375 - elog 'Starting with version 20190514, installation of many firmware'
376 - elog 'files is controlled by USE flags. Please review your USE flag'
377 - elog 'and package.license settings if you are missing some files.'
378 - break
379 - fi
380 - done
381 -
382 - # Don't forget to umount /boot if it was previously mounted by us.
383 - use initramfs && mount-boot_pkg_postinst
384 -}
385 -
386 -pkg_prerm() {
387 - # Make sure /boot is mounted so that we can remove /boot/amd-uc.img!
388 - use initramfs && mount-boot_pkg_prerm
389 -}
390 -
391 -pkg_postrm() {
392 - # Don't forget to umount /boot if it was previously mounted by us.
393 - use initramfs && mount-boot_pkg_postrm
394 -}
395
396 diff --git a/sys-kernel/linux-firmware/linux-firmware-20190923.ebuild b/sys-kernel/linux-firmware/linux-firmware-20190923.ebuild
397 deleted file mode 100644
398 index e212d2e4088..00000000000
399 --- a/sys-kernel/linux-firmware/linux-firmware-20190923.ebuild
400 +++ /dev/null
401 @@ -1,354 +0,0 @@
402 -# Copyright 1999-2020 Gentoo Authors
403 -# Distributed under the terms of the GNU General Public License v2
404 -
405 -EAPI=7
406 -inherit mount-boot savedconfig
407 -
408 -if [[ ${PV} == 99999999* ]]; then
409 - inherit git-r3
410 - EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/${PN}.git"
411 -else
412 - GIT_COMMIT="417a9c6e197a8d3eec792494efc87a2b42f76324"
413 - SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
414 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
415 -fi
416 -
417 -DESCRIPTION="Linux firmware files"
418 -HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git"
419 -
420 -LICENSE="GPL-2 GPL-2+ GPL-3 BSD MIT || ( MPL-1.1 GPL-2 )
421 - redistributable? (
422 - linux-fw-redistributable ( BSD-2 BSD BSD-4 ISC MIT no-source-code ) )
423 - unknown-license? ( all-rights-reserved )"
424 -SLOT="0"
425 -IUSE="initramfs +redistributable savedconfig unknown-license"
426 -RESTRICT="binchecks strip
427 - unknown-license? ( bindist )"
428 -
429 -REQUIRED_USE="initramfs? ( redistributable )"
430 -
431 -BDEPEND="initramfs? ( app-arch/cpio )"
432 -
433 -#add anything else that collides to this
434 -RDEPEND="!savedconfig? (
435 - redistributable? (
436 - !sys-firmware/alsa-firmware[alsa_cards_ca0132]
437 - !media-tv/cx18-firmware
438 - !<sys-firmware/ivtv-firmware-20080701-r1
439 - !media-tv/linuxtv-dvb-firmware[dvb_cards_cx231xx]
440 - !media-tv/linuxtv-dvb-firmware[dvb_cards_cx23885]
441 - !media-tv/linuxtv-dvb-firmware[dvb_cards_usb-dib0700]
442 - !net-dialup/ueagle-atm
443 - !net-dialup/ueagle4-atm
444 - !net-wireless/ar9271-firmware
445 - !net-wireless/i2400m-fw
446 - !net-wireless/libertas-firmware
447 - !sys-firmware/rt61-firmware
448 - !net-wireless/rt73-firmware
449 - !net-wireless/rt2860-firmware
450 - !net-wireless/rt2870-firmware
451 - !sys-block/qla-fc-firmware
452 - !sys-firmware/amd-ucode
453 - !sys-firmware/iwl1000-ucode
454 - !sys-firmware/iwl2000-ucode
455 - !sys-firmware/iwl2030-ucode
456 - !sys-firmware/iwl3945-ucode
457 - !sys-firmware/iwl4965-ucode
458 - !sys-firmware/iwl5000-ucode
459 - !sys-firmware/iwl5150-ucode
460 - !sys-firmware/iwl6000-ucode
461 - !sys-firmware/iwl6005-ucode
462 - !sys-firmware/iwl6030-ucode
463 - !sys-firmware/iwl6050-ucode
464 - !sys-firmware/iwl3160-ucode
465 - !sys-firmware/iwl7260-ucode
466 - !sys-firmware/iwl7265-ucode
467 - !sys-firmware/iwl3160-7260-bt-ucode
468 - !sys-firmware/radeon-ucode
469 - )
470 - unknown-license? (
471 - !sys-firmware/alsa-firmware[alsa_cards_korg1212]
472 - !sys-firmware/alsa-firmware[alsa_cards_maestro3]
473 - !sys-firmware/alsa-firmware[alsa_cards_sb16]
474 - !sys-firmware/alsa-firmware[alsa_cards_ymfpci]
475 - )
476 - )"
477 -
478 -pkg_pretend() {
479 - use initramfs && mount-boot_pkg_pretend
480 -}
481 -
482 -src_unpack() {
483 - if [[ ${PV} == 99999999* ]]; then
484 - git-r3_src_unpack
485 - else
486 - default
487 - # rename directory from git snapshot tarball
488 - mv ${PN}-*/ ${P} || die
489 - fi
490 -}
491 -
492 -src_prepare() {
493 - # source and documentation files, not to be installed
494 - local source_files=(
495 - README
496 - WHENCE
497 - "LICEN[CS]E*"
498 - "GPL*"
499 - configure
500 - Makefile
501 - check_whence.py
502 - atusb/ChangeLog
503 - av7110/Boot.S
504 - av7110/Makefile
505 - carl9170fw/
506 - cis/Makefile
507 - cis/src/
508 - dsp56k/bootstrap.asm
509 - dsp56k/concat-bootstrap.pl
510 - dsp56k/Makefile
511 - "isci/*.[ch]"
512 - isci/Makefile
513 - isci/README
514 - "keyspan_pda/*.S"
515 - keyspan_pda/Makefile
516 - usbdux/
517 - )
518 -
519 - # whitelist of images with a free software license
520 - local free_software=(
521 - # keyspan_pda (GPL-2+)
522 - keyspan_pda/keyspan_pda.fw
523 - keyspan_pda/xircom_pgs.fw
524 - # dsp56k (GPL-2+)
525 - dsp56k/bootstrap.bin
526 - # ath9k_htc (BSD GPL-2+ MIT)
527 - ath9k_htc/htc_7010-1.4.0.fw
528 - ath9k_htc/htc_9271-1.4.0.fw
529 - # pcnet_cs, 3c589_cs, 3c574_cs, serial_cs (dual GPL-2/MPL-1.1)
530 - cis/LA-PCM.cis
531 - cis/PCMLM28.cis
532 - cis/DP83903.cis
533 - cis/NE2K.cis
534 - cis/tamarack.cis
535 - cis/PE-200.cis
536 - cis/PE520.cis
537 - cis/3CXEM556.cis
538 - cis/3CCFEM556.cis
539 - cis/MT5634ZLX.cis
540 - cis/RS-COM-2P.cis
541 - cis/COMpad2.cis
542 - cis/COMpad4.cis
543 - # serial_cs (GPL-3)
544 - cis/SW_555_SER.cis
545 - cis/SW_7xx_SER.cis
546 - cis/SW_8xx_SER.cis
547 - # dvb-ttpci (GPL-2+)
548 - av7110/bootcode.bin
549 - # usbdux, usbduxfast, usbduxsigma (GPL-2+)
550 - usbdux_firmware.bin
551 - usbduxfast_firmware.bin
552 - usbduxsigma_firmware.bin
553 - # brcmfmac (GPL-2+)
554 - brcm/brcmfmac4330-sdio.Prowise-PT301.txt
555 - brcm/brcmfmac43340-sdio.meegopad-t08.txt
556 - brcm/brcmfmac43362-sdio.cubietech,cubietruck.txt
557 - brcm/brcmfmac43362-sdio.lemaker,bananapro.txt
558 - brcm/brcmfmac43430a0-sdio.jumper-ezpad-mini3.txt
559 - "brcm/brcmfmac43430a0-sdio.ONDA-V80 PLUS.txt"
560 - brcm/brcmfmac43430-sdio.AP6212.txt
561 - brcm/brcmfmac43430-sdio.Hampoo-D2D3_Vi8A1.txt
562 - brcm/brcmfmac43430-sdio.MUR1DX.txt
563 - brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt
564 - brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
565 - brcm/brcmfmac4356-pcie.gpd-win-pocket.txt
566 - # isci (GPL-2)
567 - isci/isci_firmware.bin
568 - # carl9170 (GPL-2+)
569 - carl9170-1.fw
570 - # atusb (GPL-2+)
571 - atusb/atusb-0.2.dfu
572 - atusb/atusb-0.3.dfu
573 - atusb/rzusb-0.3.bin
574 - # mlxsw_spectrum (dual BSD/GPL-2)
575 - mellanox/mlxsw_spectrum-13.1420.122.mfa2
576 - mellanox/mlxsw_spectrum-13.1530.152.mfa2
577 - mellanox/mlxsw_spectrum-13.1620.192.mfa2
578 - mellanox/mlxsw_spectrum-13.1702.6.mfa2
579 - mellanox/mlxsw_spectrum-13.1703.4.mfa2
580 - mellanox/mlxsw_spectrum-13.1910.622.mfa2
581 - mellanox/mlxsw_spectrum-13.2000.1122.mfa2
582 - )
583 -
584 - # blacklist of images with unknown license
585 - local unknown_license=(
586 - atmsar11.fw
587 - korg/k1212.dsp
588 - ess/maestro3_assp_kernel.fw
589 - ess/maestro3_assp_minisrc.fw
590 - yamaha/ds1_ctrl.fw
591 - yamaha/ds1_dsp.fw
592 - yamaha/ds1e_ctrl.fw
593 - tr_smctr.bin
594 - ttusb-budget/dspbootcode.bin
595 - emi62/bitstream.fw
596 - emi62/loader.fw
597 - emi62/midi.fw
598 - emi62/spdif.fw
599 - ti_3410.fw
600 - ti_5052.fw
601 - mts_mt9234mu.fw
602 - mts_mt9234zba.fw
603 - whiteheat.fw
604 - whiteheat_loader.fw
605 - intelliport2.bin
606 - cpia2/stv0672_vp4.bin
607 - vicam/firmware.fw
608 - edgeport/boot.fw
609 - edgeport/boot2.fw
610 - edgeport/down.fw
611 - edgeport/down2.fw
612 - edgeport/down3.bin
613 - sb16/mulaw_main.csp
614 - sb16/alaw_main.csp
615 - sb16/ima_adpcm_init.csp
616 - sb16/ima_adpcm_playback.csp
617 - sb16/ima_adpcm_capture.csp
618 - sun/cassini.bin
619 - acenic/tg1.bin
620 - acenic/tg2.bin
621 - adaptec/starfire_rx.bin
622 - adaptec/starfire_tx.bin
623 - yam/1200.bin
624 - yam/9600.bin
625 - 3com/3C359.bin
626 - ositech/Xilinx7OD.bin
627 - qlogic/isp1000.bin
628 - myricom/lanai.bin
629 - yamaha/yss225_registers.bin
630 - lgs8g75.fw
631 - )
632 -
633 - default
634 -
635 - # remove sources and documentation (wildcards are expanded)
636 - rm -r ${source_files[@]} || die
637 - rm -rf .git
638 -
639 - if use !unknown-license; then
640 - # remove files in unknown_license
641 - rm "${unknown_license[@]}" || die
642 - fi
643 -
644 - if use !redistributable; then
645 - # remove files _not_ in the free_software or unknown_license lists
646 - # everything else is confirmed (or assumed) to be redistributable
647 - # based on upstream acceptance policy
648 - local IFS=$'\n'
649 - find ! -type d -printf "%P\n" \
650 - | grep -Fvx -e "${free_software[*]}" -e "${unknown_license[*]}" \
651 - | xargs -d '\n' rm || die
652 - IFS=$' \t\n'
653 - fi
654 -
655 - if use initramfs; then
656 - if [[ -d "${S}/amd-ucode" ]]; then
657 - local UCODETMP="${T}/ucode_tmp"
658 - local UCODEDIR="${UCODETMP}/kernel/x86/microcode"
659 - mkdir -p "${UCODEDIR}" || die
660 - echo 1 > "${UCODETMP}/early_cpio"
661 -
662 - local amd_ucode_file="${UCODEDIR}/AuthenticAMD.bin"
663 - cat "${S}"/amd-ucode/*.bin > "${amd_ucode_file}" || die "Failed to concat amd cpu ucode"
664 -
665 - if [[ ! -s "${amd_ucode_file}" ]]; then
666 - die "Sanity check failed: '${amd_ucode_file}' is empty!"
667 - fi
668 -
669 - pushd "${UCODETMP}" &>/dev/null || die
670 - find . -print0 | cpio --quiet --null -o -H newc -R 0:0 > "${S}"/amd-uc.img
671 - popd &>/dev/null || die
672 - if [[ ! -s "${S}/amd-uc.img" ]]; then
673 - die "Failed to create '${S}/amd-uc.img'!"
674 - fi
675 - else
676 - # If this will ever happen something has changed which
677 - # must be reviewed
678 - die "'${S}/amd-ucode' not found!"
679 - fi
680 - fi
681 -
682 - echo "# Remove files that shall not be installed from this list." > ${PN}.conf
683 - find * ! -type d ! \( -name ${PN}.conf -o -name amd-uc.img \) >> ${PN}.conf
684 -
685 - if use savedconfig; then
686 - restore_config ${PN}.conf
687 -
688 - ebegin "Removing all files not listed in config"
689 - find ! -type d ! \( -name ${PN}.conf -o -name amd-uc.img \) -printf "%P\n" \
690 - | grep -Fvx -f <(grep -v '^#' ${PN}.conf \
691 - || die "grep failed, empty config file?") \
692 - | xargs -d '\n' --no-run-if-empty rm
693 - eend $? || die
694 - fi
695 -
696 - # remove empty directories, bug #396073
697 - find -type d -empty -delete || die
698 -}
699 -
700 -src_install() {
701 - save_config ${PN}.conf
702 - rm ${PN}.conf || die
703 -
704 - if use initramfs ; then
705 - mkdir "${ED}/boot" || die
706 - mv "${S}"/amd-uc.img "${ED}/boot" || die
707 - fi
708 -
709 - if ! ( shopt -s failglob; : * ) 2>/dev/null; then
710 - eerror "No files to install. Check your USE flag settings"
711 - eerror "and the list of files in your saved configuration."
712 - die "Refusing to install an empty package"
713 - fi
714 -
715 - insinto /lib/firmware/
716 - doins -r *
717 -}
718 -
719 -pkg_preinst() {
720 - if use savedconfig; then
721 - ewarn "USE=savedconfig is active. You must handle file collisions manually."
722 - fi
723 -
724 - # Make sure /boot is available if needed.
725 - use initramfs && mount-boot_pkg_preinst
726 -}
727 -
728 -pkg_postinst() {
729 - elog "If you are only interested in particular firmware files, edit the saved"
730 - elog "configfile and remove those that you do not want."
731 -
732 - local ver
733 - for ver in ${REPLACING_VERSIONS}; do
734 - if ver_test ${ver} -lt 20190514; then
735 - elog
736 - elog 'Starting with version 20190514, installation of many firmware'
737 - elog 'files is controlled by USE flags. Please review your USE flag'
738 - elog 'and package.license settings if you are missing some files.'
739 - break
740 - fi
741 - done
742 -
743 - # Don't forget to umount /boot if it was previously mounted by us.
744 - use initramfs && mount-boot_pkg_postinst
745 -}
746 -
747 -pkg_prerm() {
748 - # Make sure /boot is mounted so that we can remove /boot/amd-uc.img!
749 - use initramfs && mount-boot_pkg_prerm
750 -}
751 -
752 -pkg_postrm() {
753 - # Don't forget to umount /boot if it was previously mounted by us.
754 - use initramfs && mount-boot_pkg_postrm
755 -}
756
757 diff --git a/sys-kernel/linux-firmware/linux-firmware-20191022.ebuild b/sys-kernel/linux-firmware/linux-firmware-20191022.ebuild
758 deleted file mode 100644
759 index b5f0efd8ab0..00000000000
760 --- a/sys-kernel/linux-firmware/linux-firmware-20191022.ebuild
761 +++ /dev/null
762 @@ -1,354 +0,0 @@
763 -# Copyright 1999-2020 Gentoo Authors
764 -# Distributed under the terms of the GNU General Public License v2
765 -
766 -EAPI=7
767 -inherit mount-boot savedconfig
768 -
769 -if [[ ${PV} == 99999999* ]]; then
770 - inherit git-r3
771 - EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/${PN}.git"
772 -else
773 - GIT_COMMIT="2b016afc348ba4b5fb2016ffcb2822f4a293da0c"
774 - SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
775 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
776 -fi
777 -
778 -DESCRIPTION="Linux firmware files"
779 -HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git"
780 -
781 -LICENSE="GPL-2 GPL-2+ GPL-3 BSD MIT || ( MPL-1.1 GPL-2 )
782 - redistributable? (
783 - linux-fw-redistributable ( BSD-2 BSD BSD-4 ISC MIT no-source-code ) )
784 - unknown-license? ( all-rights-reserved )"
785 -SLOT="0"
786 -IUSE="initramfs +redistributable savedconfig unknown-license"
787 -RESTRICT="binchecks strip
788 - unknown-license? ( bindist )"
789 -
790 -REQUIRED_USE="initramfs? ( redistributable )"
791 -
792 -BDEPEND="initramfs? ( app-arch/cpio )"
793 -
794 -#add anything else that collides to this
795 -RDEPEND="!savedconfig? (
796 - redistributable? (
797 - !sys-firmware/alsa-firmware[alsa_cards_ca0132]
798 - !media-tv/cx18-firmware
799 - !<sys-firmware/ivtv-firmware-20080701-r1
800 - !media-tv/linuxtv-dvb-firmware[dvb_cards_cx231xx]
801 - !media-tv/linuxtv-dvb-firmware[dvb_cards_cx23885]
802 - !media-tv/linuxtv-dvb-firmware[dvb_cards_usb-dib0700]
803 - !net-dialup/ueagle-atm
804 - !net-dialup/ueagle4-atm
805 - !net-wireless/ar9271-firmware
806 - !net-wireless/i2400m-fw
807 - !net-wireless/libertas-firmware
808 - !sys-firmware/rt61-firmware
809 - !net-wireless/rt73-firmware
810 - !net-wireless/rt2860-firmware
811 - !net-wireless/rt2870-firmware
812 - !sys-block/qla-fc-firmware
813 - !sys-firmware/amd-ucode
814 - !sys-firmware/iwl1000-ucode
815 - !sys-firmware/iwl2000-ucode
816 - !sys-firmware/iwl2030-ucode
817 - !sys-firmware/iwl3945-ucode
818 - !sys-firmware/iwl4965-ucode
819 - !sys-firmware/iwl5000-ucode
820 - !sys-firmware/iwl5150-ucode
821 - !sys-firmware/iwl6000-ucode
822 - !sys-firmware/iwl6005-ucode
823 - !sys-firmware/iwl6030-ucode
824 - !sys-firmware/iwl6050-ucode
825 - !sys-firmware/iwl3160-ucode
826 - !sys-firmware/iwl7260-ucode
827 - !sys-firmware/iwl7265-ucode
828 - !sys-firmware/iwl3160-7260-bt-ucode
829 - !sys-firmware/radeon-ucode
830 - )
831 - unknown-license? (
832 - !sys-firmware/alsa-firmware[alsa_cards_korg1212]
833 - !sys-firmware/alsa-firmware[alsa_cards_maestro3]
834 - !sys-firmware/alsa-firmware[alsa_cards_sb16]
835 - !sys-firmware/alsa-firmware[alsa_cards_ymfpci]
836 - )
837 - )"
838 -
839 -pkg_pretend() {
840 - use initramfs && mount-boot_pkg_pretend
841 -}
842 -
843 -src_unpack() {
844 - if [[ ${PV} == 99999999* ]]; then
845 - git-r3_src_unpack
846 - else
847 - default
848 - # rename directory from git snapshot tarball
849 - mv ${PN}-*/ ${P} || die
850 - fi
851 -}
852 -
853 -src_prepare() {
854 - # source and documentation files, not to be installed
855 - local source_files=(
856 - README
857 - WHENCE
858 - "LICEN[CS]E*"
859 - "GPL*"
860 - configure
861 - Makefile
862 - check_whence.py
863 - atusb/ChangeLog
864 - av7110/Boot.S
865 - av7110/Makefile
866 - carl9170fw/
867 - cis/Makefile
868 - cis/src/
869 - dsp56k/bootstrap.asm
870 - dsp56k/concat-bootstrap.pl
871 - dsp56k/Makefile
872 - "isci/*.[ch]"
873 - isci/Makefile
874 - isci/README
875 - "keyspan_pda/*.S"
876 - keyspan_pda/Makefile
877 - usbdux/
878 - )
879 -
880 - # whitelist of images with a free software license
881 - local free_software=(
882 - # keyspan_pda (GPL-2+)
883 - keyspan_pda/keyspan_pda.fw
884 - keyspan_pda/xircom_pgs.fw
885 - # dsp56k (GPL-2+)
886 - dsp56k/bootstrap.bin
887 - # ath9k_htc (BSD GPL-2+ MIT)
888 - ath9k_htc/htc_7010-1.4.0.fw
889 - ath9k_htc/htc_9271-1.4.0.fw
890 - # pcnet_cs, 3c589_cs, 3c574_cs, serial_cs (dual GPL-2/MPL-1.1)
891 - cis/LA-PCM.cis
892 - cis/PCMLM28.cis
893 - cis/DP83903.cis
894 - cis/NE2K.cis
895 - cis/tamarack.cis
896 - cis/PE-200.cis
897 - cis/PE520.cis
898 - cis/3CXEM556.cis
899 - cis/3CCFEM556.cis
900 - cis/MT5634ZLX.cis
901 - cis/RS-COM-2P.cis
902 - cis/COMpad2.cis
903 - cis/COMpad4.cis
904 - # serial_cs (GPL-3)
905 - cis/SW_555_SER.cis
906 - cis/SW_7xx_SER.cis
907 - cis/SW_8xx_SER.cis
908 - # dvb-ttpci (GPL-2+)
909 - av7110/bootcode.bin
910 - # usbdux, usbduxfast, usbduxsigma (GPL-2+)
911 - usbdux_firmware.bin
912 - usbduxfast_firmware.bin
913 - usbduxsigma_firmware.bin
914 - # brcmfmac (GPL-2+)
915 - brcm/brcmfmac4330-sdio.Prowise-PT301.txt
916 - brcm/brcmfmac43340-sdio.meegopad-t08.txt
917 - brcm/brcmfmac43362-sdio.cubietech,cubietruck.txt
918 - brcm/brcmfmac43362-sdio.lemaker,bananapro.txt
919 - brcm/brcmfmac43430a0-sdio.jumper-ezpad-mini3.txt
920 - "brcm/brcmfmac43430a0-sdio.ONDA-V80 PLUS.txt"
921 - brcm/brcmfmac43430-sdio.AP6212.txt
922 - brcm/brcmfmac43430-sdio.Hampoo-D2D3_Vi8A1.txt
923 - brcm/brcmfmac43430-sdio.MUR1DX.txt
924 - brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt
925 - brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
926 - brcm/brcmfmac4356-pcie.gpd-win-pocket.txt
927 - # isci (GPL-2)
928 - isci/isci_firmware.bin
929 - # carl9170 (GPL-2+)
930 - carl9170-1.fw
931 - # atusb (GPL-2+)
932 - atusb/atusb-0.2.dfu
933 - atusb/atusb-0.3.dfu
934 - atusb/rzusb-0.3.bin
935 - # mlxsw_spectrum (dual BSD/GPL-2)
936 - mellanox/mlxsw_spectrum-13.1420.122.mfa2
937 - mellanox/mlxsw_spectrum-13.1530.152.mfa2
938 - mellanox/mlxsw_spectrum-13.1620.192.mfa2
939 - mellanox/mlxsw_spectrum-13.1702.6.mfa2
940 - mellanox/mlxsw_spectrum-13.1703.4.mfa2
941 - mellanox/mlxsw_spectrum-13.1910.622.mfa2
942 - mellanox/mlxsw_spectrum-13.2000.1122.mfa2
943 - )
944 -
945 - # blacklist of images with unknown license
946 - local unknown_license=(
947 - atmsar11.fw
948 - korg/k1212.dsp
949 - ess/maestro3_assp_kernel.fw
950 - ess/maestro3_assp_minisrc.fw
951 - yamaha/ds1_ctrl.fw
952 - yamaha/ds1_dsp.fw
953 - yamaha/ds1e_ctrl.fw
954 - tr_smctr.bin
955 - ttusb-budget/dspbootcode.bin
956 - emi62/bitstream.fw
957 - emi62/loader.fw
958 - emi62/midi.fw
959 - emi62/spdif.fw
960 - ti_3410.fw
961 - ti_5052.fw
962 - mts_mt9234mu.fw
963 - mts_mt9234zba.fw
964 - whiteheat.fw
965 - whiteheat_loader.fw
966 - intelliport2.bin
967 - cpia2/stv0672_vp4.bin
968 - vicam/firmware.fw
969 - edgeport/boot.fw
970 - edgeport/boot2.fw
971 - edgeport/down.fw
972 - edgeport/down2.fw
973 - edgeport/down3.bin
974 - sb16/mulaw_main.csp
975 - sb16/alaw_main.csp
976 - sb16/ima_adpcm_init.csp
977 - sb16/ima_adpcm_playback.csp
978 - sb16/ima_adpcm_capture.csp
979 - sun/cassini.bin
980 - acenic/tg1.bin
981 - acenic/tg2.bin
982 - adaptec/starfire_rx.bin
983 - adaptec/starfire_tx.bin
984 - yam/1200.bin
985 - yam/9600.bin
986 - 3com/3C359.bin
987 - ositech/Xilinx7OD.bin
988 - qlogic/isp1000.bin
989 - myricom/lanai.bin
990 - yamaha/yss225_registers.bin
991 - lgs8g75.fw
992 - )
993 -
994 - default
995 -
996 - # remove sources and documentation (wildcards are expanded)
997 - rm -r ${source_files[@]} || die
998 - rm -rf .git
999 -
1000 - if use !unknown-license; then
1001 - # remove files in unknown_license
1002 - rm "${unknown_license[@]}" || die
1003 - fi
1004 -
1005 - if use !redistributable; then
1006 - # remove files _not_ in the free_software or unknown_license lists
1007 - # everything else is confirmed (or assumed) to be redistributable
1008 - # based on upstream acceptance policy
1009 - local IFS=$'\n'
1010 - find ! -type d -printf "%P\n" \
1011 - | grep -Fvx -e "${free_software[*]}" -e "${unknown_license[*]}" \
1012 - | xargs -d '\n' rm || die
1013 - IFS=$' \t\n'
1014 - fi
1015 -
1016 - if use initramfs; then
1017 - if [[ -d "${S}/amd-ucode" ]]; then
1018 - local UCODETMP="${T}/ucode_tmp"
1019 - local UCODEDIR="${UCODETMP}/kernel/x86/microcode"
1020 - mkdir -p "${UCODEDIR}" || die
1021 - echo 1 > "${UCODETMP}/early_cpio"
1022 -
1023 - local amd_ucode_file="${UCODEDIR}/AuthenticAMD.bin"
1024 - cat "${S}"/amd-ucode/*.bin > "${amd_ucode_file}" || die "Failed to concat amd cpu ucode"
1025 -
1026 - if [[ ! -s "${amd_ucode_file}" ]]; then
1027 - die "Sanity check failed: '${amd_ucode_file}' is empty!"
1028 - fi
1029 -
1030 - pushd "${UCODETMP}" &>/dev/null || die
1031 - find . -print0 | cpio --quiet --null -o -H newc -R 0:0 > "${S}"/amd-uc.img
1032 - popd &>/dev/null || die
1033 - if [[ ! -s "${S}/amd-uc.img" ]]; then
1034 - die "Failed to create '${S}/amd-uc.img'!"
1035 - fi
1036 - else
1037 - # If this will ever happen something has changed which
1038 - # must be reviewed
1039 - die "'${S}/amd-ucode' not found!"
1040 - fi
1041 - fi
1042 -
1043 - echo "# Remove files that shall not be installed from this list." > ${PN}.conf
1044 - find * ! -type d ! \( -name ${PN}.conf -o -name amd-uc.img \) >> ${PN}.conf
1045 -
1046 - if use savedconfig; then
1047 - restore_config ${PN}.conf
1048 -
1049 - ebegin "Removing all files not listed in config"
1050 - find ! -type d ! \( -name ${PN}.conf -o -name amd-uc.img \) -printf "%P\n" \
1051 - | grep -Fvx -f <(grep -v '^#' ${PN}.conf \
1052 - || die "grep failed, empty config file?") \
1053 - | xargs -d '\n' --no-run-if-empty rm
1054 - eend $? || die
1055 - fi
1056 -
1057 - # remove empty directories, bug #396073
1058 - find -type d -empty -delete || die
1059 -}
1060 -
1061 -src_install() {
1062 - save_config ${PN}.conf
1063 - rm ${PN}.conf || die
1064 -
1065 - if use initramfs ; then
1066 - mkdir "${ED}/boot" || die
1067 - mv "${S}"/amd-uc.img "${ED}/boot" || die
1068 - fi
1069 -
1070 - if ! ( shopt -s failglob; : * ) 2>/dev/null; then
1071 - eerror "No files to install. Check your USE flag settings"
1072 - eerror "and the list of files in your saved configuration."
1073 - die "Refusing to install an empty package"
1074 - fi
1075 -
1076 - insinto /lib/firmware/
1077 - doins -r *
1078 -}
1079 -
1080 -pkg_preinst() {
1081 - if use savedconfig; then
1082 - ewarn "USE=savedconfig is active. You must handle file collisions manually."
1083 - fi
1084 -
1085 - # Make sure /boot is available if needed.
1086 - use initramfs && mount-boot_pkg_preinst
1087 -}
1088 -
1089 -pkg_postinst() {
1090 - elog "If you are only interested in particular firmware files, edit the saved"
1091 - elog "configfile and remove those that you do not want."
1092 -
1093 - local ver
1094 - for ver in ${REPLACING_VERSIONS}; do
1095 - if ver_test ${ver} -lt 20190514; then
1096 - elog
1097 - elog 'Starting with version 20190514, installation of many firmware'
1098 - elog 'files is controlled by USE flags. Please review your USE flag'
1099 - elog 'and package.license settings if you are missing some files.'
1100 - break
1101 - fi
1102 - done
1103 -
1104 - # Don't forget to umount /boot if it was previously mounted by us.
1105 - use initramfs && mount-boot_pkg_postinst
1106 -}
1107 -
1108 -pkg_prerm() {
1109 - # Make sure /boot is mounted so that we can remove /boot/amd-uc.img!
1110 - use initramfs && mount-boot_pkg_prerm
1111 -}
1112 -
1113 -pkg_postrm() {
1114 - # Don't forget to umount /boot if it was previously mounted by us.
1115 - use initramfs && mount-boot_pkg_postrm
1116 -}
1117
1118 diff --git a/sys-kernel/linux-firmware/linux-firmware-20191215.ebuild b/sys-kernel/linux-firmware/linux-firmware-20191215.ebuild
1119 deleted file mode 100644
1120 index 9ab4a3265a2..00000000000
1121 --- a/sys-kernel/linux-firmware/linux-firmware-20191215.ebuild
1122 +++ /dev/null
1123 @@ -1,354 +0,0 @@
1124 -# Copyright 1999-2020 Gentoo Authors
1125 -# Distributed under the terms of the GNU General Public License v2
1126 -
1127 -EAPI=7
1128 -inherit mount-boot savedconfig
1129 -
1130 -if [[ ${PV} == 99999999* ]]; then
1131 - inherit git-r3
1132 - EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/${PN}.git"
1133 -else
1134 - GIT_COMMIT="f1100ddf581f49aa79a54b56fe6ef0815a7ae57e"
1135 - SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
1136 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
1137 -fi
1138 -
1139 -DESCRIPTION="Linux firmware files"
1140 -HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git"
1141 -
1142 -LICENSE="GPL-2 GPL-2+ GPL-3 BSD MIT || ( MPL-1.1 GPL-2 )
1143 - redistributable? (
1144 - linux-fw-redistributable ( BSD-2 BSD BSD-4 ISC MIT no-source-code ) )
1145 - unknown-license? ( all-rights-reserved )"
1146 -SLOT="0"
1147 -IUSE="initramfs +redistributable savedconfig unknown-license"
1148 -RESTRICT="binchecks strip
1149 - unknown-license? ( bindist )"
1150 -
1151 -REQUIRED_USE="initramfs? ( redistributable )"
1152 -
1153 -BDEPEND="initramfs? ( app-arch/cpio )"
1154 -
1155 -#add anything else that collides to this
1156 -RDEPEND="!savedconfig? (
1157 - redistributable? (
1158 - !sys-firmware/alsa-firmware[alsa_cards_ca0132]
1159 - !media-tv/cx18-firmware
1160 - !<sys-firmware/ivtv-firmware-20080701-r1
1161 - !media-tv/linuxtv-dvb-firmware[dvb_cards_cx231xx]
1162 - !media-tv/linuxtv-dvb-firmware[dvb_cards_cx23885]
1163 - !media-tv/linuxtv-dvb-firmware[dvb_cards_usb-dib0700]
1164 - !net-dialup/ueagle-atm
1165 - !net-dialup/ueagle4-atm
1166 - !net-wireless/ar9271-firmware
1167 - !net-wireless/i2400m-fw
1168 - !net-wireless/libertas-firmware
1169 - !sys-firmware/rt61-firmware
1170 - !net-wireless/rt73-firmware
1171 - !net-wireless/rt2860-firmware
1172 - !net-wireless/rt2870-firmware
1173 - !sys-block/qla-fc-firmware
1174 - !sys-firmware/amd-ucode
1175 - !sys-firmware/iwl1000-ucode
1176 - !sys-firmware/iwl2000-ucode
1177 - !sys-firmware/iwl2030-ucode
1178 - !sys-firmware/iwl3945-ucode
1179 - !sys-firmware/iwl4965-ucode
1180 - !sys-firmware/iwl5000-ucode
1181 - !sys-firmware/iwl5150-ucode
1182 - !sys-firmware/iwl6000-ucode
1183 - !sys-firmware/iwl6005-ucode
1184 - !sys-firmware/iwl6030-ucode
1185 - !sys-firmware/iwl6050-ucode
1186 - !sys-firmware/iwl3160-ucode
1187 - !sys-firmware/iwl7260-ucode
1188 - !sys-firmware/iwl7265-ucode
1189 - !sys-firmware/iwl3160-7260-bt-ucode
1190 - !sys-firmware/radeon-ucode
1191 - )
1192 - unknown-license? (
1193 - !sys-firmware/alsa-firmware[alsa_cards_korg1212]
1194 - !sys-firmware/alsa-firmware[alsa_cards_maestro3]
1195 - !sys-firmware/alsa-firmware[alsa_cards_sb16]
1196 - !sys-firmware/alsa-firmware[alsa_cards_ymfpci]
1197 - )
1198 - )"
1199 -
1200 -pkg_pretend() {
1201 - use initramfs && mount-boot_pkg_pretend
1202 -}
1203 -
1204 -src_unpack() {
1205 - if [[ ${PV} == 99999999* ]]; then
1206 - git-r3_src_unpack
1207 - else
1208 - default
1209 - # rename directory from git snapshot tarball
1210 - mv ${PN}-*/ ${P} || die
1211 - fi
1212 -}
1213 -
1214 -src_prepare() {
1215 - # source and documentation files, not to be installed
1216 - local source_files=(
1217 - README
1218 - WHENCE
1219 - "LICEN[CS]E*"
1220 - "GPL*"
1221 - configure
1222 - Makefile
1223 - check_whence.py
1224 - atusb/ChangeLog
1225 - av7110/Boot.S
1226 - av7110/Makefile
1227 - carl9170fw/
1228 - cis/Makefile
1229 - cis/src/
1230 - dsp56k/bootstrap.asm
1231 - dsp56k/concat-bootstrap.pl
1232 - dsp56k/Makefile
1233 - "isci/*.[ch]"
1234 - isci/Makefile
1235 - isci/README
1236 - "keyspan_pda/*.S"
1237 - keyspan_pda/Makefile
1238 - usbdux/
1239 - )
1240 -
1241 - # whitelist of images with a free software license
1242 - local free_software=(
1243 - # keyspan_pda (GPL-2+)
1244 - keyspan_pda/keyspan_pda.fw
1245 - keyspan_pda/xircom_pgs.fw
1246 - # dsp56k (GPL-2+)
1247 - dsp56k/bootstrap.bin
1248 - # ath9k_htc (BSD GPL-2+ MIT)
1249 - ath9k_htc/htc_7010-1.4.0.fw
1250 - ath9k_htc/htc_9271-1.4.0.fw
1251 - # pcnet_cs, 3c589_cs, 3c574_cs, serial_cs (dual GPL-2/MPL-1.1)
1252 - cis/LA-PCM.cis
1253 - cis/PCMLM28.cis
1254 - cis/DP83903.cis
1255 - cis/NE2K.cis
1256 - cis/tamarack.cis
1257 - cis/PE-200.cis
1258 - cis/PE520.cis
1259 - cis/3CXEM556.cis
1260 - cis/3CCFEM556.cis
1261 - cis/MT5634ZLX.cis
1262 - cis/RS-COM-2P.cis
1263 - cis/COMpad2.cis
1264 - cis/COMpad4.cis
1265 - # serial_cs (GPL-3)
1266 - cis/SW_555_SER.cis
1267 - cis/SW_7xx_SER.cis
1268 - cis/SW_8xx_SER.cis
1269 - # dvb-ttpci (GPL-2+)
1270 - av7110/bootcode.bin
1271 - # usbdux, usbduxfast, usbduxsigma (GPL-2+)
1272 - usbdux_firmware.bin
1273 - usbduxfast_firmware.bin
1274 - usbduxsigma_firmware.bin
1275 - # brcmfmac (GPL-2+)
1276 - brcm/brcmfmac4330-sdio.Prowise-PT301.txt
1277 - brcm/brcmfmac43340-sdio.meegopad-t08.txt
1278 - brcm/brcmfmac43362-sdio.cubietech,cubietruck.txt
1279 - brcm/brcmfmac43362-sdio.lemaker,bananapro.txt
1280 - brcm/brcmfmac43430a0-sdio.jumper-ezpad-mini3.txt
1281 - "brcm/brcmfmac43430a0-sdio.ONDA-V80 PLUS.txt"
1282 - brcm/brcmfmac43430-sdio.AP6212.txt
1283 - brcm/brcmfmac43430-sdio.Hampoo-D2D3_Vi8A1.txt
1284 - brcm/brcmfmac43430-sdio.MUR1DX.txt
1285 - brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt
1286 - brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
1287 - brcm/brcmfmac4356-pcie.gpd-win-pocket.txt
1288 - # isci (GPL-2)
1289 - isci/isci_firmware.bin
1290 - # carl9170 (GPL-2+)
1291 - carl9170-1.fw
1292 - # atusb (GPL-2+)
1293 - atusb/atusb-0.2.dfu
1294 - atusb/atusb-0.3.dfu
1295 - atusb/rzusb-0.3.bin
1296 - # mlxsw_spectrum (dual BSD/GPL-2)
1297 - mellanox/mlxsw_spectrum-13.1420.122.mfa2
1298 - mellanox/mlxsw_spectrum-13.1530.152.mfa2
1299 - mellanox/mlxsw_spectrum-13.1620.192.mfa2
1300 - mellanox/mlxsw_spectrum-13.1702.6.mfa2
1301 - mellanox/mlxsw_spectrum-13.1703.4.mfa2
1302 - mellanox/mlxsw_spectrum-13.1910.622.mfa2
1303 - mellanox/mlxsw_spectrum-13.2000.1122.mfa2
1304 - )
1305 -
1306 - # blacklist of images with unknown license
1307 - local unknown_license=(
1308 - atmsar11.fw
1309 - korg/k1212.dsp
1310 - ess/maestro3_assp_kernel.fw
1311 - ess/maestro3_assp_minisrc.fw
1312 - yamaha/ds1_ctrl.fw
1313 - yamaha/ds1_dsp.fw
1314 - yamaha/ds1e_ctrl.fw
1315 - tr_smctr.bin
1316 - ttusb-budget/dspbootcode.bin
1317 - emi62/bitstream.fw
1318 - emi62/loader.fw
1319 - emi62/midi.fw
1320 - emi62/spdif.fw
1321 - ti_3410.fw
1322 - ti_5052.fw
1323 - mts_mt9234mu.fw
1324 - mts_mt9234zba.fw
1325 - whiteheat.fw
1326 - whiteheat_loader.fw
1327 - intelliport2.bin
1328 - cpia2/stv0672_vp4.bin
1329 - vicam/firmware.fw
1330 - edgeport/boot.fw
1331 - edgeport/boot2.fw
1332 - edgeport/down.fw
1333 - edgeport/down2.fw
1334 - edgeport/down3.bin
1335 - sb16/mulaw_main.csp
1336 - sb16/alaw_main.csp
1337 - sb16/ima_adpcm_init.csp
1338 - sb16/ima_adpcm_playback.csp
1339 - sb16/ima_adpcm_capture.csp
1340 - sun/cassini.bin
1341 - acenic/tg1.bin
1342 - acenic/tg2.bin
1343 - adaptec/starfire_rx.bin
1344 - adaptec/starfire_tx.bin
1345 - yam/1200.bin
1346 - yam/9600.bin
1347 - 3com/3C359.bin
1348 - ositech/Xilinx7OD.bin
1349 - qlogic/isp1000.bin
1350 - myricom/lanai.bin
1351 - yamaha/yss225_registers.bin
1352 - lgs8g75.fw
1353 - )
1354 -
1355 - default
1356 -
1357 - # remove sources and documentation (wildcards are expanded)
1358 - rm -r ${source_files[@]} || die
1359 - rm -rf .git
1360 -
1361 - if use !unknown-license; then
1362 - # remove files in unknown_license
1363 - rm "${unknown_license[@]}" || die
1364 - fi
1365 -
1366 - if use !redistributable; then
1367 - # remove files _not_ in the free_software or unknown_license lists
1368 - # everything else is confirmed (or assumed) to be redistributable
1369 - # based on upstream acceptance policy
1370 - local IFS=$'\n'
1371 - find ! -type d -printf "%P\n" \
1372 - | grep -Fvx -e "${free_software[*]}" -e "${unknown_license[*]}" \
1373 - | xargs -d '\n' rm || die
1374 - IFS=$' \t\n'
1375 - fi
1376 -
1377 - if use initramfs; then
1378 - if [[ -d "${S}/amd-ucode" ]]; then
1379 - local UCODETMP="${T}/ucode_tmp"
1380 - local UCODEDIR="${UCODETMP}/kernel/x86/microcode"
1381 - mkdir -p "${UCODEDIR}" || die
1382 - echo 1 > "${UCODETMP}/early_cpio"
1383 -
1384 - local amd_ucode_file="${UCODEDIR}/AuthenticAMD.bin"
1385 - cat "${S}"/amd-ucode/*.bin > "${amd_ucode_file}" || die "Failed to concat amd cpu ucode"
1386 -
1387 - if [[ ! -s "${amd_ucode_file}" ]]; then
1388 - die "Sanity check failed: '${amd_ucode_file}' is empty!"
1389 - fi
1390 -
1391 - pushd "${UCODETMP}" &>/dev/null || die
1392 - find . -print0 | cpio --quiet --null -o -H newc -R 0:0 > "${S}"/amd-uc.img
1393 - popd &>/dev/null || die
1394 - if [[ ! -s "${S}/amd-uc.img" ]]; then
1395 - die "Failed to create '${S}/amd-uc.img'!"
1396 - fi
1397 - else
1398 - # If this will ever happen something has changed which
1399 - # must be reviewed
1400 - die "'${S}/amd-ucode' not found!"
1401 - fi
1402 - fi
1403 -
1404 - echo "# Remove files that shall not be installed from this list." > ${PN}.conf
1405 - find * ! -type d ! \( -name ${PN}.conf -o -name amd-uc.img \) >> ${PN}.conf
1406 -
1407 - if use savedconfig; then
1408 - restore_config ${PN}.conf
1409 -
1410 - ebegin "Removing all files not listed in config"
1411 - find ! -type d ! \( -name ${PN}.conf -o -name amd-uc.img \) -printf "%P\n" \
1412 - | grep -Fvx -f <(grep -v '^#' ${PN}.conf \
1413 - || die "grep failed, empty config file?") \
1414 - | xargs -d '\n' --no-run-if-empty rm
1415 - eend $? || die
1416 - fi
1417 -
1418 - # remove empty directories, bug #396073
1419 - find -type d -empty -delete || die
1420 -}
1421 -
1422 -src_install() {
1423 - save_config ${PN}.conf
1424 - rm ${PN}.conf || die
1425 -
1426 - if use initramfs ; then
1427 - mkdir "${ED}/boot" || die
1428 - mv "${S}"/amd-uc.img "${ED}/boot" || die
1429 - fi
1430 -
1431 - if ! ( shopt -s failglob; : * ) 2>/dev/null; then
1432 - eerror "No files to install. Check your USE flag settings"
1433 - eerror "and the list of files in your saved configuration."
1434 - die "Refusing to install an empty package"
1435 - fi
1436 -
1437 - insinto /lib/firmware/
1438 - doins -r *
1439 -}
1440 -
1441 -pkg_preinst() {
1442 - if use savedconfig; then
1443 - ewarn "USE=savedconfig is active. You must handle file collisions manually."
1444 - fi
1445 -
1446 - # Make sure /boot is available if needed.
1447 - use initramfs && mount-boot_pkg_preinst
1448 -}
1449 -
1450 -pkg_postinst() {
1451 - elog "If you are only interested in particular firmware files, edit the saved"
1452 - elog "configfile and remove those that you do not want."
1453 -
1454 - local ver
1455 - for ver in ${REPLACING_VERSIONS}; do
1456 - if ver_test ${ver} -lt 20190514; then
1457 - elog
1458 - elog 'Starting with version 20190514, installation of many firmware'
1459 - elog 'files is controlled by USE flags. Please review your USE flag'
1460 - elog 'and package.license settings if you are missing some files.'
1461 - break
1462 - fi
1463 - done
1464 -
1465 - # Don't forget to umount /boot if it was previously mounted by us.
1466 - use initramfs && mount-boot_pkg_postinst
1467 -}
1468 -
1469 -pkg_prerm() {
1470 - # Make sure /boot is mounted so that we can remove /boot/amd-uc.img!
1471 - use initramfs && mount-boot_pkg_prerm
1472 -}
1473 -
1474 -pkg_postrm() {
1475 - # Don't forget to umount /boot if it was previously mounted by us.
1476 - use initramfs && mount-boot_pkg_postrm
1477 -}
1478
1479 diff --git a/sys-kernel/linux-firmware/linux-firmware-20200122.ebuild b/sys-kernel/linux-firmware/linux-firmware-20200122.ebuild
1480 deleted file mode 100644
1481 index 48f34fefc55..00000000000
1482 --- a/sys-kernel/linux-firmware/linux-firmware-20200122.ebuild
1483 +++ /dev/null
1484 @@ -1,354 +0,0 @@
1485 -# Copyright 1999-2020 Gentoo Authors
1486 -# Distributed under the terms of the GNU General Public License v2
1487 -
1488 -EAPI=7
1489 -inherit mount-boot savedconfig
1490 -
1491 -if [[ ${PV} == 99999999* ]]; then
1492 - inherit git-r3
1493 - EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/${PN}.git"
1494 -else
1495 - GIT_COMMIT="1eb2408c6feacccd10b02a49214745f15d1c6fb7"
1496 - SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
1497 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
1498 -fi
1499 -
1500 -DESCRIPTION="Linux firmware files"
1501 -HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git"
1502 -
1503 -LICENSE="GPL-2 GPL-2+ GPL-3 BSD MIT || ( MPL-1.1 GPL-2 )
1504 - redistributable? (
1505 - linux-fw-redistributable ( BSD-2 BSD BSD-4 ISC MIT no-source-code ) )
1506 - unknown-license? ( all-rights-reserved )"
1507 -SLOT="0"
1508 -IUSE="initramfs +redistributable savedconfig unknown-license"
1509 -RESTRICT="binchecks strip
1510 - unknown-license? ( bindist )"
1511 -
1512 -REQUIRED_USE="initramfs? ( redistributable )"
1513 -
1514 -BDEPEND="initramfs? ( app-arch/cpio )"
1515 -
1516 -#add anything else that collides to this
1517 -RDEPEND="!savedconfig? (
1518 - redistributable? (
1519 - !sys-firmware/alsa-firmware[alsa_cards_ca0132]
1520 - !media-tv/cx18-firmware
1521 - !<sys-firmware/ivtv-firmware-20080701-r1
1522 - !media-tv/linuxtv-dvb-firmware[dvb_cards_cx231xx]
1523 - !media-tv/linuxtv-dvb-firmware[dvb_cards_cx23885]
1524 - !media-tv/linuxtv-dvb-firmware[dvb_cards_usb-dib0700]
1525 - !net-dialup/ueagle-atm
1526 - !net-dialup/ueagle4-atm
1527 - !net-wireless/ar9271-firmware
1528 - !net-wireless/i2400m-fw
1529 - !net-wireless/libertas-firmware
1530 - !sys-firmware/rt61-firmware
1531 - !net-wireless/rt73-firmware
1532 - !net-wireless/rt2860-firmware
1533 - !net-wireless/rt2870-firmware
1534 - !sys-block/qla-fc-firmware
1535 - !sys-firmware/amd-ucode
1536 - !sys-firmware/iwl1000-ucode
1537 - !sys-firmware/iwl2000-ucode
1538 - !sys-firmware/iwl2030-ucode
1539 - !sys-firmware/iwl3945-ucode
1540 - !sys-firmware/iwl4965-ucode
1541 - !sys-firmware/iwl5000-ucode
1542 - !sys-firmware/iwl5150-ucode
1543 - !sys-firmware/iwl6000-ucode
1544 - !sys-firmware/iwl6005-ucode
1545 - !sys-firmware/iwl6030-ucode
1546 - !sys-firmware/iwl6050-ucode
1547 - !sys-firmware/iwl3160-ucode
1548 - !sys-firmware/iwl7260-ucode
1549 - !sys-firmware/iwl7265-ucode
1550 - !sys-firmware/iwl3160-7260-bt-ucode
1551 - !sys-firmware/radeon-ucode
1552 - )
1553 - unknown-license? (
1554 - !sys-firmware/alsa-firmware[alsa_cards_korg1212]
1555 - !sys-firmware/alsa-firmware[alsa_cards_maestro3]
1556 - !sys-firmware/alsa-firmware[alsa_cards_sb16]
1557 - !sys-firmware/alsa-firmware[alsa_cards_ymfpci]
1558 - )
1559 - )"
1560 -
1561 -pkg_pretend() {
1562 - use initramfs && mount-boot_pkg_pretend
1563 -}
1564 -
1565 -src_unpack() {
1566 - if [[ ${PV} == 99999999* ]]; then
1567 - git-r3_src_unpack
1568 - else
1569 - default
1570 - # rename directory from git snapshot tarball
1571 - mv ${PN}-*/ ${P} || die
1572 - fi
1573 -}
1574 -
1575 -src_prepare() {
1576 - # source and documentation files, not to be installed
1577 - local source_files=(
1578 - README
1579 - WHENCE
1580 - "LICEN[CS]E*"
1581 - "GPL*"
1582 - configure
1583 - Makefile
1584 - check_whence.py
1585 - atusb/ChangeLog
1586 - av7110/Boot.S
1587 - av7110/Makefile
1588 - carl9170fw/
1589 - cis/Makefile
1590 - cis/src/
1591 - dsp56k/bootstrap.asm
1592 - dsp56k/concat-bootstrap.pl
1593 - dsp56k/Makefile
1594 - "isci/*.[ch]"
1595 - isci/Makefile
1596 - isci/README
1597 - "keyspan_pda/*.S"
1598 - keyspan_pda/Makefile
1599 - usbdux/
1600 - )
1601 -
1602 - # whitelist of images with a free software license
1603 - local free_software=(
1604 - # keyspan_pda (GPL-2+)
1605 - keyspan_pda/keyspan_pda.fw
1606 - keyspan_pda/xircom_pgs.fw
1607 - # dsp56k (GPL-2+)
1608 - dsp56k/bootstrap.bin
1609 - # ath9k_htc (BSD GPL-2+ MIT)
1610 - ath9k_htc/htc_7010-1.4.0.fw
1611 - ath9k_htc/htc_9271-1.4.0.fw
1612 - # pcnet_cs, 3c589_cs, 3c574_cs, serial_cs (dual GPL-2/MPL-1.1)
1613 - cis/LA-PCM.cis
1614 - cis/PCMLM28.cis
1615 - cis/DP83903.cis
1616 - cis/NE2K.cis
1617 - cis/tamarack.cis
1618 - cis/PE-200.cis
1619 - cis/PE520.cis
1620 - cis/3CXEM556.cis
1621 - cis/3CCFEM556.cis
1622 - cis/MT5634ZLX.cis
1623 - cis/RS-COM-2P.cis
1624 - cis/COMpad2.cis
1625 - cis/COMpad4.cis
1626 - # serial_cs (GPL-3)
1627 - cis/SW_555_SER.cis
1628 - cis/SW_7xx_SER.cis
1629 - cis/SW_8xx_SER.cis
1630 - # dvb-ttpci (GPL-2+)
1631 - av7110/bootcode.bin
1632 - # usbdux, usbduxfast, usbduxsigma (GPL-2+)
1633 - usbdux_firmware.bin
1634 - usbduxfast_firmware.bin
1635 - usbduxsigma_firmware.bin
1636 - # brcmfmac (GPL-2+)
1637 - brcm/brcmfmac4330-sdio.Prowise-PT301.txt
1638 - brcm/brcmfmac43340-sdio.meegopad-t08.txt
1639 - brcm/brcmfmac43362-sdio.cubietech,cubietruck.txt
1640 - brcm/brcmfmac43362-sdio.lemaker,bananapro.txt
1641 - brcm/brcmfmac43430a0-sdio.jumper-ezpad-mini3.txt
1642 - "brcm/brcmfmac43430a0-sdio.ONDA-V80 PLUS.txt"
1643 - brcm/brcmfmac43430-sdio.AP6212.txt
1644 - brcm/brcmfmac43430-sdio.Hampoo-D2D3_Vi8A1.txt
1645 - brcm/brcmfmac43430-sdio.MUR1DX.txt
1646 - brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt
1647 - brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
1648 - brcm/brcmfmac4356-pcie.gpd-win-pocket.txt
1649 - # isci (GPL-2)
1650 - isci/isci_firmware.bin
1651 - # carl9170 (GPL-2+)
1652 - carl9170-1.fw
1653 - # atusb (GPL-2+)
1654 - atusb/atusb-0.2.dfu
1655 - atusb/atusb-0.3.dfu
1656 - atusb/rzusb-0.3.bin
1657 - # mlxsw_spectrum (dual BSD/GPL-2)
1658 - mellanox/mlxsw_spectrum-13.1420.122.mfa2
1659 - mellanox/mlxsw_spectrum-13.1530.152.mfa2
1660 - mellanox/mlxsw_spectrum-13.1620.192.mfa2
1661 - mellanox/mlxsw_spectrum-13.1702.6.mfa2
1662 - mellanox/mlxsw_spectrum-13.1703.4.mfa2
1663 - mellanox/mlxsw_spectrum-13.1910.622.mfa2
1664 - mellanox/mlxsw_spectrum-13.2000.1122.mfa2
1665 - )
1666 -
1667 - # blacklist of images with unknown license
1668 - local unknown_license=(
1669 - atmsar11.fw
1670 - korg/k1212.dsp
1671 - ess/maestro3_assp_kernel.fw
1672 - ess/maestro3_assp_minisrc.fw
1673 - yamaha/ds1_ctrl.fw
1674 - yamaha/ds1_dsp.fw
1675 - yamaha/ds1e_ctrl.fw
1676 - tr_smctr.bin
1677 - ttusb-budget/dspbootcode.bin
1678 - emi62/bitstream.fw
1679 - emi62/loader.fw
1680 - emi62/midi.fw
1681 - emi62/spdif.fw
1682 - ti_3410.fw
1683 - ti_5052.fw
1684 - mts_mt9234mu.fw
1685 - mts_mt9234zba.fw
1686 - whiteheat.fw
1687 - whiteheat_loader.fw
1688 - intelliport2.bin
1689 - cpia2/stv0672_vp4.bin
1690 - vicam/firmware.fw
1691 - edgeport/boot.fw
1692 - edgeport/boot2.fw
1693 - edgeport/down.fw
1694 - edgeport/down2.fw
1695 - edgeport/down3.bin
1696 - sb16/mulaw_main.csp
1697 - sb16/alaw_main.csp
1698 - sb16/ima_adpcm_init.csp
1699 - sb16/ima_adpcm_playback.csp
1700 - sb16/ima_adpcm_capture.csp
1701 - sun/cassini.bin
1702 - acenic/tg1.bin
1703 - acenic/tg2.bin
1704 - adaptec/starfire_rx.bin
1705 - adaptec/starfire_tx.bin
1706 - yam/1200.bin
1707 - yam/9600.bin
1708 - 3com/3C359.bin
1709 - ositech/Xilinx7OD.bin
1710 - qlogic/isp1000.bin
1711 - myricom/lanai.bin
1712 - yamaha/yss225_registers.bin
1713 - lgs8g75.fw
1714 - )
1715 -
1716 - default
1717 -
1718 - # remove sources and documentation (wildcards are expanded)
1719 - rm -r ${source_files[@]} || die
1720 - rm -rf .git
1721 -
1722 - if use !unknown-license; then
1723 - # remove files in unknown_license
1724 - rm "${unknown_license[@]}" || die
1725 - fi
1726 -
1727 - if use !redistributable; then
1728 - # remove files _not_ in the free_software or unknown_license lists
1729 - # everything else is confirmed (or assumed) to be redistributable
1730 - # based on upstream acceptance policy
1731 - local IFS=$'\n'
1732 - find ! -type d -printf "%P\n" \
1733 - | grep -Fvx -e "${free_software[*]}" -e "${unknown_license[*]}" \
1734 - | xargs -d '\n' rm || die
1735 - IFS=$' \t\n'
1736 - fi
1737 -
1738 - if use initramfs; then
1739 - if [[ -d "${S}/amd-ucode" ]]; then
1740 - local UCODETMP="${T}/ucode_tmp"
1741 - local UCODEDIR="${UCODETMP}/kernel/x86/microcode"
1742 - mkdir -p "${UCODEDIR}" || die
1743 - echo 1 > "${UCODETMP}/early_cpio"
1744 -
1745 - local amd_ucode_file="${UCODEDIR}/AuthenticAMD.bin"
1746 - cat "${S}"/amd-ucode/*.bin > "${amd_ucode_file}" || die "Failed to concat amd cpu ucode"
1747 -
1748 - if [[ ! -s "${amd_ucode_file}" ]]; then
1749 - die "Sanity check failed: '${amd_ucode_file}' is empty!"
1750 - fi
1751 -
1752 - pushd "${UCODETMP}" &>/dev/null || die
1753 - find . -print0 | cpio --quiet --null -o -H newc -R 0:0 > "${S}"/amd-uc.img
1754 - popd &>/dev/null || die
1755 - if [[ ! -s "${S}/amd-uc.img" ]]; then
1756 - die "Failed to create '${S}/amd-uc.img'!"
1757 - fi
1758 - else
1759 - # If this will ever happen something has changed which
1760 - # must be reviewed
1761 - die "'${S}/amd-ucode' not found!"
1762 - fi
1763 - fi
1764 -
1765 - echo "# Remove files that shall not be installed from this list." > ${PN}.conf
1766 - find * ! -type d ! \( -name ${PN}.conf -o -name amd-uc.img \) >> ${PN}.conf
1767 -
1768 - if use savedconfig; then
1769 - restore_config ${PN}.conf
1770 -
1771 - ebegin "Removing all files not listed in config"
1772 - find ! -type d ! \( -name ${PN}.conf -o -name amd-uc.img \) -printf "%P\n" \
1773 - | grep -Fvx -f <(grep -v '^#' ${PN}.conf \
1774 - || die "grep failed, empty config file?") \
1775 - | xargs -d '\n' --no-run-if-empty rm
1776 - eend $? || die
1777 - fi
1778 -
1779 - # remove empty directories, bug #396073
1780 - find -type d -empty -delete || die
1781 -}
1782 -
1783 -src_install() {
1784 - save_config ${PN}.conf
1785 - rm ${PN}.conf || die
1786 -
1787 - if use initramfs ; then
1788 - mkdir "${ED}/boot" || die
1789 - mv "${S}"/amd-uc.img "${ED}/boot" || die
1790 - fi
1791 -
1792 - if ! ( shopt -s failglob; : * ) 2>/dev/null; then
1793 - eerror "No files to install. Check your USE flag settings"
1794 - eerror "and the list of files in your saved configuration."
1795 - die "Refusing to install an empty package"
1796 - fi
1797 -
1798 - insinto /lib/firmware/
1799 - doins -r *
1800 -}
1801 -
1802 -pkg_preinst() {
1803 - if use savedconfig; then
1804 - ewarn "USE=savedconfig is active. You must handle file collisions manually."
1805 - fi
1806 -
1807 - # Make sure /boot is available if needed.
1808 - use initramfs && mount-boot_pkg_preinst
1809 -}
1810 -
1811 -pkg_postinst() {
1812 - elog "If you are only interested in particular firmware files, edit the saved"
1813 - elog "configfile and remove those that you do not want."
1814 -
1815 - local ver
1816 - for ver in ${REPLACING_VERSIONS}; do
1817 - if ver_test ${ver} -lt 20190514; then
1818 - elog
1819 - elog 'Starting with version 20190514, installation of many firmware'
1820 - elog 'files is controlled by USE flags. Please review your USE flag'
1821 - elog 'and package.license settings if you are missing some files.'
1822 - break
1823 - fi
1824 - done
1825 -
1826 - # Don't forget to umount /boot if it was previously mounted by us.
1827 - use initramfs && mount-boot_pkg_postinst
1828 -}
1829 -
1830 -pkg_prerm() {
1831 - # Make sure /boot is mounted so that we can remove /boot/amd-uc.img!
1832 - use initramfs && mount-boot_pkg_prerm
1833 -}
1834 -
1835 -pkg_postrm() {
1836 - # Don't forget to umount /boot if it was previously mounted by us.
1837 - use initramfs && mount-boot_pkg_postrm
1838 -}