aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/linux.scm
diff options
context:
space:
mode:
authorCarlos Sánchez de La Lama <csanchezdll@gmail.com>2017-01-04 23:50:37 +0100
committerLudovic Courtès <ludo@gnu.org>2017-01-04 23:57:05 +0100
commit440a3143f01083649dedddc97a0d6108bb3d2920 (patch)
treeac7c97b5a933a34e01cb3e734d4dcb8c28068d78 /gnu/packages/linux.scm
parentfc649d0aada3d71de75ee6ca149bc8bbd045efd5 (diff)
downloadpatches-440a3143f01083649dedddc97a0d6108bb3d2920.tar
patches-440a3143f01083649dedddc97a0d6108bb3d2920.tar.gz
gnu: linux-libre: Adjust for PowerPC.
* gnu/packages/linux.scm (system->defconfig): New procedure. (linux-libre-headers)[arguments]: Use it in 'build' phase to determine the target name. * gnu/packages/cross-base.scm (cross-kernel-headers)[xlinux-headers] (arguments): Likewise.
Diffstat (limited to 'gnu/packages/linux.scm')
-rw-r--r--gnu/packages/linux.scm16
1 files changed, 13 insertions, 3 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a040aeb768..a0d86bb40e 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -17,6 +17,7 @@
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
+;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -98,6 +99,13 @@
((string-prefix? "aarch64" arch) "arm64")
(else arch))))
+(define-public (system->defconfig system)
+ "Some systems (notably powerpc-linux) require a special target for kernel
+defconfig. Return the appropiate make target if applicable, otherwise return
+\"defconfig\"."
+ (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig")
+ (else "defconfig")))
+
(define (linux-libre-urls version)
"Return a list of URLs for Linux-Libre VERSION."
(list (string-append
@@ -137,11 +145,13 @@
(lambda _
(let ((arch ,(system->linux-architecture
(or (%current-target-system)
- (%current-system)))))
+ (%current-system))))
+ (defconfig ,(system->defconfig
+ (or (%current-target-system)
+ (%current-system)))))
(setenv "ARCH" arch)
(format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
-
- (and (zero? (system* "make" "defconfig"))
+ (and (zero? (system* "make" defconfig))
(zero? (system* "make" "mrproper" "headers_check"))))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)