From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKiiq-0002In-KT for guix-patches@gnu.org; Fri, 01 Dec 2017 05:39:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKiik-0006Bf-OK for guix-patches@gnu.org; Fri, 01 Dec 2017 05:39:08 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:58660) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eKiik-0006BI-K4 for guix-patches@gnu.org; Fri, 01 Dec 2017 05:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eKiik-0000pm-El for guix-patches@gnu.org; Fri, 01 Dec 2017 05:39:02 -0500 Subject: [bug#29409] [PATCH] system: vm: Do not add EFI partition on ARM system. Resent-Message-ID: From: m.othacehe@gmail.com Date: Fri, 1 Dec 2017 11:38:40 +0100 Message-Id: <1512124720-29980-2-git-send-email-m.othacehe@gmail.com> In-Reply-To: <1512124720-29980-1-git-send-email-m.othacehe@gmail.com> References: <1512124720-29980-1-git-send-email-m.othacehe@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 29409@debbugs.gnu.org From: Mathieu Othacehe * gnu/system/vm.scm (qemu-img): Do not add EFI partition if we are targetting ARM. UEFI support on u-boot is still experimental, so do not add EFI partition on ARM for now. --- gnu/system/vm.scm | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index a5fe48e..b7a0e45 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -29,6 +29,7 @@ #:use-module (guix monads) #:use-module (guix records) #:use-module (guix modules) + #:use-module (guix utils) #:use-module ((gnu build vm) #:select (qemu-command)) @@ -312,26 +313,30 @@ the image." graphs))) (- disk-image-size (* 50 (expt 2 20))))) - (partitions (list (partition - (size root-size) - (label #$file-system-label) - (uuid #$(and=> file-system-uuid - uuid-bytevector)) - (file-system #$file-system-type) - (flags '(boot)) - (initializer initialize)) - ;; Append a small EFI System Partition for - ;; use with UEFI bootloaders. - (partition - ;; The standalone grub image is about 10MiB, but - ;; leave some room for custom or multiple images. - (size (* 40 (expt 2 20))) - (label "GNU-ESP") ;cosmetic only - ;; Use "vfat" here since this property is used - ;; when mounting. The actual FAT-ness is based - ;; on filesystem size (16 in this case). - (file-system "vfat") - (flags '(esp)))))) + (partitions + (append + (list (partition + (size root-size) + (label #$file-system-label) + (uuid #$(and=> file-system-uuid + uuid-bytevector)) + (file-system #$file-system-type) + (flags '(boot)) + (initializer initialize))) + ;; Append a small EFI System Partition for use with UEFI + ;; bootloaders if we are not targetting ARM. + (if #$(target-arm32?) + '() + (list (partition + ;; The standalone grub image is about 10MiB, but + ;; leave some room for custom or multiple images. + (size (* 40 (expt 2 20))) + (label "GNU-ESP") ;cosmetic only + ;; Use "vfat" here since this property is used + ;; when mounting. The actual FAT-ness is based + ;; on filesystem size (16 in this case). + (file-system "vfat") + (flags '(esp)))))))) (initialize-hard-disk "/dev/vda" #:partitions partitions #:grub-efi #$grub-efi -- 2.7.4