Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

riscv architecture support? #19

Closed
olof-nord opened this issue Dec 12, 2021 · 5 comments · Fixed by #22
Closed

riscv architecture support? #19

olof-nord opened this issue Dec 12, 2021 · 5 comments · Fixed by #22

Comments

@olof-nord
Copy link
Contributor

olof-nord commented Dec 12, 2021

I am wondering if this project would like to support the riscv architecture.

RISC-V is an open standard instruction set architecture (ISA) based on established reduced instruction set computer (RISC) principles. Unlike most other ISA designs, the RISC-V ISA is provided under open source licenses that do not require fees to use. (from Wikipedia)

Golang supports cross-compiling risc-v already (GOARCH=riscv64/GOOS=linux), and looking into this project I think adding a new architecture would be quite achievable.

As an early riscv docker user, most if not all docker images does not support riscv yet, and being able to run this tool from a riscv docker system would be great to know what arch is supported and what is not.

@olof-nord
Copy link
Contributor Author

To clarify with supporting: to build and publish a docker image which can be executed on a riscv system.

Current image does not support linux/riscv:

$ docker run --rm mplatform/mquery debian:bullseye      
Unable to find image 'mplatform/mquery:latest' locally
latest: Pulling from mplatform/mquery
docker: no matching manifest for linux/riscv64 in the manifest list entries.
See 'docker run --help'.

@estesp
Copy link
Owner

estesp commented Dec 13, 2021

Looks like that was a pretty easy addition via #22; I'm going to test with a quick pre-release (that doesn't change the ":latest" tag for mquery) and probably will ask you to verify it since I don't have access to risc-v hardware :) Once we do that, then I can make a non-pre-release and it should work out of the box for risc-v.

@estesp
Copy link
Owner

estesp commented Dec 13, 2021

@olof-nord would you mind trying the v0.5.0-rc.0 image to make sure it works?

It shows that it should support riscv now:

$ ./mquery-linux-amd64 mplatform/mquery:v0.5.0-rc.0
Image: mplatform/mquery:v0.5.0-rc.0 (digest: sha256:56c902130c84951b157b43bc4ebf9b48e11a856adee214325d0df8cfbaa342c7)
 * Manifest List: Yes (Image type: application/vnd.docker.distribution.manifest.list.v2+json)
 * Supported platforms:
   - linux/ppc64le
   - linux/amd64
   - linux/386
   - linux/s390x
   - linux/riscv64
   - linux/arm64/v8
   - linux/arm/v7
   - linux/arm/v6
   - windows/amd64:10.0.17763.2300
   - windows/amd64:10.0.14393.4770

You should be able to verify on riscv by running:

$ {whateverruntime} run mplatform/mquery:v0.5.0-rc.0 {someotherimage}

@olof-nord
Copy link
Contributor Author

olof-nord commented Dec 13, 2021

Of course, and I can report success!

Many thanks for this, I really appreciate it.

➜  ~ uname -a                                                    
Linux c-3po 5.13.0-1006-generic #6-Ubuntu SMP Thu Nov 11 10:33:30 UTC 2021 riscv64 riscv64 riscv64 GNU/Linux
➜  ~ docker run --rm mplatform/mquery:v0.5.0-rc.0 debian:bullseye
Image: debian:bullseye (digest: sha256:45ee40a844048c2f6d0105899c1a17733530b56d481612608aab5e2e4048570b)
 * Manifest List: Yes (Image type: application/vnd.docker.distribution.manifest.list.v2+json)
 * Supported platforms:
   - linux/amd64
   - linux/arm/v5
   - linux/arm/v7
   - linux/arm64/v8
   - linux/386
   - linux/mips64le
   - linux/ppc64le
   - linux/s390x
➜  ~

@estesp
Copy link
Owner

estesp commented Dec 14, 2021

Great! I tagged v0.5.0 this morning and pushed, so now the default mplatform/mquery image has the riscv support included. Thanks for suggesting the update and testing it!

Release: https://github.com/estesp/mquery/releases/tag/v0.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants