[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: gnu: linux: Fix the extra-version parameter in make-linux-libre*.
From: |
guix-commits |
Subject: |
01/02: gnu: linux: Fix the extra-version parameter in make-linux-libre*. |
Date: |
Thu, 1 Dec 2022 11:00:17 -0500 (EST) |
apteryx pushed a commit to branch master
in repository guix.
commit ad9d0f8e58414749d52c2eb2c6998a0926b74388
Author: Stefan <stefan-guix@vodafonemail.de>
AuthorDate: Wed Nov 30 19:53:12 2022 -0500
gnu: linux: Fix the extra-version parameter in make-linux-libre*.
* gnu/packages/linux.scm (make-linux-libre*)
[phases] {configure}: Remove now extraneous INPUTS argument and Move code
setting environment variables to...
{set-environment}: ... this new phase. Patch the Makefile to accept
EXTRAVERSION from the environment. Fix the usage of an empty extra-version
string.
{install}: Remove extraneous NATIVE-INPUTS argument.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
gnu/packages/linux.scm | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 8086980901..5dde319361 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -67,6 +67,7 @@
;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
;;; Copyright © 2022 Hunter Jozwiak <hunter.t.joz@gmail.com>
;;; Copyright © 2022 Hilton Chain <hako@ultrarare.space>
+;;; Copyright © 2022 Stefan <stefan-guix@vodafonemail.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -846,8 +847,8 @@ for ARCH and optionally VARIANT, or #f if there is no such
configuration."
(string-append "infodir=" #$output
"/share/info"))))))
#~())
- (replace 'configure
- (lambda* (#:key inputs target #:allow-other-keys)
+ (add-before 'configure 'set-environment
+ (lambda* (#:key target #:allow-other-keys)
;; Avoid introducing timestamps.
(setenv "KCONFIG_NOTIMESTAMP" "1")
(setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
@@ -863,18 +864,21 @@ for ARCH and optionally VARIANT, or #f if there is no
such configuration."
(%current-system))))))
(setenv "ARCH" arch)
(format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
-
(when target
(setenv "CROSS_COMPILE" (string-append target "-"))
(format #t "`CROSS_COMPILE' set to `~a'~%"
(getenv "CROSS_COMPILE"))))
+ ;; Allow EXTRAVERSION to be set via the environment.
+ (substitute* "Makefile"
+ (("^ *EXTRAVERSION[[:blank:]]*=")
+ "EXTRAVERSION ?="))
(setenv "EXTRAVERSION"
#$(and extra-version
- (string-append "-" extra-version)))
-
+ (string-append "-" extra-version)))))
+ (replace 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
(let ((config (assoc-ref inputs "kconfig")))
-
;; Use a custom kernel configuration file or a default
;; configuration file.
(if config
@@ -882,17 +886,15 @@ for ARCH and optionally VARIANT, or #f if there is no
such configuration."
(copy-file config ".config")
(chmod ".config" #o666))
(invoke "make" #$defconfig))
-
;; Appending works even when the option wasn't in the
;; file. The last one prevails if duplicated.
(let ((port (open-file ".config" "a"))
(extra-configuration #$(config->string extra-options)))
(display extra-configuration port)
(close-port port))
-
(invoke "make" "oldconfig"))))
(replace 'install
- (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (lambda* (#:key inputs #:allow-other-keys)
(let ((moddir (string-append #$output "/lib/modules"))
(dtbdir (string-append #$output "/lib/dtbs")))
;; Install kernel image, kernel configuration and link map.