1 |
commit: 8419f86fe43e96f58463ec53071ae3f2c84c805c |
2 |
Author: Rick Farina <zerochaos <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jun 29 18:26:45 2021 +0000 |
4 |
Commit: Rick Farina <zerochaos <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 29 18:26:55 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8419f86f |
7 |
|
8 |
sys-kernel/linux-firmware: bump |
9 |
|
10 |
needed fixes for intel wifi, and other updates |
11 |
|
12 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
13 |
Signed-off-by: Rick Farina <zerochaos <AT> gentoo.org> |
14 |
|
15 |
sys-kernel/linux-firmware/Manifest | 1 + |
16 |
.../linux-firmware/linux-firmware-20210629.ebuild | 354 +++++++++++++++++++++ |
17 |
2 files changed, 355 insertions(+) |
18 |
|
19 |
diff --git a/sys-kernel/linux-firmware/Manifest b/sys-kernel/linux-firmware/Manifest |
20 |
index 3bb8a4e8c31..52cf8905c5d 100644 |
21 |
--- a/sys-kernel/linux-firmware/Manifest |
22 |
+++ b/sys-kernel/linux-firmware/Manifest |
23 |
@@ -2,3 +2,4 @@ DIST linux-firmware-20201218.tar.xz 137880408 BLAKE2B 32839d61d743ade53aad7df0c8 |
24 |
DIST linux-firmware-20210208.tar.xz 146701492 BLAKE2B 49d39e9a6cf1ee1afc41c6317e680ab90937f0be437a940113b99504215fff7320a7442e3243d5831277dc6fbc043734461f32721b2f0a5dc12960162be6b2a4 SHA512 122673a9f4662a807667127fc88f85115063836b98283951cc46887cae43e1d6bc912b5b95bf50e1e896ff4b9197577e53705ccb259b614d29c3bae37a637b6d |
25 |
DIST linux-firmware-20210315.tar.xz 151454796 BLAKE2B aef09bf2043117c821c5e1460d02d50131e46c2c4257dd3816813089881791b876670990d774dc3e43060785f7303ef509cdec45b64f300ee1acba769bfdc5d1 SHA512 499f0cd746f700ac95f8ca9947d1fb402f3bc53dd5302101ce94f0510ee013b5fa3b8cb6316ace93e3bb2df0a25fb53eb8099acc45c9bec051aa92986e9d188f |
26 |
DIST linux-firmware-20210518.tar.gz 328396097 BLAKE2B 7e7b2a41a8906e9bf6147a6ca4dc9cd57db66e98cf10fe4edf8ab56905bf6ad5eca88c479cad5e585b55cad765f051e6b96c0f827c2fa85ba78706b48ba9e047 SHA512 64c81d97aafa43fd438a29258ffcd812497bbd1b22c40b1e352ffea5a40c3c61b5f5a9788d76508c7010209a82ae3938ac6e28ff7f4dffc1582f6e5f8b8c00da |
27 |
+DIST linux-firmware-20210629.tar.gz 333073746 BLAKE2B 89a0448dc471ff0c3edfa37b2a34bbe9f52d7c7e1fe416bea1121bd0248614e28672ef26b78dc7570cd6b949b9b8628492e9ee023eefd4fa49c7206146cc8e8a SHA512 1bc206ea691e3a17994150e3827251d539f1e77f44afc452f45129455f1c9d0c3563add95ffa5306c5c49b6dcff031c293e755e08a0329a2b094de786d8330b8 |
28 |
|
29 |
diff --git a/sys-kernel/linux-firmware/linux-firmware-20210629.ebuild b/sys-kernel/linux-firmware/linux-firmware-20210629.ebuild |
30 |
new file mode 100644 |
31 |
index 00000000000..2c752eda8e1 |
32 |
--- /dev/null |
33 |
+++ b/sys-kernel/linux-firmware/linux-firmware-20210629.ebuild |
34 |
@@ -0,0 +1,354 @@ |
35 |
+# Copyright 1999-2021 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=7 |
39 |
+inherit mount-boot savedconfig |
40 |
+ |
41 |
+# In case this is a real snapshot, fill in commit below. |
42 |
+# For normal, tagged releases, leave blank |
43 |
+MY_COMMIT="d79c26779d459063b8052b7fe0a48bce4e08d0d9" |
44 |
+ |
45 |
+if [[ ${PV} == 99999999* ]]; then |
46 |
+ inherit git-r3 |
47 |
+ EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/${PN}.git" |
48 |
+else |
49 |
+ if [[ -n "${MY_COMMIT}" ]]; then |
50 |
+ SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/${MY_COMMIT}.tar.gz -> ${P}.tar.gz" |
51 |
+ S="${WORKDIR}/${MY_COMMIT}" |
52 |
+ else |
53 |
+ SRC_URI="https://mirrors.edge.kernel.org/pub/linux/kernel/firmware/${P}.tar.xz" |
54 |
+ fi |
55 |
+ |
56 |
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86" |
57 |
+fi |
58 |
+ |
59 |
+DESCRIPTION="Linux firmware files" |
60 |
+HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git" |
61 |
+ |
62 |
+LICENSE="GPL-2 GPL-2+ GPL-3 BSD MIT || ( MPL-1.1 GPL-2 ) |
63 |
+ redistributable? ( |
64 |
+ linux-fw-redistributable ( BSD-2 BSD BSD-4 ISC MIT no-source-code ) ) |
65 |
+ unknown-license? ( all-rights-reserved )" |
66 |
+SLOT="0" |
67 |
+IUSE="initramfs +redistributable savedconfig unknown-license" |
68 |
+REQUIRED_USE="initramfs? ( redistributable )" |
69 |
+ |
70 |
+RESTRICT="binchecks strip test |
71 |
+ unknown-license? ( bindist )" |
72 |
+ |
73 |
+BDEPEND="initramfs? ( app-arch/cpio )" |
74 |
+ |
75 |
+#add anything else that collides to this |
76 |
+RDEPEND="!savedconfig? ( |
77 |
+ redistributable? ( |
78 |
+ !sys-firmware/alsa-firmware[alsa_cards_ca0132] |
79 |
+ !sys-block/qla-fc-firmware |
80 |
+ !sys-firmware/iwl1000-ucode |
81 |
+ !sys-firmware/iwl6005-ucode |
82 |
+ !sys-firmware/iwl6030-ucode |
83 |
+ !sys-firmware/iwl6050-ucode |
84 |
+ !sys-firmware/iwl3160-ucode |
85 |
+ !sys-firmware/iwl7260-ucode |
86 |
+ !sys-firmware/iwl3160-7260-bt-ucode |
87 |
+ !sys-firmware/raspberrypi-wifi-ucode |
88 |
+ ) |
89 |
+ unknown-license? ( |
90 |
+ !sys-firmware/alsa-firmware[alsa_cards_korg1212] |
91 |
+ !sys-firmware/alsa-firmware[alsa_cards_maestro3] |
92 |
+ !sys-firmware/alsa-firmware[alsa_cards_sb16] |
93 |
+ !sys-firmware/alsa-firmware[alsa_cards_ymfpci] |
94 |
+ ) |
95 |
+ )" |
96 |
+ |
97 |
+QA_PREBUILT="*" |
98 |
+ |
99 |
+pkg_pretend() { |
100 |
+ use initramfs && mount-boot_pkg_pretend |
101 |
+} |
102 |
+ |
103 |
+src_unpack() { |
104 |
+ if [[ ${PV} == 99999999* ]]; then |
105 |
+ git-r3_src_unpack |
106 |
+ else |
107 |
+ default |
108 |
+ # rename directory from git snapshot tarball |
109 |
+ if [[ ${#GIT_COMMIT} -gt 8 ]]; then |
110 |
+ mv ${PN}-*/ ${P} || die |
111 |
+ fi |
112 |
+ fi |
113 |
+} |
114 |
+ |
115 |
+src_prepare() { |
116 |
+ default |
117 |
+ |
118 |
+ find . -type f -not -perm 0644 -print0 \ |
119 |
+ | xargs --null --no-run-if-empty chmod 0644 \ |
120 |
+ || die |
121 |
+ |
122 |
+ chmod +x copy-firmware.sh || die |
123 |
+ |
124 |
+ if use initramfs; then |
125 |
+ if [[ -d "${S}/amd-ucode" ]]; then |
126 |
+ local UCODETMP="${T}/ucode_tmp" |
127 |
+ local UCODEDIR="${UCODETMP}/kernel/x86/microcode" |
128 |
+ mkdir -p "${UCODEDIR}" || die |
129 |
+ echo 1 > "${UCODETMP}/early_cpio" |
130 |
+ |
131 |
+ local amd_ucode_file="${UCODEDIR}/AuthenticAMD.bin" |
132 |
+ cat "${S}"/amd-ucode/*.bin > "${amd_ucode_file}" || die "Failed to concat amd cpu ucode" |
133 |
+ |
134 |
+ if [[ ! -s "${amd_ucode_file}" ]]; then |
135 |
+ die "Sanity check failed: '${amd_ucode_file}' is empty!" |
136 |
+ fi |
137 |
+ |
138 |
+ pushd "${UCODETMP}" &>/dev/null || die |
139 |
+ find . -print0 | cpio --quiet --null -o -H newc -R 0:0 > "${S}"/amd-uc.img |
140 |
+ popd &>/dev/null || die |
141 |
+ if [[ ! -s "${S}/amd-uc.img" ]]; then |
142 |
+ die "Failed to create '${S}/amd-uc.img'!" |
143 |
+ fi |
144 |
+ else |
145 |
+ # If this will ever happen something has changed which |
146 |
+ # must be reviewed |
147 |
+ die "'${S}/amd-ucode' not found!" |
148 |
+ fi |
149 |
+ fi |
150 |
+ |
151 |
+ # whitelist of misc files |
152 |
+ local misc_files=( |
153 |
+ copy-firmware.sh |
154 |
+ WHENCE |
155 |
+ README |
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 |
+ if use !unknown-license; then |
273 |
+ einfo "Removing files with unknown license ..." |
274 |
+ rm -v "${unknown_license[@]}" || die |
275 |
+ fi |
276 |
+ |
277 |
+ if use !redistributable; then |
278 |
+ # remove files _not_ in the free_software or unknown_license lists |
279 |
+ # everything else is confirmed (or assumed) to be redistributable |
280 |
+ # based on upstream acceptance policy |
281 |
+ einfo "Removing non-redistributable files ..." |
282 |
+ local OLDIFS="${IFS}" |
283 |
+ local IFS=$'\n' |
284 |
+ set -o pipefail |
285 |
+ find ! -type d -printf "%P\n" \ |
286 |
+ | grep -Fvx -e "${misc_files[*]}" -e "${free_software[*]}" -e "${unknown_license[*]}" \ |
287 |
+ | xargs -d '\n' --no-run-if-empty rm -v |
288 |
+ |
289 |
+ [[ ${?} -ne 0 ]] && die "Failed to remove non-redistributable files" |
290 |
+ |
291 |
+ IFS="${OLDIFS}" |
292 |
+ fi |
293 |
+ |
294 |
+ restore_config ${PN}.conf |
295 |
+} |
296 |
+ |
297 |
+src_install() { |
298 |
+ ./copy-firmware.sh -v "${ED}/lib/firmware" || die |
299 |
+ |
300 |
+ pushd "${ED}/lib/firmware" &>/dev/null || die |
301 |
+ |
302 |
+ # especially use !redistributable will cause some broken symlinks |
303 |
+ einfo "Removing broken symlinks ..." |
304 |
+ find * -xtype l -print -delete || die |
305 |
+ |
306 |
+ if use savedconfig; then |
307 |
+ if [[ -s "${S}/${PN}.conf" ]]; then |
308 |
+ local files_to_keep="${T}/files_to_keep.lst" |
309 |
+ grep -v '^#' "${S}/${PN}.conf" 2>/dev/null > "${files_to_keep}" || die |
310 |
+ [[ -s "${files_to_keep}" ]] || die "grep failed, empty config file?" |
311 |
+ |
312 |
+ einfo "Applying USE=savedconfig; Removing all files not listed in config ..." |
313 |
+ find ! -type d -printf "%P\n" \ |
314 |
+ | grep -Fvx -f "${files_to_keep}" \ |
315 |
+ | xargs -d '\n' --no-run-if-empty rm -v |
316 |
+ |
317 |
+ if [[ ${PIPESTATUS[0]} -ne 0 ]]; then |
318 |
+ die "Find failed to print installed files" |
319 |
+ elif [[ ${PIPESTATUS[1]} -eq 2 ]]; then |
320 |
+ # grep returns exit status 1 if no lines were selected |
321 |
+ # which is the case when we want to keep all files |
322 |
+ die "Grep failed to select files to keep" |
323 |
+ elif [[ ${PIPESTATUS[2]} -ne 0 ]]; then |
324 |
+ die "Failed to remove files not listed in config" |
325 |
+ fi |
326 |
+ fi |
327 |
+ fi |
328 |
+ |
329 |
+ # remove empty directories, bug #396073 |
330 |
+ find -type d -empty -delete || die |
331 |
+ |
332 |
+ # sanity check |
333 |
+ if ! ( shopt -s failglob; : * ) 2>/dev/null; then |
334 |
+ eerror "No files to install. Check your USE flag settings" |
335 |
+ eerror "and the list of files in your saved configuration." |
336 |
+ die "Refusing to install an empty package" |
337 |
+ fi |
338 |
+ |
339 |
+ # create config file |
340 |
+ echo "# Remove files that shall not be installed from this list." > "${S}"/${PN}.conf || die |
341 |
+ find * ! -type d >> "${S}"/${PN}.conf || die |
342 |
+ save_config "${S}"/${PN}.conf |
343 |
+ |
344 |
+ popd &>/dev/null || die |
345 |
+ |
346 |
+ if use initramfs ; then |
347 |
+ insinto /boot |
348 |
+ doins "${S}"/amd-uc.img |
349 |
+ fi |
350 |
+} |
351 |
+ |
352 |
+pkg_preinst() { |
353 |
+ if use savedconfig; then |
354 |
+ ewarn "USE=savedconfig is active. You must handle file collisions manually." |
355 |
+ fi |
356 |
+ |
357 |
+ # Make sure /boot is available if needed. |
358 |
+ use initramfs && mount-boot_pkg_preinst |
359 |
+} |
360 |
+ |
361 |
+pkg_postinst() { |
362 |
+ elog "If you are only interested in particular firmware files, edit the saved" |
363 |
+ elog "configfile and remove those that you do not want." |
364 |
+ |
365 |
+ local ver |
366 |
+ for ver in ${REPLACING_VERSIONS}; do |
367 |
+ if ver_test ${ver} -lt 20190514; then |
368 |
+ elog |
369 |
+ elog 'Starting with version 20190514, installation of many firmware' |
370 |
+ elog 'files is controlled by USE flags. Please review your USE flag' |
371 |
+ elog 'and package.license settings if you are missing some files.' |
372 |
+ break |
373 |
+ fi |
374 |
+ done |
375 |
+ |
376 |
+ # Don't forget to umount /boot if it was previously mounted by us. |
377 |
+ use initramfs && mount-boot_pkg_postinst |
378 |
+} |
379 |
+ |
380 |
+pkg_prerm() { |
381 |
+ # Make sure /boot is mounted so that we can remove /boot/amd-uc.img! |
382 |
+ use initramfs && mount-boot_pkg_prerm |
383 |
+} |
384 |
+ |
385 |
+pkg_postrm() { |
386 |
+ # Don't forget to umount /boot if it was previously mounted by us. |
387 |
+ use initramfs && mount-boot_pkg_postrm |
388 |
+} |