diff --git a/srcpkgs/linux-firmware/patches/no-whence.patch b/srcpkgs/linux-firmware/patches/no-whence.patch new file mode 100644 index 00000000000..69e65c4ce27 --- /dev/null +++ b/srcpkgs/linux-firmware/patches/no-whence.patch @@ -0,0 +1,12 @@ +this requires git ls-files to work +-- +--- a/copy-firmware.sh ++++ b/copy-firmware.sh +@@ -66,7 +66,5 @@ + fi + +-$verbose "Checking that WHENCE file is formatted properly" +-./check_whence.py || err "check_whence.py has detected errors." + + # shellcheck disable=SC2162 # file/folder name can include escaped symbols + grep -E '^(RawFile|File):' WHENCE | sed -E -e 's/^(RawFile|File): */\1 /;s/"//g' | while read k f; do diff --git a/srcpkgs/linux-firmware/template b/srcpkgs/linux-firmware/template index c9ab949906c..7c2226c9697 100644 --- a/srcpkgs/linux-firmware/template +++ b/srcpkgs/linux-firmware/template @@ -1,6 +1,6 @@ # Template file for 'linux-firmware' pkgname=linux-firmware -version=20240909 +version=20241017 revision=1 hostmakedepends="rdfind which" depends="linux-firmware-amd>=${version}_${revision} linux-firmware-network>=${version}_${revision}" @@ -10,19 +10,17 @@ license="custom:see /usr/share/licenses/linux-firmware" homepage="https://www.kernel.org/" changelog="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/log/" distfiles="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${version}.tar.gz" -checksum=93e9b6ae2240661639c874f5fc38f677d18afe365b17a13fee6b4fc4fba42c10 +checksum=551708bc71cb7ac67c800055aecb55e50eb3c86d13486c56250d1ef5132b39dc python_version=3 nostrip=yes do_install() { - make install FIRMWAREDIR=/usr/lib/firmware DESTDIR=$DESTDIR + make install dedup FIRMWAREDIR=/usr/lib/firmware DESTDIR=$DESTDIR for _l in LICEN* WHENCE do vlicense "$_l" done - - # XXX: should some firmwares, like carl9170, be pruned? } linux-firmware-amd_package() { @@ -54,7 +52,7 @@ linux-firmware-broadcom_package() { } linux-firmware-intel_package() { - short_desc+=" - Intel CPU/GPU microcode" + short_desc+=" - Intel GPU microcode" nostrip=yes pkg_install() { vmove usr/lib/firmware/i915 @@ -81,25 +79,89 @@ linux-firmware-network_package() { esac nostrip=yes pkg_install() { - vmove usr/lib/firmware/3com - vmove "usr/lib/firmware/rt*" - vmove "usr/lib/firmware/ath*" - vmove "usr/lib/firmware/ar*" - vmove "usr/lib/firmware/bnx2*" - vmove "usr/lib/firmware/cxgb*" - vmove "usr/lib/firmware/htc*" - vmove "usr/lib/firmware/iwl*" - vmove "usr/lib/firmware/intel*" - vmove usr/lib/firmware/kaweth - vmove usr/lib/firmware/libertas - vmove usr/lib/firmware/mrvl - vmove "usr/lib/firmware/mt7*.bin" + _pats=( + # Airoha Ethernet PHY + airoha + # Amlogic bluetooth + "amlogic/aml_w*_bt_uart.bin*" + # Atheros WLAN/bluetooth + "ath*" "ar*" "carl9170*" "htc*" + # Atmel WLAN + atmel + # ATUSB transceiver + atusb + # BNX2 Ethernet + "bnx2*" + # Sun Cassini Ethernet + "sun/cassini*" + # Chelsio Ethernet + "cxgb*" + # ST-E WLAN + "wsm_22.bin*" + # Intel WLAN/Ethernet/bluetooth + e100 "hfi1_*.fw*" "intel*" "iwlwifi*" + # Orinoco WLAN + "agere*" + # IXP4xx + ixp4xx + # KL5KUSB101 Ethernet + kaweth + # Cavium LiquidIO NIC + liquidio + # Mediatek WLAN/bluetooth + "mt7*.bin" + # Mellanox ethernet + mellanox + # Marvell WLAN/bluetooth + mrvl "lbtf_usb.bin*" libertas mwl8k + # Multi-Tech modem + "mts_*.fw*" + # Myricom ethernet + "myri10ge*" myricom + # NXP UWB/bluetooth + "nxp/sr150_fw.bin*" "nxp/helper_uart*.bin*" "nxp/uartiw*.bin*" "nxp/uartspi*.se*" "nxp/uartuart*" + # Qualcomm WLAN/bluetooth + qca "wil6210*" + # QLogic HBA + "cbfw*.bin*" "ct2fw*.bin*" "ctfw*.bin*" "qed" "ql2*.bin*" "qlogic" "phanfw.bin*" + # Ralink WLAN + "rt*.bin*" + # Redpine WLAN/bluetooth + "rsi*" + # Realtek bluetooth/ethernet/WLAN + "rtl*" "rtw*" + # Sagrad WLAN + "sdd_sagrad_*.bin*" + # Slicoss NICs + slicoss + # Adaptec ethernet + "adaptec/starfire*" + # Tehuti NICs + tehuti + # TI WLAN/bluetooth + ti-connectivity + # Tigon ethernet + acenic tigon + # 3Com ethernet + 3com + # Eagle USB modem + ueagle-atm + # Via USB WLAN + "vntwusb.fw*" + # Microchip Ethernet + "microchip/mscc_vsc85*.bin*" + # Exar Ethernet + vxge + # SiLabs WLAN + wfx + ) + + for pat in "${_pats[@]}"; do + vmove "usr/lib/firmware/$pat" + done + # don't move mediatek SoC firmware ( shopt -s extglob; vmove "usr/lib/firmware/mediatek/!(mt7981*|mt7986*|mt81*|sof*)" ) - vmove usr/lib/firmware/ueagle-atm - vmove usr/lib/firmware/ti-connectivity - vmove usr/lib/firmware/dpaa2 - vmove usr/lib/firmware/qca } }