summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Wilken2023-11-21 17:49:28 +0100
committerTimo Wilken2023-11-21 17:52:27 +0100
commit5288f5aa553d1851efd468630b202d335b8a630a (patch)
tree37f19175a7e2ccd02133260e04da82b7754c2cb2
parent9f9821b3525af3d9a8f098ce8be49f6c2839bb36 (diff)
Install MT7922 firmware on Framework laptop
-rw-r--r--tw/system/frm.scm30
1 files changed, 29 insertions, 1 deletions
diff --git a/tw/system/frm.scm b/tw/system/frm.scm
index 6226eb84..9d5c815d 100644
--- a/tw/system/frm.scm
+++ b/tw/system/frm.scm
@@ -11,10 +11,14 @@
#:use-module (gnu system nss)
#:use-module (guix gexp)
#:use-module (guix packages)
+ #:use-module ((guix utils)
+ #:select (substitute-keyword-arguments))
#:use-module ((nongnu packages linux)
#:prefix nongnu:) ; don't interfere with (gnu packages linux)
#:use-module ((nongnu system linux-initrd)
#:prefix nongnu:)
+ #:use-module ((nonguix licenses)
+ #:prefix nongnu:)
#:use-module (tw channels)
#:use-module (tw packages scanner)
#:use-module (tw services secrets)
@@ -43,6 +47,30 @@
(keyboard-layout %british-keyboard)
(extra-config (list touchpad-xorg-config))))
+(define select-firmware
+ (@@ (nongnu packages linux) select-firmware))
+
+(define-public mt7922-firmware
+ (package
+ (inherit nongnu:linux-firmware)
+ (name "mt7922-firmware")
+ (arguments
+ `(#:license-file-regexp "LICENSE.mediatek"
+ ,@(substitute-keyword-arguments (package-arguments nongnu:linux-firmware)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'select-firmware
+ ,(select-firmware "^mediatek/.*7922.*")))))))
+ (home-page "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek")
+ (synopsis "Nonfree firmware for Mediatek MT7922 (AMD RZ616) wireless chips")
+ (description "Nonfree firmware for AMD RZ616 Wi-Fi and Bluetooth chips.
+These are actually Mediatek MT7922 chips.")
+ (license
+ (nongnu:nonfree
+ (string-append
+ "https://git.kernel.org/pub/scm/linux/kernel/git/firmware"
+ "/linux-firmware.git/plain/LICENSE.mediatek")))))
+
(define-public %frm-system
(operating-system
(host-name "frm.twilken.net")
@@ -75,7 +103,7 @@
(kernel (nongnu:corrupt-linux linux-libre #:configs '("CONFIG_MT7921E=m")))
(initrd nongnu:microcode-initrd)
;; TODO: Enable wifi firmware, if necessary?
- (firmware (cons* nongnu:amdgpu-firmware %base-firmware))
+ (firmware (cons* nongnu:amdgpu-firmware mt7922-firmware %base-firmware))
(file-systems
(cons* (file-system