From 2eb95ade8f08bfd418b1470f1093c5b4bf2332ee Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 29 Jun 2017 12:54:54 +0300 Subject: gnu: ovmf: Only build 32-bit firmware on i686-linux. * gnu/packages/firmware.scm (ovmf)[arguments]: Only when the build machine is x86_64-linux should the 64-bit firmware be built and installed. --- gnu/packages/firmware.scm | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 9106eec4ab..1da248001e 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2016 Eric Bavier ;;; Copyright © 2017 David Craven +;;; Copyright © 2017 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -275,13 +276,15 @@ (define-public ovmf (("^ACTIVE_PLATFORM[ ]*=.*$") "ACTIVE_PLATFORM = OvmfPkg/OvmfPkgIa32.dsc\n")) (zero? (system* "build")))) - (add-after 'build 'build-x64 - (lambda _ - (substitute* "Conf/target.txt" - (("^TARGET_ARCH[ ]*=.*$") "TARGET_ARCH = X64\n") - (("^ACTIVE_PLATFORM[ ]*=.*$") - "ACTIVE_PLATFORM = OvmfPkg/OvmfPkgX64.dsc\n")) - (zero? (system* "build")))) + ,@(if (string=? "x86_64-linux" (%current-system)) + '(add-after 'build 'build-x64 + (lambda _ + (substitute* "Conf/target.txt" + (("^TARGET_ARCH[ ]*=.*$") "TARGET_ARCH = X64\n") + (("^ACTIVE_PLATFORM[ ]*=.*$") + "ACTIVE_PLATFORM = OvmfPkg/OvmfPkgX64.dsc\n")) + (zero? (system* "build")))) + '()) (delete 'build) (replace 'install (lambda* (#:key outputs #:allow-other-keys) @@ -290,8 +293,10 @@ (define-public ovmf (mkdir-p fmw) (copy-file "Build/OvmfIa32/RELEASE_GCC49/FV/OVMF.fd" (string-append fmw "/ovmf_ia32.bin")) - (copy-file "Build/OvmfX64/RELEASE_GCC49/FV/OVMF.fd" - (string-append fmw "/ovmf_x64.bin"))) + ,@(if (string=? "x86_64-linux" (%current-system)) + '((copy-file "Build/OvmfX64/RELEASE_GCC49/FV/OVMF.fd" + (string-append fmw "/ovmf_x64.bin"))) + '())) #t))))) (supported-systems '("x86_64-linux" "i686-linux")) (home-page "http://www.tianocore.org") -- cgit v1.2.3