From a12e069d0cae39a87f003beab9a97f7211abcac2 Mon Sep 17 00:00:00 2001 From: andyrtr Date: Wed, 19 Jan 2022 22:11:54 +0000 Subject: [PATCH] upgpkg: linux-firmware 20220119.0c6a7b3-2: split package to reduce download and install size from most use cases - FS#72559 git-svn-id: file:///srv/repos/svn-packages/svn@434760 eb2447ed-0c53-47e4-bac8-5bc4a241df78 --- trunk/PKGBUILD | 102 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 96 insertions(+), 6 deletions(-) diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index db8f5ad25d30..a97ff107472e 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -1,11 +1,13 @@ # Maintainer: Thomas Bächler pkgbase=linux-firmware -pkgname=(linux-firmware amd-ucode) -#_tag=2021216 +pkgname=(linux-firmware-whence linux-firmware amd-ucode + linux-firmware-{nfp,mellanox,marvell,qcom,liquidio,qlogic,bnx2x} +) +#_tag=20211216 _commit=0c6a7b3bf728b95c8b7b95328f94335e2bb2c967 pkgver=20220119.0c6a7b3 -pkgrel=1 +pkgrel=2 pkgdesc="Firmware files for Linux" url="https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git;a=summary" license=('GPL2' 'GPL3' 'custom') @@ -21,8 +23,19 @@ validpgpkeys=('4CDE8575E547BF835FE15807A31B6BD72486CFD6') # Josh Boyer amd-ucode.img } +package_linux-firmware-whence() { + cd "$pkgbase" + install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 WHENCE +} + package_linux-firmware() { + depends=('linux-firmware-whence') + cd ${pkgname} make DESTDIR="${pkgdir}" FIRMWAREDIR=/usr/lib/firmware installcompress @@ -65,7 +85,28 @@ package_linux-firmware() { echo 'w /sys/devices/system/cpu/microcode/reload - - - - 1' | install -Dm644 /dev/stdin "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf" - install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 LICEN* WHENCE + install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 LICEN* + + # split + cd "$pkgdir" + _pick linux-firmware-nfp usr/lib/firmware/netronome + _pick linux-firmware-nfp usr/share/licenses/${pkgname}/LICENCE.Netronome + + _pick linux-firmware-mellanox usr/lib/firmware/mellanox + + _pick linux-firmware-marvell usr/lib/firmware/{libertas,mwl8k,mwlwifi,mrvl} + _pick linux-firmware-marvell usr/share/licenses/${pkgname}/LICENCE.{Marvell,NXP} + + _pick linux-firmware-qcom usr/lib/firmware/{qcom,a300_*} + _pick linux-firmware-qcom usr/share/licenses/${pkgname}/LICENSE.qcom + + _pick linux-firmware-liquidio usr/lib/firmware/liquidio + _pick linux-firmware-liquidio usr/share/licenses/${pkgname}/LICENCE.cavium_liquidio + + _pick linux-firmware-qlogic usr/lib/firmware/{qlogic,qed,ql2???_*,c{b,t,t2}fw-*} + _pick linux-firmware-qlogic usr/share/licenses/${pkgname}/LICENCE.{qla1280,qla2xxx} + + _pick linux-firmware-bnx2x usr/lib/firmware/bnx2x* } package_amd-ucode() { @@ -77,4 +118,53 @@ package_amd-ucode() { install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 ${pkgbase}/LICENSE.amd-ucode } +package_linux-firmware-nfp() { + pkgdesc+=" - nfp / Firmware for Netronome Flow Processors" + depends=('linux-firmware-whence') + + mv -v linux-firmware-nfp/* "${pkgdir}" +} + +package_linux-firmware-mellanox() { + pkgdesc+=" - mellanox / Firmware for Mellanox Spectrum switches" + depends=('linux-firmware-whence') + + mv -v linux-firmware-mellanox/* "${pkgdir}" +} + +package_linux-firmware-marvell() { + pkgdesc+=" - marvell / Firmware for Marvell devices" + depends=('linux-firmware-whence') + + mv -v linux-firmware-marvell/* "${pkgdir}" +} + +package_linux-firmware-qcom() { + pkgdesc+=" - qcom / Firmware for Qualcomm SoCs" + depends=('linux-firmware-whence') + + mv -v linux-firmware-qcom/* "${pkgdir}" +} + +package_linux-firmware-liquidio() { + pkgdesc+=" - liquidio / Firmware for Cavium LiquidIO server adapters" + depends=('linux-firmware-whence') + + mv -v linux-firmware-liquidio/* "${pkgdir}" +} + +package_linux-firmware-qlogic() { + pkgdesc+=" - qlogic / Firmware for QLogic devices" + depends=('linux-firmware-whence') + + mv -v linux-firmware-qlogic/* "${pkgdir}" +} + +package_linux-firmware-bnx2x() { + pkgdesc+=" - bnx2x / Firmware for Broadcom NetXtreme II 10Gb ethernet adapters" + depends=('linux-firmware-whence') + + mv -v linux-firmware-bnx2x/* "${pkgdir}" +} + # vim:set sw=2 et: