unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: Brian Woodcox <bw@inskydata.com>
Cc: help-guix@gnu.org
Subject: Re: *** GUIX SYSTEM DISK-IMAGE HANGS PINEBOOK PRO ***
Date: Thu, 14 Nov 2019 11:13:21 +0200	[thread overview]
Message-ID: <20191114091321.GC969@E5400> (raw)
In-Reply-To: <E876FF8E-E1E6-4A6B-A15E-12C431F22633@inskydata.com>


[-- Attachment #1.1: Type: text/plain, Size: 406 bytes --]

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.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #1.2: aarch64-vm.diff --]
[-- Type: text/plain, Size: 3166 bytes --]

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"
 
       ;; Only enable kvm if we see /dev/kvm exists.  This allows users without
       ;; 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")
+            '()
             '())
 
       ;; Pass "panic=1" 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="
-                      (if target-arm32? "ttyAMA0" "ttyS0"))
+                      (if target-arm? "ttyAMA0" "ttyS0"))
 
       ;; 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=mynet"
               "-netdev" "user,id=mynet")
             '("-net" "nic,model=virtio"))))
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))))
 
+(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" "ppc64"))))

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2019-11-14  9:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 22:57 *** GUIX SYSTEM DISK-IMAGE HANGS PINEBOOK PRO *** Brian Woodcox
2019-11-14  0:19 ` x
2019-11-14  4:49   ` Brian Woodcox
2019-11-14  9:13 ` Efraim Flashner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191114091321.GC969@E5400 \
    --to=efraim@flashner.co.il \
    --cc=bw@inskydata.com \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).