linux-initrd: Avoid looking up builtin modules.
* gnu/system/linux-initrd.scm (flat-linux-module-directory) [build-exp]<builtin-modules,modules-to-lookup>: New variables. <modules>: Use ‘modules-to-lookup’ to avoid looking up builtin modules. Change-Id: I60fdae0211bb6632508b1c63582e013e78186cd1
This commit is contained in:
parent
7fd0975edc
commit
8f8ec56052
1 changed files with 13 additions and 1 deletions
|
@ -132,15 +132,27 @@ (define build-exp
|
|||
#~(begin
|
||||
(use-modules (gnu build linux-modules)
|
||||
(guix build utils)
|
||||
(rnrs io ports)
|
||||
(srfi srfi-1)
|
||||
(srfi srfi-26))
|
||||
|
||||
(define module-dir
|
||||
(string-append #$linux "/lib/modules"))
|
||||
|
||||
(define builtin-modules
|
||||
(call-with-input-file
|
||||
(first (find-files module-dir "modules.builtin$"))
|
||||
(lambda (port)
|
||||
(map file-name->module-name
|
||||
(string-tokenize
|
||||
(get-string-all port))))))
|
||||
|
||||
(define modules-to-lookup
|
||||
(lset-difference string=? '#$modules builtin-modules))
|
||||
|
||||
(define modules
|
||||
(let* ((lookup (cut find-module-file module-dir <>))
|
||||
(modules (map lookup '#$modules)))
|
||||
(modules (map lookup modules-to-lookup)))
|
||||
(append modules
|
||||
(recursive-module-dependencies
|
||||
modules
|
||||
|
|
Loading…
Reference in a new issue