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.
This commit is contained in:
parent
fc649d0aad
commit
440a3143f0
|
@ -315,7 +315,7 @@ GCC that does not target a libc; otherwise, target that libc."
|
||||||
(setenv "ARCH" ,(system->linux-architecture target))
|
(setenv "ARCH" ,(system->linux-architecture target))
|
||||||
(format #t "`ARCH' set to `~a' (cross compiling)~%" (getenv "ARCH"))
|
(format #t "`ARCH' set to `~a' (cross compiling)~%" (getenv "ARCH"))
|
||||||
|
|
||||||
(and (zero? (system* "make" "defconfig"))
|
(and (zero? (system* "make" ,(system->defconfig target)))
|
||||||
(zero? (system* "make" "mrproper" "headers_check"))))
|
(zero? (system* "make" "mrproper" "headers_check"))))
|
||||||
,phases))))
|
,phases))))
|
||||||
(native-inputs `(("cross-gcc" ,xgcc)
|
(native-inputs `(("cross-gcc" ,xgcc)
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
|
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
|
||||||
;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
|
;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
|
||||||
;;; Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
|
;;; 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.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -98,6 +99,13 @@
|
||||||
((string-prefix? "aarch64" arch) "arm64")
|
((string-prefix? "aarch64" arch) "arm64")
|
||||||
(else arch))))
|
(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)
|
(define (linux-libre-urls version)
|
||||||
"Return a list of URLs for Linux-Libre VERSION."
|
"Return a list of URLs for Linux-Libre VERSION."
|
||||||
(list (string-append
|
(list (string-append
|
||||||
|
@ -137,11 +145,13 @@
|
||||||
(lambda _
|
(lambda _
|
||||||
(let ((arch ,(system->linux-architecture
|
(let ((arch ,(system->linux-architecture
|
||||||
(or (%current-target-system)
|
(or (%current-target-system)
|
||||||
(%current-system)))))
|
(%current-system))))
|
||||||
|
(defconfig ,(system->defconfig
|
||||||
|
(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"))
|
||||||
|
(and (zero? (system* "make" defconfig))
|
||||||
(and (zero? (system* "make" "defconfig"))
|
|
||||||
(zero? (system* "make" "mrproper" "headers_check"))))))
|
(zero? (system* "make" "mrproper" "headers_check"))))))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
|
Loading…
Reference in New Issue