mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
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>
This commit is contained in:
parent
0823fd1aa9
commit
ad9d0f8e58
1 changed files with 11 additions and 9 deletions
|
@ -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 @@ (define* (make-linux-libre* version gnu-revision source supported-systems
|
|||
(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 @@ (define* (make-linux-libre* version gnu-revision source supported-systems
|
|||
(%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 @@ (define* (make-linux-libre* version gnu-revision source supported-systems
|
|||
(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.
|
||||
|
|
Loading…
Reference in a new issue