all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* *** GUIX SYSTEM DISK-IMAGE HANGS PINEBOOK PRO ***
@ 2019-11-13 22:57 Brian Woodcox
  2019-11-14  0:19 ` x
  2019-11-14  9:13 ` Efraim Flashner
  0 siblings, 2 replies; 4+ messages in thread
From: Brian Woodcox @ 2019-11-13 22:57 UTC (permalink / raw)
  To: help-guix

I am using a Pinebook Pro (aarch64) to build a disk image.  However the build process stops very quickly when it gets to the ...-disk-image.drv...

The guix --version is guix (GNU Guix) d673993...1ce0f20 

The command that I am issuing is:

guix system disk-image -e "(@ (gnu system install) rockpro64-installation-os)"

I did not add --system=aarch64-linux as that should be implicit, since I am running this on an aarch64 system.

Also target-arm32 is required, so I had to edit the guix/utils.scm file so that would be set as true as follows (this is just an ugly hack):

(define (target-arm32?)
  (string-prefix? "aarch" (or (%current-target-system) (%current-system))))

Using strace on the command does not yield any obvious error.

building /gnu/store/qhc1l9kl9ly864r7vzpwfkql3fwa1dmp-system.drv...
building /gnu/store/587bzj89p3xrylishwvv3qcgmz9qliym-shepherd.conf.drv...
building /gnu/store/3wn68s1vs4l11jxs68k35dbzhi89ixb9-gc-roots.drv...
building /gnu/store/q1fidshxfja4a3np3mzwz9c3bih0s722-boot.drv...
building /gnu/store/7qn53w2sdrh2vfaykaaklgzv4qh68xqx-system.drv...
building /gnu/store/i6b2h9l9mv2ckdgcqmszwg647x9v3jlh-extlinux.conf.drv...
building /gnu/store/v7nhck2b7i9djf0fnk61lvgl3p4ff2gy-builder-in-linux-vm.drv...
building /gnu/store/jfqr107g0icghv07y3fii0i8afddbj9j-linux-vm-loader.drv...
building /gnu/store/wvk6gkbn3894dfwbb0y7nnnzrhljp3i0-disk-image.drv...
\ ^C

If anyone knows what the issue is, or how I could debug it, I would be happy to hear it.

Thanks.

Brian.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: *** GUIX SYSTEM DISK-IMAGE HANGS PINEBOOK PRO ***
  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
  1 sibling, 1 reply; 4+ messages in thread
From: x @ 2019-11-14  0:19 UTC (permalink / raw)
  To: help-guix, bw

I had a similar issue building a disk-image. It was on an x86 machine, and the
build would error out right at that point. The fix was to put add my user to
the 'kvm' group.

From looking at top during the build, it seems that the disk-image derivation
is doing something with qemu. Is there even ARM support in the KVM? I am
illiterate on that kind of thing, but hopefully this gives you a lead.

Brian Woodcox <bw@inskydata.com> wrote:

> I am using a Pinebook Pro (aarch64) to build a disk image.  However the build process stops very quickly when it gets to the ...-disk-image.drv...
>
> The guix --version is guix (GNU Guix) d673993...1ce0f20 
>
> The command that I am issuing is:
>
> guix system disk-image -e "(@ (gnu system install) rockpro64-installation-os)"
>
> I did not add --system=aarch64-linux as that should be implicit, since I am running this on an aarch64 system.
>
> Also target-arm32 is required, so I had to edit the guix/utils.scm file so that would be set as true as follows (this is just an ugly hack):
>
> (define (target-arm32?)
>   (string-prefix? "aarch" (or (%current-target-system) (%current-system))))
>
> Using strace on the command does not yield any obvious error.
>
> building /gnu/store/qhc1l9kl9ly864r7vzpwfkql3fwa1dmp-system.drv...
> building /gnu/store/587bzj89p3xrylishwvv3qcgmz9qliym-shepherd.conf.drv...
> building /gnu/store/3wn68s1vs4l11jxs68k35dbzhi89ixb9-gc-roots.drv...
> building /gnu/store/q1fidshxfja4a3np3mzwz9c3bih0s722-boot.drv...
> building /gnu/store/7qn53w2sdrh2vfaykaaklgzv4qh68xqx-system.drv...
> building /gnu/store/i6b2h9l9mv2ckdgcqmszwg647x9v3jlh-extlinux.conf.drv...
> building /gnu/store/v7nhck2b7i9djf0fnk61lvgl3p4ff2gy-builder-in-linux-vm.drv...
> building /gnu/store/jfqr107g0icghv07y3fii0i8afddbj9j-linux-vm-loader.drv...
> building /gnu/store/wvk6gkbn3894dfwbb0y7nnnzrhljp3i0-disk-image.drv...
> \ ^C
>
> If anyone knows what the issue is, or how I could debug it, I would be happy to hear it.
>
> Thanks.
>
> Brian.
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: *** GUIX SYSTEM DISK-IMAGE HANGS PINEBOOK PRO ***
  2019-11-14  0:19 ` x
@ 2019-11-14  4:49   ` Brian Woodcox
  0 siblings, 0 replies; 4+ messages in thread
From: Brian Woodcox @ 2019-11-14  4:49 UTC (permalink / raw)
  To: x; +Cc: help-guix

Thanks for the tip.  Unfortunately the gnu/build/vm.scm file explicitly states that it is buggy on ARM32 boards and should not be used, even if available.  I would assume that would be the case for aarch64 as well.

> On Nov 13, 2019, at 5:19 PM, x@wilsonb.com wrote:
> 
> I had a similar issue building a disk-image. It was on an x86 machine, and the
> build would error out right at that point. The fix was to put add my user to
> the 'kvm' group.
> 
> From looking at top during the build, it seems that the disk-image derivation
> is doing something with qemu. Is there even ARM support in the KVM? I am
> illiterate on that kind of thing, but hopefully this gives you a lead.
> 
> Brian Woodcox <bw@inskydata.com> wrote:
> 
>> I am using a Pinebook Pro (aarch64) to build a disk image.  However the build process stops very quickly when it gets to the ...-disk-image.drv...
>> 
>> The guix --version is guix (GNU Guix) d673993...1ce0f20 
>> 
>> The command that I am issuing is:
>> 
>> guix system disk-image -e "(@ (gnu system install) rockpro64-installation-os)"
>> 
>> I did not add --system=aarch64-linux as that should be implicit, since I am running this on an aarch64 system.
>> 
>> Also target-arm32 is required, so I had to edit the guix/utils.scm file so that would be set as true as follows (this is just an ugly hack):
>> 
>> (define (target-arm32?)
>>  (string-prefix? "aarch" (or (%current-target-system) (%current-system))))
>> 
>> Using strace on the command does not yield any obvious error.
>> 
>> building /gnu/store/qhc1l9kl9ly864r7vzpwfkql3fwa1dmp-system.drv...
>> building /gnu/store/587bzj89p3xrylishwvv3qcgmz9qliym-shepherd.conf.drv...
>> building /gnu/store/3wn68s1vs4l11jxs68k35dbzhi89ixb9-gc-roots.drv...
>> building /gnu/store/q1fidshxfja4a3np3mzwz9c3bih0s722-boot.drv...
>> building /gnu/store/7qn53w2sdrh2vfaykaaklgzv4qh68xqx-system.drv...
>> building /gnu/store/i6b2h9l9mv2ckdgcqmszwg647x9v3jlh-extlinux.conf.drv...
>> building /gnu/store/v7nhck2b7i9djf0fnk61lvgl3p4ff2gy-builder-in-linux-vm.drv...
>> building /gnu/store/jfqr107g0icghv07y3fii0i8afddbj9j-linux-vm-loader.drv...
>> building /gnu/store/wvk6gkbn3894dfwbb0y7nnnzrhljp3i0-disk-image.drv...
>> \ ^C
>> 
>> If anyone knows what the issue is, or how I could debug it, I would be happy to hear it.
>> 
>> Thanks.
>> 
>> Brian.
>> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: *** GUIX SYSTEM DISK-IMAGE HANGS PINEBOOK PRO ***
  2019-11-13 22:57 *** GUIX SYSTEM DISK-IMAGE HANGS PINEBOOK PRO *** Brian Woodcox
  2019-11-14  0:19 ` x
@ 2019-11-14  9:13 ` Efraim Flashner
  1 sibling, 0 replies; 4+ messages in thread
From: Efraim Flashner @ 2019-11-14  9:13 UTC (permalink / raw)
  To: Brian Woodcox; +Cc: help-guix


[-- 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 --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-14  9:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.