From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: *** GUIX SYSTEM DISK-IMAGE HANGS PINEBOOK PRO *** Date: Thu, 14 Nov 2019 11:13:21 +0200 Message-ID: <20191114091321.GC969@E5400> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="W5WqUoFLvi1M7tJE" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:58257) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVBCN-0005dX-FA for help-guix@gnu.org; Thu, 14 Nov 2019 04:13:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVBCM-00061u-8M for help-guix@gnu.org; Thu, 14 Nov 2019 04:13:55 -0500 Received: from flashner.co.il ([178.62.234.194]:45822) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iVBCL-00061h-Uz for help-guix@gnu.org; Thu, 14 Nov 2019 04:13:54 -0500 Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Brian Woodcox Cc: help-guix@gnu.org --W5WqUoFLvi1M7tJE Content-Type: multipart/mixed; boundary="XWOWbaMNXpFDWE00" Content-Disposition: inline --XWOWbaMNXpFDWE00 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I didn't have much luck when I tried to build for my pine64. Also with similar issues. I'll share the diff I have but mine hung at the same place, when it was using QEMU to build the image. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --XWOWbaMNXpFDWE00 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="aarch64-vm.diff" Content-Transfer-Encoding: quoted-printable diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm index a5d9fefa62..aa2418f495 100644 --- a/gnu/build/vm.scm +++ b/gnu/build/vm.scm @@ -30,6 +30,7 @@ #:use-module (gnu build install) #:use-module (gnu system uuid) #:use-module (guix records) + #:use-module (guix utils) #:use-module ((guix combinators) #:select (fold2)) #:use-module (ice-9 format) #:use-module (ice-9 match) @@ -81,6 +82,7 @@ linux initrd make-disk-image? single-file-output? + target-arm? target-arm32? (disk-image-size (* 100 (expt 2 20))) (disk-image-format "qcow2") @@ -100,14 +102,16 @@ the #:references-graphs parameter of 'derivation'." (define arch-specific-flags `(;; On ARM, a machine has to be specified. Use "virt" machine to avoid ;; hardware limits imposed by other machines. - ,@(if target-arm32? '("-M" "virt") '()) + ;,@(if target-arm? '("-M" "virt") '()) + "-M" "virt" =20 ;; Only enable kvm if we see /dev/kvm exists. This allows users wit= hout ;; hardware virtualization to still use these commands. KVM support= is ;; still buggy on some ARM32 boards. Do not use it even if available. ,@(if (and (file-exists? "/dev/kvm") - (not target-arm32?)) - '("-enable-kvm") + (not target-arm?)) + ;'("-enable-kvm") + '() '()) =20 ;; Pass "panic=3D1" so that the guest dies upon error. @@ -117,11 +121,11 @@ the #:references-graphs parameter of 'derivation'." ;; The serial port name differs between emulated ;; architectures/machines. " console=3D" - (if target-arm32? "ttyAMA0" "ttyS0")) + (if target-arm? "ttyAMA0" "ttyS0")) =20 ;; NIC is not supported on ARM "virt" machine, so use a user mode ;; network stack instead. - ,@(if target-arm32? + ,@(if target-arm? '("-device" "virtio-net-pci,netdev=3Dmynet" "-netdev" "user,id=3Dmynet") '("-net" "nic,model=3Dvirtio")))) diff --git a/guix/utils.scm b/guix/utils.scm index 1f99c5b3f5..c1eeff7b07 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -78,6 +78,7 @@ package-name->name+version target-mingw? target-arm32? + target-arm? target-64bit? version-compare version>? @@ -494,6 +495,10 @@ a character other than '@'." (define (target-arm32?) (string-prefix? "arm" (or (%current-target-system) (%current-system)))) =20 +(define (target-arm?) + (let ((system (or (%current-target-system) (%current-system)))) + (any (cut string-prefix? <> system) '("armhf" "aarch64")))) + (define (target-64bit?) (let ((system (or (%current-target-system) (%current-system)))) (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "ppc= 64")))) --XWOWbaMNXpFDWE00-- --W5WqUoFLvi1M7tJE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl3NGq4ACgkQQarn3Mo9 g1EC+g/+MHKVBuoPNZk+1NlXToKSPXItBQ73YOBfI6HXiLwbzmmH3MqpuNTZ/mGJ hXzrJVNy2C1vTRlbSnDMk+vsU+r7Fd5iYovqeV8iJ3a+XYCaRJzH+ggKk+guXbKG EOAqJ+3SE3QYRmmRAltSiPitgQUBLiw7VgWXNqIq7yB15iQaCxZ6b1rLxh3BvCCn jbuuwJlchjayLlTGXFJ+eN0NOEIjmKVdnffo8UGwCPlxU/jWbDAtVwLqwkAuhdwl oxW1Iczuxrky/wzuo2GYI06jpSnT6v+/Yv2zaDE6etWJ5HUTxzXg86U5moIk6lIZ 4DYiGKhL5YDm8xxYpVR6M8DNWfv6frnNWufrSFga2l+fApIAmVA6WFQCu6KZjf1e A2LFh5KCbXtm5Dilnd/fmadmSonG0vwYtkuJKc18jMDk+4PLl53JtLYc8afI2fWz lLoZbyuBbp50etT/983SnKCee4Z8nPmURkGoznPgrIHk95EJNbI2pem+IvHt0uWS U+ZuFJVe6+C88KQ6GpHWgulIqedfkoHGRK9hGTuJJHmNj6HZP+4woF+roFvspxbW W8ohfPhB5QJFa1RAQ75Ph4GFPIsE8swfklozm+Vl/V+GMTokph2FxLm/zQjrwL4Y koSI1LF5/Op88aZLSmHfgqgXV3RHZMAPpK93yz85GC3mauibPaw= =+45D -----END PGP SIGNATURE----- --W5WqUoFLvi1M7tJE--