mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
linux-libre: Support module compression.
This commit adds support for GZIP compression for linux-libre kernel modules. The initrd modules are kept uncompressed as the initrd is already compressed as a whole. The linux-libre kernel also supports XZ compression, but as Guix does not have any available bindings for now, and the compression time is far more significant, GZIP seems to be a better option. * gnu/build/linux-modules.scm (modinfo-section-contents): Use 'call-with-gzip-input-port' to read from a module file using '.gz' extension, (strip-extension): new procedure, (dot-ko): adapt to support compression, (ensure-dot-ko): ditto, (file-name->module-name): ditto, (find-module-file): ditto, (load-linux-module*): ditto, (module-name->file-name/guess): ditto, (module-name-lookup): ditto, (write-module-name-database): ditto, (write-module-alias-database): ditto, (write-module-device-database): ditto. * gnu/installer.scm (installer-program): Add "guile-zlib" to the extensions. * gnu/machine/ssh.scm (machine-check-initrd-modules): Ditto. * gnu/services.scm (activation-script): Ditto. * gnu/services/base.scm (default-serial-port): Ditto, (agetty-shepherd-service): ditto, (udev-service-type): ditto. * gnu/system/image.scm (gcrypt-sqlite3&co): Ditto. * gnu/system/linux-initrd.scm (flat-linux-module-directory): Add "guile-zlib" to the extensions and make sure that the initrd only contains uncompressed module files. * gnu/system/shadow.scm (account-shepherd-service): Add "guile-zlib" to the extensions. * guix/profiles.scm (linux-module-database): Ditto.
This commit is contained in:
parent
46ef674b34
commit
755f365b02
9 changed files with 415 additions and 333 deletions
|
@ -35,6 +35,7 @@
|
|||
#:use-module (guix modules)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages bash)
|
||||
#:use-module (gnu packages guile)
|
||||
#:use-module (gnu packages hurd)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-9)
|
||||
|
@ -585,28 +586,29 @@ ACTIVATION-SCRIPT-TYPE."
|
|||
(with-imported-modules (source-module-closure
|
||||
'((gnu build activation)
|
||||
(guix build utils)))
|
||||
#~(begin
|
||||
(use-modules (gnu build activation)
|
||||
(guix build utils))
|
||||
(with-extensions (list guile-zlib)
|
||||
#~(begin
|
||||
(use-modules (gnu build activation)
|
||||
(guix build utils))
|
||||
|
||||
;; Make sure the user accounting database exists. If it
|
||||
;; does not exist, 'setutxent' does not create it and
|
||||
;; thus there is no accounting at all.
|
||||
(close-port (open-file "/var/run/utmpx" "a0"))
|
||||
;; Make sure the user accounting database exists. If
|
||||
;; it does not exist, 'setutxent' does not create it
|
||||
;; and thus there is no accounting at all.
|
||||
(close-port (open-file "/var/run/utmpx" "a0"))
|
||||
|
||||
;; Same for 'wtmp', which is populated by mingetty et
|
||||
;; al.
|
||||
(mkdir-p "/var/log")
|
||||
(close-port (open-file "/var/log/wtmp" "a0"))
|
||||
;; Same for 'wtmp', which is populated by mingetty et
|
||||
;; al.
|
||||
(mkdir-p "/var/log")
|
||||
(close-port (open-file "/var/log/wtmp" "a0"))
|
||||
|
||||
;; Set up /run/current-system. Among other things this
|
||||
;; sets up locales, which the activation snippets
|
||||
;; executed below may expect.
|
||||
(activate-current-system)
|
||||
;; Set up /run/current-system. Among other things
|
||||
;; this sets up locales, which the activation snippets
|
||||
;; executed below may expect.
|
||||
(activate-current-system)
|
||||
|
||||
;; Run the services' activation snippets.
|
||||
;; TODO: Use 'load-compiled'.
|
||||
(for-each primitive-load '#$actions)))))
|
||||
;; Run the services' activation snippets.
|
||||
;; TODO: Use 'load-compiled'.
|
||||
(for-each primitive-load '#$actions))))))
|
||||
|
||||
(define (gexps->activation-gexp gexps)
|
||||
"Return a gexp that runs the activation script containing GEXPS."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue