mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-11-29 22:58:06 +00:00
rosenthal: linux-cachyos: Remove builtin ZFS modules.
This commit is contained in:
1 file changed
+71
-155
@@ -8,20 +8,14 @@
|
|||||||
;; Utilities
|
;; Utilities
|
||||||
#:use-module (guix diagnostics)
|
#:use-module (guix diagnostics)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix i18n)
|
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
;; Guix origin methods
|
;; Guix origin methods
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
;; Guix packages
|
;; Guix packages
|
||||||
#:use-module (gnu packages autotools)
|
|
||||||
#:use-module (gnu packages file-systems)
|
|
||||||
#:use-module (gnu packages linux)
|
#:use-module (gnu packages linux)
|
||||||
#:use-module (gnu packages onc-rpc)
|
|
||||||
#:use-module (gnu packages pkg-config)
|
|
||||||
#:export (default-initrd-configs
|
#:export (default-initrd-configs
|
||||||
linux-with-zfs
|
|
||||||
cachyos-configs))
|
cachyos-configs))
|
||||||
|
|
||||||
(define* (default-initrd-configs
|
(define* (default-initrd-configs
|
||||||
@@ -61,80 +55,6 @@
|
|||||||
'()
|
'()
|
||||||
'("CONFIG_HID_APPLE=m"))))
|
'("CONFIG_HID_APPLE=m"))))
|
||||||
|
|
||||||
(define* (linux-with-zfs linux #:optional (zfs zfs))
|
|
||||||
"Return a kernel package based on LINUX, with ZFS kernel modules built in."
|
|
||||||
(cond
|
|
||||||
((not (package? linux))
|
|
||||||
(warning (G_ "'~a': kernel '~a' is not a package, skipping modification~%")
|
|
||||||
"linux-with-zfs"
|
|
||||||
linux)
|
|
||||||
linux)
|
|
||||||
((assq-ref (package-properties linux) 'with-zfs?)
|
|
||||||
linux)
|
|
||||||
(else
|
|
||||||
(let ((zfs-directory
|
|
||||||
(string-append (package-name zfs) "-" (package-version zfs))))
|
|
||||||
(package
|
|
||||||
(inherit linux)
|
|
||||||
(name (string-append (package-name linux) "-with-zfs"))
|
|
||||||
(arguments
|
|
||||||
(substitute-keyword-arguments arguments
|
|
||||||
((#:substitutable? _ #t) #f)
|
|
||||||
((#:phases phases)
|
|
||||||
#~(modify-phases #$phases
|
|
||||||
(add-after 'unpack 'unpack-zfs
|
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
|
||||||
(let ((zfs-source #+(package-source zfs)))
|
|
||||||
(if (file-is-directory? zfs-source)
|
|
||||||
(copy-recursively zfs-source #$zfs-directory)
|
|
||||||
(invoke "tar" "xf" zfs-source)))
|
|
||||||
(with-directory-excursion #$zfs-directory
|
|
||||||
;; Copied from zfs package.
|
|
||||||
(substitute* "module/os/linux/zfs/zfs_ctldir.c"
|
|
||||||
(("/usr/bin/env\", \"umount")
|
|
||||||
(string-append
|
|
||||||
(search-input-file inputs "/bin/umount") "\", \"-n"))
|
|
||||||
(("/usr/bin/env\", \"mount")
|
|
||||||
(string-append
|
|
||||||
(search-input-file inputs "/bin/mount") "\", \"-n"))))))
|
|
||||||
;; https://github.com/openzfs/zfs/issues/10450#issuecomment-643654436
|
|
||||||
(add-after 'patch-source-shebangs 'add-zfs-to-kernel-tree
|
|
||||||
(lambda _
|
|
||||||
(invoke "make" "defconfig" "prepare")
|
|
||||||
(with-directory-excursion #$zfs-directory
|
|
||||||
(invoke "./autogen.sh")
|
|
||||||
(substitute* "configure"
|
|
||||||
(("/bin/sh") (which "sh")))
|
|
||||||
(invoke "./configure" "--enable-linux-builtin"
|
|
||||||
"--with-linux=.."
|
|
||||||
"--with-linux-obj=..")
|
|
||||||
(invoke "./copy-builtin" ".."))
|
|
||||||
(delete-file-recursively #$zfs-directory)))
|
|
||||||
(add-after 'configure 'enable-zfs
|
|
||||||
(lambda _
|
|
||||||
(for-each
|
|
||||||
(lambda (config)
|
|
||||||
(invoke "./scripts/config" "--enable" config))
|
|
||||||
'("CONFIG_CRYPTO_DEFLATE"
|
|
||||||
"CONFIG_ZLIB_DEFLATE"
|
|
||||||
"CONFIG_KALLSYMS"
|
|
||||||
"CONFIG_EFI_PARTITION"
|
|
||||||
"CONFIG_ZFS"))))))))
|
|
||||||
(native-inputs
|
|
||||||
(modify-inputs native-inputs
|
|
||||||
(prepend autoconf
|
|
||||||
automake
|
|
||||||
libtool
|
|
||||||
pkg-config)))
|
|
||||||
(inputs
|
|
||||||
(modify-inputs inputs
|
|
||||||
(prepend libtirpc
|
|
||||||
util-linux
|
|
||||||
`(,util-linux "lib"))))
|
|
||||||
(properties
|
|
||||||
`((with-zfs? . #t)
|
|
||||||
,@(package-properties linux))))))))
|
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; linux-cachyos
|
;;; linux-cachyos
|
||||||
@@ -295,80 +215,76 @@
|
|||||||
(file-append source path)))
|
(file-append source path)))
|
||||||
|
|
||||||
(define-public linux-cachyos-lts-server
|
(define-public linux-cachyos-lts-server
|
||||||
(let* ((version "6.18.55-1")
|
(customize-linux
|
||||||
(kernel
|
#:name "linux-cachyos-lts-server"
|
||||||
(customize-linux
|
#:linux
|
||||||
#:name "linux-cachyos-lts-server"
|
(package
|
||||||
#:source
|
(inherit linux-libre)
|
||||||
(origin
|
(version "6.18.55-1")
|
||||||
(method url-fetch)
|
(source
|
||||||
(uri (string-append
|
(origin
|
||||||
"https://github.com/CachyOS/linux/releases/download/cachyos-"
|
(method url-fetch)
|
||||||
version "/cachyos-" version ".tar.gz"))
|
(uri (string-append
|
||||||
(sha256
|
"https://github.com/CachyOS/linux/releases/download/cachyos-"
|
||||||
(base32 "1x9hymblmpj90dhwlz7lsfkdw8fjjpnghhg0yk3qmf9x16v8nrd3")))
|
version "/cachyos-" version ".tar.gz"))
|
||||||
#:defconfig (%kernel-config "/defconfig_server")
|
(sha256
|
||||||
#:configs
|
(base32 "1x9hymblmpj90dhwlz7lsfkdw8fjjpnghhg0yk3qmf9x16v8nrd3"))))
|
||||||
(string-join
|
(home-page "https://cachyos.org/")
|
||||||
(append (cachyos-configs
|
(synopsis "CachyOS Linux kernel (lts + server)")
|
||||||
#:major-version (version-major version)
|
(description "")
|
||||||
#:cachy-config? #f
|
(supported-systems '("x86_64-linux")))
|
||||||
#:cpusched 'eevdf
|
#:defconfig (%kernel-config "/defconfig_server")
|
||||||
#:cc-harder? #t
|
#:configs
|
||||||
#:per-gov? #f
|
(string-join
|
||||||
#:tcp-bbr3? #t
|
(append (cachyos-configs
|
||||||
#:HZ-ticks 300
|
#:major-version "6"
|
||||||
#:tickrate 'full
|
#:cachy-config? #f
|
||||||
#:preempt 'none
|
#:cpusched 'eevdf
|
||||||
#:hugepage 'always
|
#:cc-harder? #t
|
||||||
#:processor-opt 'generic)
|
#:per-gov? #f
|
||||||
(default-initrd-configs))
|
#:tcp-bbr3? #t
|
||||||
"\n"))))
|
#:HZ-ticks 300
|
||||||
(hidden-package
|
#:tickrate 'full
|
||||||
(package
|
#:preempt 'none
|
||||||
(inherit (linux-with-zfs kernel))
|
#:hugepage 'always
|
||||||
(version version)
|
#:processor-opt 'generic)
|
||||||
(arguments
|
(default-initrd-configs))
|
||||||
(substitute-keyword-arguments arguments
|
"\n")))
|
||||||
((#:substitutable? _ #f) #t)))
|
|
||||||
(supported-systems '("x86_64-linux"))))))
|
|
||||||
|
|
||||||
(define-public linux-cachyos-bore-zen4
|
(define-public linux-cachyos-bore-zen4
|
||||||
(let* ((version "7.2.9-2")
|
(customize-linux
|
||||||
(kernel
|
#:name "linux-cachyos-bore-zen4"
|
||||||
(customize-linux
|
#:linux
|
||||||
#:name "linux-cachyos-bore-zen4"
|
(package
|
||||||
#:source
|
(inherit linux-libre)
|
||||||
(origin
|
(version "7.2.9-2")
|
||||||
(method url-fetch)
|
(source
|
||||||
(uri (string-append
|
(origin
|
||||||
"https://github.com/CachyOS/linux/releases/download/cachyos-"
|
(method url-fetch)
|
||||||
version "/cachyos-" version ".tar.gz"))
|
(uri (string-append
|
||||||
(sha256
|
"https://github.com/CachyOS/linux/releases/download/cachyos-"
|
||||||
(base32 "1fpwmihnv9j9bvhcviia5k1dlilr0mcv17ch8rznadhlwgzyda9d"))
|
version "/cachyos-" version ".tar.gz"))
|
||||||
(patches (map %kernel-config '("/patches/bore-cachy-7.2.patch"))))
|
(sha256
|
||||||
#:defconfig (%kernel-config "/defconfig_desktop")
|
(base32 "1fpwmihnv9j9bvhcviia5k1dlilr0mcv17ch8rznadhlwgzyda9d"))
|
||||||
#:configs
|
(patches (map %kernel-config '("/patches/bore-cachy-7.2.patch")))))
|
||||||
(string-join
|
(home-page "https://cachyos.org/")
|
||||||
(append (cachyos-configs
|
(synopsis "CachyOS Linux kernel (bore + znver4)")
|
||||||
#:major-version (version-major version)
|
(description "")
|
||||||
#:cachy-config? #t
|
(supported-systems '("x86_64-linux")))
|
||||||
#:cpusched 'bore
|
#:defconfig (%kernel-config "/defconfig_desktop")
|
||||||
#:cc-harder? #t
|
#:configs
|
||||||
#:per-gov? #f
|
(string-join
|
||||||
#:tcp-bbr3? #t
|
(append (cachyos-configs
|
||||||
#:HZ-ticks 1000
|
#:major-version "7"
|
||||||
#:tickrate 'full
|
#:cachy-config? #t
|
||||||
#:preempt 'full
|
#:cpusched 'bore
|
||||||
#:hugepage 'always
|
#:cc-harder? #t
|
||||||
#:processor-opt 'zen4)
|
#:per-gov? #f
|
||||||
(default-initrd-configs))
|
#:tcp-bbr3? #t
|
||||||
"\n"))))
|
#:HZ-ticks 1000
|
||||||
(hidden-package
|
#:tickrate 'full
|
||||||
(package
|
#:preempt 'full
|
||||||
(inherit (linux-with-zfs kernel))
|
#:hugepage 'always
|
||||||
(version version)
|
#:processor-opt 'zen4)
|
||||||
(arguments
|
(default-initrd-configs))
|
||||||
(substitute-keyword-arguments arguments
|
"\n")))
|
||||||
((#:substitutable? _ #f) #t)))
|
|
||||||
(supported-systems '("x86_64-linux"))))))
|
|
||||||
Reference in new issue
Block a user