unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Vagrant Cascadian <vagrant@debian.org>
To: help-guix@gnu.org
Subject: Adding riscv64 support to qemu-binfmt-service
Date: Thu, 06 Jun 2019 12:50:49 -0700	[thread overview]
Message-ID: <87lfyeze5i.fsf@yucca> (raw)

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

             reply	other threads:[~2019-06-06 19:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06 19:50 Vagrant Cascadian [this message]
2019-06-11 10:25 ` Adding riscv64 support to qemu-binfmt-service Ludovic Courtès
2019-06-11 15:54   ` Vagrant Cascadian

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=87lfyeze5i.fsf@yucca \
    --to=vagrant@debian.org \
    --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).