2022-12-19 17:17:39 +01:00
|
|
|
;;; SPDX-License-Identifier: GPL-3.0-or-later
|
2021-12-02 13:48:19 +01:00
|
|
|
;;; Copyright © 2022-2023 Jonathan Brielmaier <jonathan.brielmaier@web.de>
|
2022-09-05 08:37:04 +02:00
|
|
|
;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
|
2023-04-09 00:11:15 +02:00
|
|
|
;;; Copyright © 2023 Krzysztof Baranowski <pharcosyle@gmail.com>
|
2024-03-12 08:02:10 +01:00
|
|
|
;;; Copyright © 2024 Efraim Flashner <efraim@flashner.co.il>
|
2022-09-05 08:37:04 +02:00
|
|
|
|
|
|
|
(define-module (nongnu packages firmware)
|
2023-04-09 00:11:15 +02:00
|
|
|
#:use-module (gnu packages compression)
|
|
|
|
#:use-module (gnu packages cpio)
|
2022-09-05 08:37:04 +02:00
|
|
|
#:use-module (gnu packages efi)
|
|
|
|
#:use-module (gnu packages firmware)
|
2021-12-02 13:48:19 +01:00
|
|
|
#:use-module (guix build-system copy)
|
2023-01-11 00:59:26 +01:00
|
|
|
#:use-module (guix build-system gnu)
|
|
|
|
#:use-module (guix download)
|
2022-09-05 08:37:04 +02:00
|
|
|
#:use-module (guix gexp)
|
2021-12-02 13:48:19 +01:00
|
|
|
#:use-module (guix git-download)
|
2023-01-11 00:59:26 +01:00
|
|
|
#:use-module ((guix licenses) #:prefix guix-license:)
|
2022-09-05 08:37:04 +02:00
|
|
|
#:use-module (guix packages)
|
2021-12-02 13:48:19 +01:00
|
|
|
#:use-module (guix utils)
|
2023-04-09 00:12:41 +02:00
|
|
|
#:use-module (nonguix licenses)
|
|
|
|
#:use-module (nongnu packages compression))
|
2022-09-05 08:37:04 +02:00
|
|
|
|
|
|
|
;; fwupd with LVFS nonfree repositories enabled
|
|
|
|
(define-public fwupd-nonfree
|
|
|
|
(package
|
|
|
|
(inherit fwupd)
|
|
|
|
(name "fwupd-nonfree")
|
|
|
|
(arguments
|
|
|
|
(substitute-keyword-arguments (package-arguments fwupd)
|
|
|
|
((#:configure-flags _
|
|
|
|
#~'())
|
|
|
|
#~(list "--wrap-mode=nofallback"
|
|
|
|
"-Dsystemd=false"
|
|
|
|
(string-append "-Defi_os_dir="
|
|
|
|
#$gnu-efi "/lib")
|
|
|
|
"-Defi_binary=false"
|
|
|
|
(string-append "-Dudevdir="
|
|
|
|
#$output "/lib/udev")
|
|
|
|
"--localstatedir=/var"
|
|
|
|
(string-append "--libexecdir="
|
|
|
|
#$output "/libexec")
|
|
|
|
"-Dsupported_build=true"))))))
|
2021-12-02 13:48:19 +01:00
|
|
|
|
|
|
|
(define-public ov5640-firmware
|
|
|
|
(let ((commit "6e8e591e17e207644dfe747e51026967bb1edab5")
|
|
|
|
(revision "1"))
|
|
|
|
(package
|
|
|
|
(name "ov5640-firmware")
|
|
|
|
(version (git-version "0.0.0" revision commit))
|
|
|
|
(source (origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://megous.com/git/linux-firmware")
|
|
|
|
(commit commit)))
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"19xmkdvlkczc6zgigy8jdbgnp37i6pc03m2cm3gilvzg8m7v18ad"))))
|
|
|
|
(build-system copy-build-system)
|
|
|
|
(arguments
|
2023-02-01 12:33:57 +01:00
|
|
|
`(#:substitutable? #f
|
|
|
|
#:install-plan '(("ov5640_af.bin" "lib/firmware/"))))
|
2021-12-02 13:48:19 +01:00
|
|
|
(synopsis "Firmware for the OV5640 sensor in the PinePhone")
|
|
|
|
(description "This package provides binary firmware for the 0V5640 sensor
|
|
|
|
in the PinePhone.")
|
|
|
|
(home-page "https://megous.com/git/linux-firmware")
|
|
|
|
(license (nonfree (string-append "unknown"))))))
|
2021-12-02 13:49:06 +01:00
|
|
|
|
|
|
|
(define-public rtl8723bt-firmware
|
|
|
|
(let ((commit "6e8e591e17e207644dfe747e51026967bb1edab5")
|
|
|
|
(revision "1"))
|
|
|
|
(package
|
|
|
|
(name "rtl8723bt-firmware")
|
|
|
|
(version (git-version "0.0.0" revision commit))
|
|
|
|
(source (origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://megous.com/git/linux-firmware")
|
|
|
|
(commit commit)))
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"19xmkdvlkczc6zgigy8jdbgnp37i6pc03m2cm3gilvzg8m7v18ad"))))
|
|
|
|
(build-system copy-build-system)
|
|
|
|
(arguments
|
2023-02-01 12:30:10 +01:00
|
|
|
`(#:substitutable? #f
|
|
|
|
#:install-plan '(("rtl_bt/rtl8723cs_xx_fw.bin" "lib/firmware/"))))
|
2021-12-02 13:49:06 +01:00
|
|
|
(synopsis "Firmware for the RTL8723BS/CS")
|
|
|
|
(description "This package provides binary firmware for the RTL8723BS/CS
|
|
|
|
WiFi/Bluetooth chip in the PinePhone.")
|
|
|
|
(home-page "https://megous.com/git/linux-firmware")
|
|
|
|
(license (nonfree (string-append "unknown"))))))
|
2023-01-11 00:43:46 +01:00
|
|
|
|
|
|
|
(define-public anx7688-firmware
|
|
|
|
(let ((commit "6e8e591e17e207644dfe747e51026967bb1edab5")
|
|
|
|
(revision "1"))
|
|
|
|
(package
|
|
|
|
(name "anx7688-firmware")
|
|
|
|
(version (git-version "0.0.0" revision commit))
|
|
|
|
(source (origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://megous.com/git/linux-firmware")
|
|
|
|
(commit commit)))
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"19xmkdvlkczc6zgigy8jdbgnp37i6pc03m2cm3gilvzg8m7v18ad"))))
|
|
|
|
(build-system copy-build-system)
|
|
|
|
(arguments
|
2023-02-01 12:34:51 +01:00
|
|
|
`(#:substitutable? #f
|
|
|
|
#:install-plan '(("anx7688-fw.bin" "lib/firmware/"))))
|
2023-01-11 00:43:46 +01:00
|
|
|
(synopsis "Firmware for the ANX7688")
|
|
|
|
(description "This package provides binary firmware for the ANX7688
|
|
|
|
HDMI to USB Type-C Bridge in the PinePhone.")
|
|
|
|
(home-page "https://megous.com/git/linux-firmware")
|
|
|
|
(license (nonfree (string-append "unknown"))))))
|
2023-01-11 00:52:07 +01:00
|
|
|
|
|
|
|
(define-public ap6256-firmware
|
|
|
|
(let ((commit "056d5f6776e515f90bbbbead1be06857aaef17d0")
|
|
|
|
(revision "1"))
|
|
|
|
(package
|
|
|
|
(name "ap6256-firmware")
|
|
|
|
(version (git-version "2020.02" revision commit))
|
|
|
|
(source (origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url
|
|
|
|
"https://gitlab.manjaro.org/manjaro-arm/packages/community/ap6256-firmware")
|
|
|
|
(commit commit)))
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"1s52rpikw0gysph5lq7vr6b3nsxczg4ikgil9zdgmcknjnxk9kbv"))))
|
|
|
|
(build-system copy-build-system)
|
|
|
|
(arguments
|
2023-02-01 12:35:35 +01:00
|
|
|
`(#:substitutable? #f
|
2024-03-12 08:02:10 +01:00
|
|
|
#:install-plan '(;;Bluetooth firmware
|
|
|
|
("BCM4345C5.hcd" "/lib/firmware/brcm/")
|
2023-01-11 00:52:07 +01:00
|
|
|
;; WiFi firmware
|
2024-03-12 08:02:10 +01:00
|
|
|
("fw_bcm43456c5_ag.bin" "/lib/firmware/brcm/")
|
|
|
|
("fw_bcm43456c5_ag.bin"
|
|
|
|
"/lib/firmware/brcm/brcmfmac43456-sdio.bin")
|
2023-01-11 00:52:07 +01:00
|
|
|
("brcmfmac43456-sdio.clm_blob"
|
2024-03-12 08:02:10 +01:00
|
|
|
"/lib/firmware/brcm/")
|
2023-01-11 00:52:07 +01:00
|
|
|
("brcmfmac43456-sdio.AP6256.txt"
|
2024-03-12 08:02:10 +01:00
|
|
|
"/lib/firmware/brcm/")
|
2023-01-11 00:52:07 +01:00
|
|
|
("brcmfmac43456-sdio.AP6256.txt"
|
2024-03-12 08:02:10 +01:00
|
|
|
"/lib/firmware/brcm/brcmfmac43456-sdio.pine64,pinebook-pro.txt"))))
|
2023-01-11 00:52:07 +01:00
|
|
|
(synopsis "Firmware for the wifi/bt module AP6256")
|
|
|
|
(description
|
|
|
|
"This package provides Firmware for the wifi/bt module AP6256,
|
|
|
|
found in Pinebook Pro.")
|
|
|
|
(home-page "https://gitlab.manjaro.org/manjaro-arm/packages/community/ap6256-firmware")
|
|
|
|
(license (nonfree (string-append "unknown"))))))
|
2023-01-11 00:59:26 +01:00
|
|
|
|
|
|
|
(define-public bluez-firmware
|
|
|
|
(package
|
|
|
|
(name "bluez-firmware")
|
|
|
|
(version "1.2")
|
|
|
|
(source (origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "http://bluez.sf.net/download/" name "-"
|
|
|
|
version ".tar.gz"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"1v4yv6gvlvvwslpb0lj1nsp4r900zxpvxz2ab0sbvimbiw8rw4dn"))))
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
(arguments
|
|
|
|
(list #:phases #~(modify-phases %standard-phases
|
|
|
|
(add-after 'install-license-files 'relocate-copyright
|
|
|
|
(lambda* _
|
|
|
|
(install-file (string-append #$output
|
|
|
|
"/lib/firmware/BCM-LEGAL.txt")
|
|
|
|
(string-append #$output
|
|
|
|
"/share/doc/bluez-firmware-"
|
|
|
|
#$(package-version bluez-firmware)
|
|
|
|
"/BCM-LEGAL.txt")))))))
|
|
|
|
(synopsis "Firmware for Broadcom BCM203x and STLC2300 Bluetooth chips")
|
|
|
|
(description "This package provides firmware for Broadcom BCM203x
|
|
|
|
and STLC2300 Bluetooth chips.")
|
|
|
|
(home-page "https://github.com/RPi-Distro/bluez-firmware")
|
|
|
|
(license (list guix-license:gpl2+
|
|
|
|
(nonfree
|
|
|
|
"file:///share/doc/bluez-firmware-1.2/BCM-LEGAL.txt")))))
|
2023-04-09 00:11:15 +02:00
|
|
|
|
|
|
|
(define dump-file-chunk
|
|
|
|
#~(lambda (in out count start)
|
|
|
|
(use-modules (rnrs io ports))
|
|
|
|
(call-with-output-file out
|
|
|
|
(lambda (out-port)
|
|
|
|
(put-bytevector
|
|
|
|
out-port
|
|
|
|
(call-with-input-file in
|
|
|
|
(lambda (in-port)
|
|
|
|
(seek in-port start SEEK_SET)
|
|
|
|
(get-bytevector-n in-port count))))))))
|
|
|
|
|
|
|
|
(define-public facetimehd-firmware
|
|
|
|
(package
|
|
|
|
(name "facetimehd-firmware")
|
|
|
|
(version "1.43")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append
|
|
|
|
"https://updates.cdn-apple.com/2019/cert"
|
|
|
|
"/041-88431-20191011-e7ee7d98-2878-4cd9-bc0a-d98b3a1e24b1"
|
|
|
|
"/OSXUpd10.11.5.dmg"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"009kfk1nrrialgp69c5smzgbmd5xpvk35xmqr2fzb15h6pp33ka6"))))
|
|
|
|
(build-system copy-build-system)
|
|
|
|
(arguments
|
|
|
|
(list
|
|
|
|
#:substitutable? #f
|
|
|
|
#:install-plan #~'(("firmware.bin" "/lib/firmware/facetimehd/"))
|
|
|
|
#:phases
|
|
|
|
(let ((dmg-subset-size 207733123)
|
|
|
|
(dmg-subset-offset 204909802)
|
|
|
|
(firmware-size 603715)
|
|
|
|
(firmware-offset 81920))
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
(add-before 'install 'extract
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
(let ((firmware-in
|
|
|
|
(string-append
|
|
|
|
"System/Library/Extensions/AppleCameraInterface.kext"
|
|
|
|
"/Contents/MacOS/AppleCameraInterface")))
|
|
|
|
(let ((dmg-subset "dmg-subset"))
|
|
|
|
(#$dump-file-chunk #$source
|
|
|
|
dmg-subset
|
|
|
|
#$dmg-subset-size
|
|
|
|
#$dmg-subset-offset)
|
|
|
|
(system
|
|
|
|
(string-join
|
|
|
|
(list (search-input-file inputs "/bin/xz")
|
|
|
|
"--decompress"
|
|
|
|
"--stdout"
|
|
|
|
dmg-subset
|
|
|
|
"|"
|
|
|
|
(search-input-file inputs "/bin/cpio")
|
|
|
|
"--format=odc"
|
|
|
|
"--extract"
|
|
|
|
"--make-directories"
|
|
|
|
(string-append "./" firmware-in)))))
|
|
|
|
(let ((firmware-out "firmware.bin.gz"))
|
|
|
|
(#$dump-file-chunk firmware-in
|
|
|
|
firmware-out
|
|
|
|
#$firmware-size
|
|
|
|
#$firmware-offset)
|
|
|
|
(invoke
|
|
|
|
(search-input-file inputs "/bin/gzip")
|
|
|
|
"--decompress"
|
|
|
|
(string-append firmware-out))))))))))
|
|
|
|
(native-inputs
|
|
|
|
(list cpio gzip xz))
|
|
|
|
(synopsis "Firmware for the FacetimeHD (Broadcom 1570) PCIe webcam")
|
|
|
|
(description "Firmware for the FacetimeHD webcam. See
|
|
|
|
@uref{https://github.com/patjak/facetimehd/wiki/Get-Started#firmware-extraction,
|
|
|
|
patjak's facetimehd wiki} for more information.")
|
|
|
|
(home-page "https://support.apple.com")
|
|
|
|
(license (nonfree "https://www.apple.com/legal"))
|
|
|
|
(supported-systems '("i686-linux" "x86_64-linux"))))
|
2023-04-09 00:12:41 +02:00
|
|
|
|
|
|
|
(define-public facetimehd-calibration
|
|
|
|
(package
|
|
|
|
(name "facetimehd-calibration")
|
|
|
|
(version "5.1.5769")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch/zipbomb)
|
|
|
|
(uri (string-append
|
|
|
|
"https://download.info.apple.com/Mac_OS_X"
|
|
|
|
"/031-30890-20150812-ea191174-4130-11e5-a125-930911ba098f"
|
|
|
|
"/bootcamp" version".zip"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"07jbh6d0djcvcgj5hhkkw7d6mvcl228yb8rp0a2qqw20ya72rpjf"))))
|
|
|
|
(build-system copy-build-system)
|
|
|
|
(arguments
|
|
|
|
(list
|
|
|
|
#:install-plan #~'(("." "/lib/firmware/facetimehd/"
|
|
|
|
#:include-regexp ("[0-9]{4}_01XX\\.dat")))
|
|
|
|
#:phases
|
|
|
|
(let ((calibration-files
|
|
|
|
'(("1771_01XX.dat" 19040 1644880)
|
|
|
|
("1871_01XX.dat" 19040 1606800)
|
|
|
|
("1874_01XX.dat" 19040 1625840)
|
|
|
|
("9112_01XX.dat" 33060 1663920))))
|
|
|
|
#~(modify-phases %standard-phases
|
|
|
|
(add-before 'install 'extract
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
(invoke (search-input-file inputs "/bin/unrar")
|
|
|
|
"x"
|
|
|
|
"BootCamp/Drivers/Apple/AppleCamera64.exe")
|
|
|
|
(for-each (lambda (spec)
|
|
|
|
(apply #$dump-file-chunk "AppleCamera.sys" spec))
|
|
|
|
'#$calibration-files)))))))
|
|
|
|
(native-inputs
|
|
|
|
(list unrar unzip))
|
|
|
|
(synopsis "Calibration files for the FacetimeHD (Broadcom 1570) PCIe webcam")
|
|
|
|
(description "Calibration files for the FacetimeHD webcam. These are
|
|
|
|
optional but make the colors look much better. See
|
|
|
|
@uref{https://github.com/patjak/facetimehd/wiki/Extracting-the-sensor-calibration-files,
|
|
|
|
patjak's facetimehd wiki} for more information.")
|
|
|
|
(home-page "https://support.apple.com/kb/DL1837")
|
|
|
|
(license (nonfree "https://www.apple.com/legal"))
|
|
|
|
(supported-systems '("i686-linux" "x86_64-linux"))))
|