nongnu: linux-firmware: Update to 20191022.

* nongnu/packages/linux.scm (linux-firmware): Update to 20191022.
[source]: Switch to tagged and signed tarballs.
[arguments]: Adjust build system for tarball.
(amdgpu-firmware, ath3k-firmware, iwlwifi-firmware, rtlwifi-firmware,
rtl-nic-firmware, rtl-bt-firmware): Adjust build system for tarball.
This commit is contained in:
Alex Griffin 2019-12-03 15:38:05 -06:00
parent 35646e5acf
commit ecf5742326

View file

@ -18,6 +18,7 @@
(define-module (nongnu packages linux) (define-module (nongnu packages linux)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages base)
#:use-module (gnu packages compression) #:use-module (gnu packages compression)
#:use-module (gnu packages linux) #:use-module (gnu packages linux)
#:use-module (guix packages) #:use-module (guix packages)
@ -71,42 +72,45 @@ on hardware which requires nonfree software to function.")))
(define-public linux linux-5.3) (define-public linux linux-5.3)
(define-public linux-firmware (define-public linux-firmware
(let ((commit "92e17d0dd2437140fab044ae62baf69b35d7d1fa") (package
(revision "1")) (name "linux-firmware")
(package (version "20191022")
(name "linux-firmware") (source (origin
(version (git-version "20190502" revision commit)) (method url-fetch)
(source (origin (uri (string-append "https://git.kernel.org/pub/scm/linux/kernel"
(method git-fetch) "/git/firmware/linux-firmware.git/snapshot/"
(uri (git-reference "linux-firmware-" version ".tar.gz"))
(url (string-append (sha256
"https://git.kernel.org/pub/scm/" (base32
"linux/kernel/git/firmware/linux-firmware.git")) "1pb32ldi0qw5hsxkng4bs1xfcadrgl8js93zl4g1rngl8bsvfgyw"))))
(commit commit))) (build-system trivial-build-system)
(file-name (git-file-name name version)) (arguments
(sha256 `(#:modules ((guix build utils))
(base32 #:builder (begin
"1bsgp124jhs9bbjjq0fzmdsziwx1y5aivkgpj8v56ar0y2zmrw2d")))) (use-modules (guix build utils))
(build-system trivial-build-system) (let ((source (assoc-ref %build-inputs "source"))
(arguments (destination (string-append %output "/lib/firmware"))
`(#:modules ((guix build utils)) (gzip (assoc-ref %build-inputs "gzip"))
#:builder (begin (tar (assoc-ref %build-inputs "tar")))
(use-modules (guix build utils)) (set-path-environment-variable "PATH" '("bin")
(let ((source (assoc-ref %build-inputs "source")) (list tar gzip))
(destination (string-append %output "/lib/firmware"))) (invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p destination) (mkdir-p destination)
(copy-recursively source destination #:follow-symlinks? #t) (copy-recursively "." destination #:follow-symlinks? #t)
#t)))) #t))))
(home-page (native-inputs
"http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git") `(("gzip" ,gzip)
(synopsis "Nonfree firmware blobs for Linux") ("tar" ,tar)))
(description "Nonfree firmware blobs for enabling support for various (home-page
"http://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git")
(synopsis "Nonfree firmware blobs for Linux")
(description "Nonfree firmware blobs for enabling support for various
hardware in the Linux kernel. This is a large package which may be overkill hardware in the Linux kernel. This is a large package which may be overkill
if your hardware is supported by one of the smaller firmware packages.") if your hardware is supported by one of the smaller firmware packages.")
(license (license
(nonfree (nonfree
(string-append "https://git.kernel.org/pub/scm/linux/kernel/git/" (string-append "https://git.kernel.org/pub/scm/linux/kernel/git/"
"firmware/linux-firmware.git/plain/WHENCE")))))) "firmware/linux-firmware.git/plain/WHENCE")))))
(define-public amdgpu-firmware (define-public amdgpu-firmware
(package (package
@ -120,10 +124,15 @@ if your hardware is supported by one of the smaller firmware packages.")
(use-modules (guix build utils)) (use-modules (guix build utils))
(let* ((source (assoc-ref %build-inputs "source")) (let* ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware/")) (fw-dir (string-append %output "/lib/firmware/"))
(bin-dir (string-append fw-dir "/amdgpu"))) (bin-dir (string-append fw-dir "/amdgpu"))
(gzip (assoc-ref %build-inputs "gzip"))
(tar (assoc-ref %build-inputs "tar")))
(set-path-environment-variable "PATH" '("bin")
(list tar gzip))
(invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p bin-dir) (mkdir-p bin-dir)
(copy-recursively (string-append source "/amdgpu") bin-dir) (copy-recursively "./amdgpu" bin-dir)
(install-file (string-append source "/LICENSE.amdgpu") fw-dir) (install-file "./LICENSE.amdgpu" fw-dir)
#t)))) #t))))
(home-page "http://support.amd.com/en-us/download/linux") (home-page "http://support.amd.com/en-us/download/linux")
(synopsis "Nonfree firmware for AMD graphics chips") (synopsis "Nonfree firmware for AMD graphics chips")
@ -148,16 +157,21 @@ advanced 3D.")
(begin (begin
(use-modules (guix build utils)) (use-modules (guix build utils))
(let ((source (assoc-ref %build-inputs "source")) (let ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware"))) (fw-dir (string-append %output "/lib/firmware"))
(gzip (assoc-ref %build-inputs "gzip"))
(tar (assoc-ref %build-inputs "tar")))
(set-path-environment-variable "PATH" '("bin")
(list tar gzip))
(invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p fw-dir) (mkdir-p fw-dir)
(for-each (lambda (file) (for-each (lambda (file)
(copy-file (string-append source "/" file) (copy-file file
(string-append fw-dir "/" file))) (string-append fw-dir "/" file)))
(list "ath3k-1.fw" (list "ath3k-1.fw"
"LICENCE.atheros_firmware" "LICENCE.atheros_firmware"
"LICENSE.QualcommAtheros_ar3k" "LICENSE.QualcommAtheros_ar3k"
"WHENCE")) "WHENCE"))
(copy-recursively (string-append source "/ar3k") (copy-recursively "./ar3k"
(string-append fw-dir "/ar3k")) (string-append fw-dir "/ar3k"))
#t)))) #t))))
(synopsis "Nonfree firmware blobs for the ath3k Bluetooth driver") (synopsis "Nonfree firmware blobs for the ath3k Bluetooth driver")
@ -185,14 +199,19 @@ is the Linux Bluetooth driver for Atheros AR3011/AR3012 Bluetooth chipsets.")
(begin (begin
(use-modules (guix build utils)) (use-modules (guix build utils))
(let ((source (assoc-ref %build-inputs "source")) (let ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware/"))) (fw-dir (string-append %output "/lib/firmware/"))
(gzip (assoc-ref %build-inputs "gzip"))
(tar (assoc-ref %build-inputs "tar")))
(set-path-environment-variable "PATH" '("bin")
(list tar gzip))
(invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p fw-dir) (mkdir-p fw-dir)
(for-each (lambda (file) (for-each (lambda (file)
(copy-file file (copy-file file
(string-append fw-dir (basename file)))) (string-append fw-dir (basename file))))
(cons* (cons*
(string-append source "/LICENCE.iwlwifi_firmware") "./LICENCE.iwlwifi_firmware"
(find-files source (find-files "."
"iwlwifi-.*\\.ucode$"))) "iwlwifi-.*\\.ucode$")))
#t)))) #t))))
(home-page "https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi") (home-page "https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi")
@ -371,10 +390,15 @@ chipsets from Broadcom:
(use-modules (guix build utils)) (use-modules (guix build utils))
(let* ((source (assoc-ref %build-inputs "source")) (let* ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware/")) (fw-dir (string-append %output "/lib/firmware/"))
(bin-dir (string-append fw-dir "/rtlwifi"))) (bin-dir (string-append fw-dir "/rtlwifi"))
(gzip (assoc-ref %build-inputs "gzip"))
(tar (assoc-ref %build-inputs "tar")))
(set-path-environment-variable "PATH" '("bin")
(list tar gzip))
(invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p bin-dir) (mkdir-p bin-dir)
(copy-recursively (string-append source "/rtlwifi") bin-dir) (copy-recursively "./rtlwifi" bin-dir)
(install-file (string-append source "/LICENCE.rtlwifi_firmware.txt") fw-dir) (install-file "./LICENCE.rtlwifi_firmware.txt" fw-dir)
#t)))) #t))))
(home-page "https://wireless.wiki.kernel.org/en/users/drivers/rtl819x") (home-page "https://wireless.wiki.kernel.org/en/users/drivers/rtl819x")
(synopsis "Nonfree firmware for Realtek wifi chips") (synopsis "Nonfree firmware for Realtek wifi chips")
@ -433,10 +457,15 @@ firmware for the following chips:
(use-modules (guix build utils)) (use-modules (guix build utils))
(let* ((source (assoc-ref %build-inputs "source")) (let* ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware/")) (fw-dir (string-append %output "/lib/firmware/"))
(bin-dir (string-append fw-dir "/rtl_nic"))) (bin-dir (string-append fw-dir "/rtl_nic"))
(gzip (assoc-ref %build-inputs "gzip"))
(tar (assoc-ref %build-inputs "tar")))
(set-path-environment-variable "PATH" '("bin")
(list tar gzip))
(invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p bin-dir) (mkdir-p bin-dir)
(copy-recursively (string-append source "/rtl_nic") bin-dir) (copy-recursively "./rtl_nic" bin-dir)
(install-file (string-append source "/LICENCE.rtlwifi_firmware.txt") fw-dir) (install-file "./LICENCE.rtlwifi_firmware.txt" fw-dir)
#t)))) #t))))
(synopsis "Nonfree firmware for Realtek ethernet chips") (synopsis "Nonfree firmware for Realtek ethernet chips")
(description (description
@ -481,10 +510,15 @@ firmware for the following chips:
(use-modules (guix build utils)) (use-modules (guix build utils))
(let* ((source (assoc-ref %build-inputs "source")) (let* ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware/")) (fw-dir (string-append %output "/lib/firmware/"))
(bin-dir (string-append fw-dir "/rtl_bt"))) (bin-dir (string-append fw-dir "/rtl_bt"))
(gzip (assoc-ref %build-inputs "gzip"))
(tar (assoc-ref %build-inputs "tar")))
(set-path-environment-variable "PATH" '("bin")
(list tar gzip))
(invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p bin-dir) (mkdir-p bin-dir)
(copy-recursively (string-append source "/rtl_bt") bin-dir) (copy-recursively "./rtl_bt" bin-dir)
(install-file (string-append source "/LICENCE.rtlwifi_firmware.txt") fw-dir) (install-file "./LICENCE.rtlwifi_firmware.txt" fw-dir)
#t)))) #t))))
(synopsis "Nonfree firmware for Realtek bluetooth chips") (synopsis "Nonfree firmware for Realtek bluetooth chips")
(description (description
@ -536,6 +570,9 @@ firmware for the following chips:
(let* ((source (assoc-ref %build-inputs "source")) (let* ((source (assoc-ref %build-inputs "source"))
(fw-dir (string-append %output "/lib/firmware")) (fw-dir (string-append %output "/lib/firmware"))
(bin-dir (string-append fw-dir "/intel-ucode"))) (bin-dir (string-append fw-dir "/intel-ucode")))
(set-path-environment-variable "PATH" '("bin")
(list tar gzip))
(invoke "tar" "--strip-components=1" "-xvf" source)
(mkdir-p bin-dir) (mkdir-p bin-dir)
(copy-recursively (string-append source "/intel-ucode") bin-dir) (copy-recursively (string-append source "/intel-ucode") bin-dir)
(copy-file (copy-file