all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Adding riscv64 support to qemu-binfmt-service
@ 2019-06-06 19:50 Vagrant Cascadian
  2019-06-11 10:25 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Vagrant Cascadian @ 2019-06-06 19:50 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 2819 bytes --]

I've been trying to get riscv64 support added to qemu-binfmt-service,
but it doesn't appear to work....

I can successfully guix system reconfigure, with the following in my
config.scm:

  (services (cons* (service dhcp-client-service-type)
                   (service qemu-binfmt-service-type
                            (qemu-binfmt-configuration
                             (platforms (lookup-qemu-platforms
                                         "arm"
                                         "aarch64"
                                         "riscv64"
                                         ))
                             ;; (guix-support? #t)
                             ))

But it doesn't appear to register the qemu-riscv64 interpreter, only
aarch64 and arm:

  $ ls /proc/sys/fs/binfmt_misc/
  qemu-aarch64  qemu-arm  register  status


I've tried with:

  (qemu-platform "riscv64" "riscv"

and:

  (qemu-platform "riscv" "riscv64"

and:

  (qemu-platform "riscv64" "riscv64"

All with no luck.


From f2f1b2b95adb8ee17181bc1b6178c39b65de89c9 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Wed, 5 Jun 2019 15:36:32 -0700
Subject: [PATCH] gnu: services: Add riscv64 to qemu-platforms.

* gnu/services/virtualization (%riscv64): Add file magic for riscv64.
  (%qemu-platforms): Add riscv64.
---
 gnu/services/virtualization.scm | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm
index 705ed84d06..a9ef81a2ac 100644
--- a/gnu/services/virtualization.scm
+++ b/gnu/services/virtualization.scm
@@ -645,10 +645,15 @@ potential infinite waits blocking libvirt."))
                  (bv "\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x0f")
                  (bv "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff")))
 
+(define %riscv64
+  (qemu-platform "riscv64" "riscv"
+                 (bv" \x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00")
+                 (bv "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff")))
+
 (define %qemu-platforms
   (list %i386 %i486 %alpha %arm %sparc32plus %ppc %ppc64 %ppc64le %m68k
         %mips %mipsel %mipsn32 %mipsn32el %mips64 %mips64el
-        %sh4 %sh4eb %s390x %aarch64 %hppa))
+        %sh4 %sh4eb %s390x %aarch64 %hppa %riscv64))
 
 (define (lookup-qemu-platforms . names)
   "Return the list of QEMU platforms that match NAMES--a list of names such as
-- 
2.21.0


Am I missing something obvious? There are definitions for many
architectures not yet available in guix, so I wouldn't think that's the
issue.


live well,
  vagrant

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

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

end of thread, other threads:[~2019-06-11 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-06 19:50 Adding riscv64 support to qemu-binfmt-service Vagrant Cascadian
2019-06-11 10:25 ` Ludovic Courtès
2019-06-11 15:54   ` Vagrant Cascadian

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.