From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Craven Subject: [PATCH 3/6] gnu: make-linux-libre: Install device tree files. Date: Mon, 26 Sep 2016 12:34:44 +0200 Message-ID: <20160926103447.31830-3-david@craven.ch> References: <20160926103447.31830-1-david@craven.ch> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boTFd-0001wN-55 for guix-devel@gnu.org; Mon, 26 Sep 2016 06:35:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boTFZ-0004Kd-Mp for guix-devel@gnu.org; Mon, 26 Sep 2016 06:35:08 -0400 Received: from so254-10.mailgun.net ([198.61.254.10]:33036) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boTFY-0004Et-Go for guix-devel@gnu.org; Mon, 26 Sep 2016 06:35:05 -0400 In-Reply-To: <20160926103447.31830-1-david@craven.ch> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * 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 d8d14d4..243a71c 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) -- 2.9.0