[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/06: gnu: linux-libre: Add support for cross-compilation.
From: |
David Craven |
Subject: |
06/06: gnu: linux-libre: Add support for cross-compilation. |
Date: |
Tue, 13 Sep 2016 14:46:18 +0000 (UTC) |
dvc pushed a commit to branch master
in repository guix.
commit 4b42703ed551cd70dcc4dba3991c25737dd74f4a
Author: David Craven <address@hidden>
Date: Fri Sep 2 18:05:37 2016 +0200
gnu: linux-libre: Add support for cross-compilation.
* gnu/packages/linux.scm (linux-libre): Add support for
cross-compilation.
---
gnu/packages/linux.scm | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index cb374e4..8668175 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -291,17 +291,22 @@ for SYSTEM and optionally VARIANT, or #f if there is no
such configuration."
#:phases
(modify-phases %standard-phases
(replace 'configure
- (lambda* (#:key inputs #:allow-other-keys)
+ (lambda* (#:key inputs native-inputs target #:allow-other-keys)
;; Avoid introducing timestamps
(setenv "KCONFIG_NOTIMESTAMP" "1")
(setenv "KBUILD_BUILD_TIMESTAMP" (getenv "SOURCE_DATE_EPOCH"))
+ ;; Set ARCH and CROSS_COMPILE
(let ((arch ,(system->linux-architecture
(or (%current-target-system)
(%current-system)))))
- (setenv "ARCH" arch))
+ (setenv "ARCH" arch)
+ (format #t "`ARCH' set to `~a'~%" (getenv "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"))))
(let ((build (assoc-ref %standard-phases 'build))
(config (assoc-ref inputs "kconfig")))
@@ -334,10 +339,10 @@ for SYSTEM and optionally VARIANT, or #f if there is no
such configuration."
(zero? (system* "make" "oldconfig")))))
(replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
+ (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(moddir (string-append out "/lib/modules"))
- (mit (assoc-ref inputs "module-init-tools")))
+ (mit (assoc-ref (or native-inputs inputs)
"module-init-tools")))
(mkdir-p moddir)
(for-each (lambda (file)
(copy-file file
- branch master updated (89bcf3f -> 4b42703), David Craven, 2016/09/13
- 01/06: gnu: module-init-tools: Prevent line wrapping., David Craven, 2016/09/13
- 05/06: gnu: linux-libre: Move kernel configuration to configure phase., David Craven, 2016/09/13
- 02/06: gnu: linux-libre: Use modify-phases., David Craven, 2016/09/13
- 04/06: gnu: linux-libre: Apply %boot-logo patch in origin., David Craven, 2016/09/13
- 06/06: gnu: linux-libre: Add support for cross-compilation.,
David Craven <=
- 03/06: gnu: linux-libre: Use system->architecture., David Craven, 2016/09/13