guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/05: gnu: make-linux-libre: Install device tree files.


From: David Craven
Subject: 04/05: gnu: make-linux-libre: Install device tree files.
Date: Wed, 28 Sep 2016 10:40:23 +0000 (UTC)

dvc pushed a commit to branch master
in repository guix.

commit e4e9c0a083962a770ff4f56c69082cf4b7046a6c
Author: David Craven <address@hidden>
Date:   Mon Sep 26 12:10:21 2016 +0200

    gnu: make-linux-libre: Install device tree files.
    
    * gnu/packages/linux.scm (make-linux-libre): Install device tree files.
---
 gnu/packages/linux.scm |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 0891c74..0a8e2f3 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -263,8 +263,8 @@ for ARCH and optionally VARIANT, or #f if there is no such 
configuration."
              (let ((build  (assoc-ref %standard-phases 'build))
                    (config (assoc-ref inputs "kconfig")))
 
-               ;; Use the architecture-specific config if available, and
-               ;; 'defconfig' otherwise.
+               ;; Use a custom kernel configuration file or a default
+               ;; configuration file.
                (if config
                    (begin
                      (copy-file config ".config")
@@ -283,13 +283,16 @@ for ARCH and optionally VARIANT, or #f if there is no 
such configuration."
            (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
              (let* ((out    (assoc-ref outputs "out"))
                     (moddir (string-append out "/lib/modules"))
-                    (kmod    (assoc-ref (or native-inputs inputs) "kmod")))
+                    (dtbdir (string-append out "/lib/dtbs"))
+                    (kmod   (assoc-ref (or native-inputs inputs) "kmod")))
+               ;; Install kernel image, kernel configuration and link map.
+               (for-each (lambda (file) (install-file file out))
+                         (find-files "." 
"^(\\.config|bzImage|zImage|vmlinuz|System\\.map)$"))
+               ;; Install device tree files
+               (for-each (lambda (file) (install-file file dtbdir))
+                         (find-files "." "\\.dtb$"))
+               ;; Install kernel modules
                (mkdir-p moddir)
-               (for-each (lambda (file)
-                           (copy-file file
-                                      (string-append out "/" (basename file))))
-                         (find-files "." 
"^(bzImage|zImage|vmlinuz|System\\.map)$"))
-               (copy-file ".config" (string-append out "/config"))
                (zero? (system* "make"
                                (string-append "DEPMOD=" kmod "/bin/depmod")
                                (string-append "MODULE_DIR=" moddir)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]