hypriot / qemu-register

Docker Image to register Qemu interpreters for ARMHF/AARCH64/PPC64LE/Risc-V in Docker Host w/ Linux Kernel 4.8+
MIT License
61 stars 18 forks source link

RISC-V qemu support #6

Closed daxmc99 closed 4 years ago

daxmc99 commented 4 years ago

It appears as though RISC-V is supported by QEMU.

https://wiki.qemu.org/Documentation/Platforms/RISCV

Would it be possible to add support in this docker image?

DieterReuter commented 4 years ago

Why not just give it a try and file a PR, can you do it?

daxmc99 commented 4 years ago

More than happy to add it. I'm very new to QEMU though. Would you mind explaining what these magical strings do? https://github.com/hypriot/qemu-register/blob/master/register.sh#L33

StefanScherer commented 4 years ago

Maybe this https://github.com/docker/binfmt/commit/86203db3c914c9c828e420e5632bff611cf0a02c helps a bit.

daxmc99 commented 4 years ago
docker run --rm hypriot/qemu-register sh -c 'ls -al /qemu*'
-rwxr-xr-x    1 root     staff      6292296 Feb  6 21:17 /qemu-aarch64
-rwxr-xr-x    1 root     staff      5702696 Feb  6 21:17 /qemu-arm
-rwxr-xr-x    1 root     staff      5984808 Feb  6 21:17 /qemu-ppc64le
-rwxr-xr-x    1 root     staff      5115848 Feb  6 21:17 /qemu-riscv64

I am able to get this far but when I go run

docker run --rm --privileged hypriot/qemu-register
sh: write error: No such file or directory

I am running this on mac though. Not sure how that might affect this

EDIT: Whoops, fat finger in the qemu magic string.

daxmc99 commented 4 years ago

PR is up here https://github.com/hypriot/qemu-register/pull/7