113 lines
3.1 KiB
Bash
113 lines
3.1 KiB
Bash
# Template file for 'linux-firmware'
|
|
pkgname=linux-firmware
|
|
version=20230404
|
|
revision=1
|
|
depends="linux-firmware-amd>=${version}_${revision} linux-firmware-network>=${version}_${revision}"
|
|
short_desc="Binary firmware blobs for the Linux kernel"
|
|
maintainer="Érico Nogueira <ericonr@disroot.org>"
|
|
license="custom:see /usr/share/licenses/linux-firmware"
|
|
homepage="https://www.kernel.org/"
|
|
distfiles="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${version}.tar.gz"
|
|
checksum=09343acd48cb1e33dd6e1f4c2736ceadaa943c42eb20d04a26a5701d05ddde0d
|
|
python_version=3
|
|
nostrip=yes
|
|
|
|
subpackages="linux-firmware-amd linux-firmware-broadcom
|
|
linux-firmware-intel linux-firmware-nvidia linux-firmware-network
|
|
linux-firmware-qualcomm"
|
|
|
|
do_install() {
|
|
make install 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() {
|
|
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
|
|
}
|
|
}
|
|
|
|
linux-firmware-broadcom_package() {
|
|
short_desc+=" - Broadcom network blobs"
|
|
nostrip=yes
|
|
replaces="rpi-firmware-network>=0"
|
|
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
|
|
}
|
|
}
|
|
|
|
linux-firmware-intel_package() {
|
|
short_desc+=" - Intel CPU/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() {
|
|
vmove usr/lib/firmware/3com
|
|
vmove usr/lib/firmware/RTL8192E
|
|
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"
|
|
# don't move mediatek SoC firmware
|
|
( shopt -s extglob; vmove "usr/lib/firmware/mediatek/!(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
|
|
}
|
|
}
|
|
|
|
linux-firmware-qualcomm_package() {
|
|
short_desc+=" - Qualcomm SoC blobs"
|
|
nostrip=yes
|
|
pkg_install() {
|
|
vmove usr/lib/firmware/qcom
|
|
}
|
|
}
|