[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#70962] [PATCH 10/14] gnu: make-linux-libre*: Run install targets in
From: |
Maxim Cournoyer |
Subject: |
[bug#70962] [PATCH 10/14] gnu: make-linux-libre*: Run install targets in parallel. |
Date: |
Wed, 15 May 2024 12:57:20 -0400 |
This reduces the total build time by about 20%.
* gnu/packages/linux.scm (make-linux-libre*) [phases] {install}: Ensure that
-jN is used for the install targets. Also honor make flags.
Change-Id: Ib3f4fdcbdeab736315a91eafa8d6d1dff5b89884
---
gnu/packages/linux.scm | 41 ++++++++++++++++++++++++-----------------
1 file changed, 24 insertions(+), 17 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 5386a263cd..4547ab525f 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1049,9 +1049,15 @@ (define* (make-linux-libre* version gnu-revision source
supported-systems
(close-port port))
(invoke "make" "oldconfig"))))
(replace 'install
- (lambda _
+ (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
(let ((moddir (string-append #$output "/lib/modules"))
- (dtbdir (string-append #$output "/lib/dtbs")))
+ (dtbdir (string-append #$output "/lib/dtbs"))
+ (make-flags
+ (append make-flags
+ (list "-j"
+ (if parallel-build?
+ (number->string (parallel-job-count))
+ "1")))))
;; Install kernel image, kernel configuration and link map.
(for-each (lambda (file) (install-file file #$output))
(find-files "." "^(\\.config|bzImage|zImage|Image\
@@ -1059,22 +1065,23 @@ (define* (make-linux-libre* version gnu-revision source
supported-systems
;; Install device tree files
(unless (null? (find-files "." "\\.dtb$"))
(mkdir-p dtbdir)
- (invoke "make" (string-append "INSTALL_DTBS_PATH=" dtbdir)
- "dtbs_install"))
+ (apply invoke "make"
+ (string-append "INSTALL_DTBS_PATH=" dtbdir)
+ "dtbs_install" make-flags))
;; Install kernel modules
(mkdir-p moddir)
- (invoke "make"
- ;; Disable depmod because the Guix system's module
- ;; directory is an union of potentially multiple
- ;; packages. It is not possible to use depmod to
- ;; usefully calculate a dependency graph while
- ;; building only one of them.
- "DEPMOD=true"
- (string-append "MODULE_DIR=" moddir)
- (string-append "INSTALL_PATH=" #$output)
- (string-append "INSTALL_MOD_PATH=" #$output)
- "INSTALL_MOD_STRIP=1"
- "modules_install")
+ (apply invoke "make"
+ ;; Disable depmod because the Guix system's module
+ ;; directory is an union of potentially multiple
+ ;; packages. It is not possible to use depmod to
+ ;; usefully calculate a dependency graph while building
+ ;; only one of them.
+ "DEPMOD=true"
+ (string-append "MODULE_DIR=" moddir)
+ (string-append "INSTALL_PATH=" #$output)
+ (string-append "INSTALL_MOD_PATH=" #$output)
+ "INSTALL_MOD_STRIP=1"
+ "modules_install" make-flags)
(let* ((versions (filter (lambda (name)
(not (string-prefix? "." name)))
(scandir moddir)))
@@ -1096,7 +1103,7 @@ (define* (make-linux-libre* version gnu-revision source
supported-systems
elfutils ;needed to enable CONFIG_STACK_VALIDATION
flex
bison
- util-linux ;needed for hexdump
+ util-linux ;needed for hexdump
;; These are needed to compile the GCC plugins.
gmp
mpfr
--
2.41.0
- [bug#70962] [PATCH 01/14] gnu: grpc: Modernize., Maxim Cournoyer, 2024/05/15
- [bug#70962] [PATCH 03/14] gnu: Add valijson., Maxim Cournoyer, 2024/05/15
- [bug#70962] [PATCH 02/14] gnu: grpc: Propagate abseil-cpp-cxxstd11., Maxim Cournoyer, 2024/05/15
- [bug#70962] [PATCH 05/14] gnu: libbpf: Update to 1.4.1., Maxim Cournoyer, 2024/05/15
- [bug#70962] [PATCH 08/14] gnu: Add dwarves., Maxim Cournoyer, 2024/05/15
- [bug#70962] [PATCH 12/14] gnu: linux-libre: Enable BTF debug info., Maxim Cournoyer, 2024/05/15
- [bug#70962] [PATCH 10/14] gnu: make-linux-libre*: Run install targets in parallel.,
Maxim Cournoyer <=
- [bug#70962] [PATCH 07/14] gnu: Add sysdig., Maxim Cournoyer, 2024/05/15
- [bug#70962] [PATCH 04/14] gnu: libbpf: Use gexps., Maxim Cournoyer, 2024/05/15
- [bug#70962] [PATCH 14/14] gnu: linux-libre-with-bpf: Deprecate in favor of linux-libre., Maxim Cournoyer, 2024/05/15
- [bug#70962] [PATCH 06/14] gnu: Add falcosecurity-libs., Maxim Cournoyer, 2024/05/15
- [bug#70962] [PATCH 13/14] gnu: linux-libre: Enable Zstd compression of kernel modules., Maxim Cournoyer, 2024/05/15
- [bug#70962] [PATCH 11/14] gnu: linux: Turn %default-extra-linux-options into a procedure., Maxim Cournoyer, 2024/05/15
- [bug#70962] [PATCH 09/14] gnu: make-linux-libre*: Set KBUILD_BUILD_VERSION for reproducibility., Maxim Cournoyer, 2024/05/15