Age | Commit message (Collapse) | Author |
|
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.
|
|
* gnu/system.scm (<operating-system>): Add kernel-loadable-modules.
(operating-system-directory-base-entries): Use it.
* doc/guix.texi (operating-system Reference): Document
KERNEL-LOADABLE-MODULES.
* gnu/build/linux-modules.scm (depmod): New procedure.
(make-linux-module-directory): New procedure. Export it.
* guix/profiles.scm (linux-module-database): New procedure. Export it.
* gnu/tests/linux-modules.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/linux.scm (make-linux-libre*)[arguments]<#:phases>[install]:
Disable depmod. Remove "build" and "source" symlinks.
[native-inputs]: Remove kmod.
|
|
Fixes <https://bugs.gnu.org/34902>.
Reported by Julien Lepiller <julien@lepiller.eu>.
* gnu/build/linux-modules.scm (module-formal-name): New procedure.
(load-linux-modules-from-directory)[lookup-module]: Remove.
[module-name->file-name]: New variable. Use it.
(module-name->file-name/guess, module-name-lookup)
(write-module-name-database): New procedures.
* gnu/system/linux-initrd.scm (flat-linux-module-directory): Call
'write-module-name-database'.
|
|
* gnu/build/linux-modules.scm (load-linux-modules-from-directory): New
procedure.
* gnu/build/linux-boot.scm (boot-system)[lookup-module]: Remove.
Use 'load-linux-modules-from-directory' instead.
|
|
* gnu/build/linux-modules.scm (aliases->device-tuple)
(write-module-device-database): New procedures.
(%not-dash): New variable.
Co-authored-by: Danny Milosavljevic <dannym@scratchpost.org>.
|
|
* gnu/build/linux-modules.scm (write-module-alias-database): New
procedure.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
|
|
* gnu/build/linux-modules.scm (missing-modules): New procedure.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Use it.
|
|
as two lists.
* gnu/build/linux-modules.scm (module-soft-dependencies): Partition the
result and return it as two lists.
|
|
Follow-up to 1a5f46621b44aa1458ad7acd4eca5fe1d4574f92.
* gnu/build/linux-modules.scm (module-soft-dependencies): Remove colon from
section names.
|
|
* gnu/build/linux-modules.scm (not-softdep-whitespace): New variable.
(module-soft-dependencies): New procedure.
|
|
Previously we'd get an unhelpful backtrace like this:
In gnu/build/linux-modules.scm:
184:47 4 (recursive-module-dependencies _ #:lookup-module _)
98:14 3 (module-dependencies _)
85:18 2 (modinfo-section-contents _)
In ice-9/ports.scm:
439:11 1 (call-with-input-file #f #<procedure get-bytevector-al?> ?)
In unknown file:
0 (open-file #f "r" #:encoding #f #:guess-encoding #f)
ERROR: In procedure open-file:
Wrong type (expecting string): #f
builder for `/gnu/store/…-linux-modules.drv' failed with exit code 1
* gnu/build/linux-modules.scm (find-module-file): When MODULE cannot be
found, raise an error instead of returning #f. This is more useful to
the user.
|
|
* gnu/build/linux-modules.scm (section-contents): Honor SECTION as was
intended.
(modinfo-section-contents): Pass 'section-contents' a section, not a
section name.
|
|
Fixes <https://bugs.gnu.org/31714>.
Reported by Tonton <tonton@riseup.net>.
* gnu/build/linux-modules.scm (find-module-file): New procedure.
* gnu/system/linux-initrd.scm (flat-linux-module-directory)[build-exp]:
Remove 'lookup' procedure and use 'find-module-file' instead.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Add
comment.
|
|
Previously we would not strip the ".ko" suffix if present.
* gnu/build/linux-modules.scm (file-name->module-name): Export.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Use
'file-name->module-name' instead of 'normalize-module-name'.
|
|
Fixes <https://bugs.gnu.org/31714>.
Reported by Vagrant Cascadian <vagrant@debian.org>
and Florian Pelz <pelzflorian@pelzflorian.de>.
* gnu/system/mapped-devices.scm (check-device-initrd-modules): Pass
LINUX-MODULES through 'normalize-module-name'.
* gnu/build/linux-modules.scm (normalize-module-name): Export.
|
|
* guix/glob.scm (compile-glob-pattern): Rename to...
(string->sglob): ... this.
(compile-sglob, string->compiled-sglob): New procedures.
(glob-match?): Replace '?, 'range, and 'set with a single clause.
* tests/glob.scm (test-compile-glob-pattern): Rename to...
(test-string->sglob): ... this. Adjust accordingly.
(test-glob-match): Use 'string->compiled-sglob' instead of
'compile-glob-pattern'.
* gnu/build/linux-modules.scm (read-module-aliases): Use
'string->compiled-sglob' instead of 'compile-glob-pattern'.
|
|
* gnu/build/linux-modules.scm (load-linux-module*): Pass BLACK-LIST in
recursive call.
|
|
* gnu/build/linux-modules.scm (current-kernel-directory): New procedure.
(current-alias-file): Use it.
|
|
* gnu/build/linux-modules.scm (module-aliases): New variable.
|
|
* gnu/build/linux-modules.scm (readlink*, stat->device-major)
(stat->device-minor): New procedures.
(%not-slash): New variable.
(read-uevent, device-module-aliases, read-module-aliases)
(current-alias-file, known-module-aliases, matching-modules): New
procedures.
|
|
This should be more efficient than loading the whole thing in user space.
* gnu/build/linux-modules.scm (load-linux-module*): Use
'load-linux-module/fd' instead of 'load-linux-module'. Remove 'slurp'.
|
|
* gnu/build/linux-boot.scm (define-module): Use (guix build syscalls).
* gnu/build/linux-modules.scm (define-module): Ditto.
* gnu/build/file-systems (define-module): Stop re-exporting mount, umount and
MS_* flags as this is now safe to include (guix build syscalls) instead.
(mount): Remove procedure.
(umount): Ditto.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
* gnu/build/linux-modules.scm (normalize-module-name): New procedure.
(file-name->module-name): Use it.
(module-black-list): Expound docstring.
|
|
* gnu/build/linux-modules.scm (file-name->module-name)
(module-black-list): New procedure.
* gnu/build/linux-modules.scm (load-linux-module*): Add #:black-list
parameter.
[black-listed?, load-dependencies]: New procedures.
Use them.
|
|
* gnu/build/linux-boot.scm (boot-system): Leave
'current-module-debugging-port' unchanged.
* gnu/build/linux-modules.scm (load-linux-module*): Update comment about
'mmap'.
|
|
* gnu/packages/patches/guile-linux-syscalls.patch (scm_load_linux_module):
Leave 'errno' unchanged when ERR != 0.
* gnu/build/linux-modules.scm (load-linux-module*): Check for the errno
value of ARGS to determine whether the module was already loaded.
|
|
* gnu/build/linux-modules.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
|