175 lines
4.3 KiB
Bash
175 lines
4.3 KiB
Bash
# Template file for 'linux-firmware'
|
|
pkgname=linux-firmware
|
|
version=20241110
|
|
revision=1
|
|
hostmakedepends="rdfind which"
|
|
depends="linux-firmware-amd>=${version}_${revision} linux-firmware-network>=${version}_${revision}"
|
|
short_desc="Binary firmware blobs for the Linux kernel"
|
|
maintainer="classabbyamp <void@placeviolette.net>"
|
|
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=c8a561dfdbd54157692fe166b84a173f9bc01f89c78f6196863beea2450e4938
|
|
python_version=3
|
|
nostrip=yes
|
|
|
|
do_install() {
|
|
make install dedup FIRMWAREDIR=/usr/lib/firmware DESTDIR=$DESTDIR
|
|
|
|
for _l in LICEN* WHENCE
|
|
do
|
|
vlicense "$_l"
|
|
done
|
|
}
|
|
|
|
linux-firmware-amd_package() {
|
|
short_desc+=" - AMD CPU/GPU microcode"
|
|
nostrip=yes
|
|
pkg_install() {
|
|
vmove usr/lib/firmware/amd*
|
|
vmove usr/lib/firmware/radeon
|
|
vmove usr/share/licenses/linux-firmware/LICENSE.amdgpu
|
|
vmove usr/share/licenses/linux-firmware/LICENSE.amd-ucode
|
|
vmove usr/share/licenses/linux-firmware/LICENSE.radeon
|
|
vmkdir usr/lib/dracut/dracut.conf.d
|
|
echo "early_microcode=yes" >> ${PKGDESTDIR}/usr/lib/dracut/dracut.conf.d/amd_ucode.conf
|
|
}
|
|
}
|
|
|
|
linux-firmware-broadcom_package() {
|
|
short_desc+=" - Broadcom network blobs"
|
|
nostrip=yes
|
|
pkg_install() {
|
|
vmove usr/lib/firmware/brcm
|
|
vmove usr/share/licenses/linux-firmware/LICENCE.broadcom_bcm43xx
|
|
# firmware/brcm contains multiple symlinks to ../cypress/
|
|
vmove usr/lib/firmware/cypress
|
|
vmove usr/share/licenses/linux-firmware/LICENCE.cypress
|
|
# provided by rpi-firmware
|
|
find "${PKGDESTDIR}"/usr/lib/firmware/brcm -iname '*raspberry*.txt' -delete
|
|
}
|
|
}
|
|
|
|
linux-firmware-intel_package() {
|
|
short_desc+=" - Intel GPU microcode"
|
|
nostrip=yes
|
|
pkg_install() {
|
|
vmove usr/lib/firmware/i915
|
|
vmove usr/share/licenses/linux-firmware/LICENSE.i915
|
|
}
|
|
}
|
|
|
|
linux-firmware-nvidia_package() {
|
|
short_desc+=" NVIDIA GPU microcode"
|
|
nostrip=yes
|
|
pkg_install() {
|
|
vmove usr/lib/firmware/nvidia
|
|
vmove usr/share/licenses/linux-firmware/LICENCE.nvidia*
|
|
}
|
|
}
|
|
|
|
linux-firmware-network_package() {
|
|
short_desc+=" - network"
|
|
depends="linux-firmware-broadcom>=${version}_${revision}"
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
armv7*|aarch64*)
|
|
depends+=" linux-firmware-qualcomm>=${version}_${revision}"
|
|
;;
|
|
esac
|
|
nostrip=yes
|
|
pkg_install() {
|
|
_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*)" )
|
|
}
|
|
}
|
|
|
|
linux-firmware-qualcomm_package() {
|
|
short_desc+=" - Qualcomm SoC blobs"
|
|
nostrip=yes
|
|
pkg_install() {
|
|
vmove usr/lib/firmware/qcom
|
|
}
|
|
}
|