From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Craven Subject: [PATCH 5/8] vm: Remove hard coded kernel file name. Date: Tue, 14 Feb 2017 16:28:31 +0100 Message-ID: <20170214152834.19651-7-david@craven.ch> References: <20170214152834.19651-1-david@craven.ch> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdf2g-0002I0-5d for guix-devel@gnu.org; Tue, 14 Feb 2017 10:29:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdf2c-0002Wf-PQ for guix-devel@gnu.org; Tue, 14 Feb 2017 10:29:22 -0500 Received: from so254-10.mailgun.net ([198.61.254.10]:26915) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cdf2c-0002UP-IG for guix-devel@gnu.org; Tue, 14 Feb 2017 10:29:18 -0500 In-Reply-To: <20170214152834.19651-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/system/vm.scm (system-qemu-image/shared-store-script, expression->derivation-in-linux-vm): Use operating-system-kernel-file and system-linux-image-file-name. * gnu/system.scm (system-linux-image-file-name): Add ARM. --- gnu/system.scm | 9 ++++++--- gnu/system/vm.scm | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index b1402d3e9..f702e6ecc 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -97,6 +97,8 @@ operating-system-locale-directory operating-system-boot-script + system-linux-image-file-name + boot-parameters boot-parameters? @@ -256,9 +258,10 @@ from the initrd." (define* (system-linux-image-file-name #:optional (system (%current-system))) "Return the basename of the kernel image file for SYSTEM." ;; FIXME: Evaluate the conditional based on the actual current system. - (if (string-prefix? "mips" (%current-system)) - "vmlinuz" - "bzImage")) + (cond + ((string-prefix? "arm" (%current-system)) "zImage") + ((string-prefix? "mips" (%current-system)) "vmlinuz") + (else "bzImage"))) (define (operating-system-kernel-file os) "Return an object representing the absolute file name of the kernel image of diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 8a35f7fbc..a7203d169 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -141,7 +141,8 @@ made available under the /xchg CIFS share." (gnu build vm)) (let ((inputs '#$(list qemu coreutils)) - (linux (string-append #$linux "/bzImage")) + (linux (string-append #$linux "/" + #$(system-linux-image-file-name))) (initrd (string-append #$initrd "/initrd")) (loader #$loader) (graphs '#$(match references-graphs @@ -487,7 +488,7 @@ exec " #$qemu "/bin/" #$(qemu-command (%current-system)) #$@(if full-boot? #~() - #~(" -kernel " #$(operating-system-kernel os) "/bzImage \ + #~(" -kernel " #$(operating-system-kernel-file os) " \ -initrd " #$os-drv "/initrd \ -append \"" #$(if graphic? "" "console=ttyS0 ") "--system=" #$os-drv " --load=" #$os-drv "/boot --root=/dev/vda1 " -- 2.11.1