blob: 68674d4d92a5bef86ff89d2db300ef53fb6e7c99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Maintainer: Echo J. <aidas957 at gmail dot com>
# shellcheck shell=bash disable=SC2034,SC2164
pkgname=nouveau-fw-gsp
pkgver=565.57.01
pkgrel=1
pkgdesc="NVIDIA GSP (Turing+) firmware for the latest GSP kernel code"
arch=('any')
url="https://download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/README/gsp.html"
license=('MIT' 'LicenseRef-NVIDIA')
makedepends=('git' 'python3')
_nvidia="NVIDIA-Linux-x86_64-${pkgver}"
_gsp_output="_out/nvidia"
source=("git+https://github.com/NVIDIA/open-gpu-kernel-modules.git#tag=${pkgver}?signed"
"https://download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_nvidia}.run")
sha256sums=('e3900605ea58b11714b1da8b6fe95975a2e73f3808875ba32f9c638d52440f59'
'6eebe94e585e385e8804f5a74152df414887bf819cc21bd95b72acd0fb182c7a')
validpgpkeys=('176D338FCB6EDC71F934ED427D23DC2750FAC2E1') # Bernhard Stoeckner
build() {
cd open-gpu-kernel-modules
# Compile the early GSP blobs for packaging (with an extra option to install the main one)
rm -r "${_gsp_output}" || true
./nouveau/extract-firmware-nouveau.py -s -d ../"${_nvidia}".run
}
package() {
cd open-gpu-kernel-modules
# Note: Main GSP blob is somehow over 20 MB (or 30 MB for Ampere)
# (Interesting article about this: https://www.phoronix.com/news/NVIDIA-GSP-Firmware-Bloat)
echo "Packaging GSP blobs..."
install -dm755 "${pkgdir}"/usr/lib/firmware
cp -a "${_gsp_output}" "${pkgdir}"/usr/lib/firmware
_tmp_dir="$(mktemp -d)"
pushd "${_tmp_dir}" > /dev/null; sh "${srcdir}/${_nvidia}.run" -x; popd > /dev/null
# MIT/Expat license (for the early GSP blobs)
install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE.expat
# Proprietary NVIDIA license (for the main GSP blob)
install -Dm644 "${_tmp_dir}/${_nvidia}"/LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE.nvidia
rm -r "${_tmp_dir}"
}
|