Comments (15)
I think a similar project might support ARM architectures as a host architecture. I am not sure.
dbhi/qus
Yes, in dbhi/qus seven host architectures are supported with the Debian variant: amd64, i386, arm64v8, arm32v7, arm32v6, s390x and ppc64le. With the Fedora variant, only six are supported; arm32v6 is not.
For aarch64, the following images can be used:
- aptman/qus:arm64v8-d3.1
- aptman/qus:arm64v8-f4.0.0
To register any or all of the nine supported client architectures.
from qemu-user-static.
Thanks for the explanation! I love the metaphor 'inception'. We might also be living on QEMU ? :-)
from qemu-user-static.
Yes, everything is executed in Travis. The most important feature of dbhi/qus is that everything is public. There is no step at all that maintainers need to do offline.
It is a x86_64 host, but the project is about executing foreign arcuitectures, so we use it as a kind of 'inception'. For example, to build the aarch64 host image:
- Download qemu-user-static package for x86 hosts and extract the binary for aarch64 targets only.
- Register the binary for aarch64-on-amd64 in the host (Travis VM), either using the register script or a previous version of the images.
- Download qemu-user-static package for aarch64 hosts and extract the binaries for all the targets.
- Execute/build an image based on arm64v8/busybox and copy all the *arch-on-aarch64 binaries in it.
- Push image aptman/qus:VERSION-aarch64 to dockerhub. The same image is also tagged aptman/qus:aarch64.
- aptman/qus is just a manifest that 'redirects' to all the host images. So, when on aarch64, the image built in the previous step is downloaded when aptman/qus is used.
All of it is defined in the travis.yml file and in the run.sh script. Precisely, images are built in the first stage: https://github.com/dbhi/qus/blob/master/.travis.yml#L45-L70. As you see, there are two jobs, one for images based on binaries provided by Debian and another one for images based on binaries provided by Fedora. You can focus on the latter only: https://travis-ci.com/dbhi/qus/jobs/224057179. The 'block' corresponding to each host is shown in magenta, and the steps in each of them have blue headers. All of it is triggered with run.sh -a
: https://github.com/dbhi/qus/blob/master/run.sh#L641-L658.
Hope this is useful to you! Do not hesitate to ask further questions.
from qemu-user-static.
@moul in this project's case, shall we use Travis (arch: arm64
) for aarch64 pipeline for now?
from qemu-user-static.
@umarcor thanks for the sharing!
How are you building the each host arch's aptman/qus
container image? Because Travis CI is x86_64 host. Maybe is it executed through the .travis.yml pipe line?
from qemu-user-static.
@umarcor thank you! It's very helpful! I will try to understand, taking a look at the source code!
from qemu-user-static.
Good news. Travis started supporting ARM 64-bit.
https://blog.travis-ci.com/2019-10-07-multi-cpu-architecture-support
from qemu-user-static.
But I also love Drone CI supporting ARM 64/32-bit.
Ref: https://bugs.ruby-lang.org/issues/16234
from qemu-user-static.
@umarcor I am reading qus
source code again as I have a time now. I am very slow to do it :-)
Register the binary for aarch64-on-amd64 in the host (Travis VM), either using the register script or a previous version of the images.
It seems this logic is run.sh - do_register
function.
Execute/build an image based on arm64v8/busybox and copy all the *arch-on-aarch64 binaries in it.
I see you are building qus arch container on qemu.
It's really great.
from qemu-user-static.
First off, note that GitHub Actions are used now, apart from Travis: https://github.com/dbhi/qus/blob/master/docs/dev.md
It seems this logic is
run.sh - do_register
function.
do_register
is used during tests. When building docker images getAndRegisterSingleQemuUserStatic
is used instead. The difference is that do_register
uses either docker images or binaries from https://github.com/dbhi/qus/releases. However, getAndRegisterSingleQemuUserStatic
uses binaries from http://ftp.debian.org/debian/pool/main/q/qemu/qemu-user-static_*
or https://kojipkgs.fedoraproject.org/packages/qemu/*
.
I see you are building qus arch container on qemu.
It's really great.
Yes. getAndRegisterSingleQemuUserStatic
is used to extract 'target_host_arch on amd64' QEMU binaries, apart from 'all_target_client_arch on target_host_arch' binaries (which are the ones copied into the image). That's why I said that it is some kind of 'inception'.
from qemu-user-static.
For you information. Apple announced the own ARM based CPU 2 days ago. Supporting aarch64 as a host architecture is more important than ever.
https://www.apple.com/mac/m1/
https://www.theverge.com/2020/11/10/21550892/apple-arm-silicon-event-macbook-air-pro-mini-mac-big-sur-biggest-announcements
from qemu-user-static.
Be aware that QEMU's scripts might not support running 32 bit ARM binaries on aarch64-only devices (yet). See dbhi/qus#4.
from qemu-user-static.
Hello, was curious to know if there was an update on this ?
I'd like to execute x86 containers on my M1 Mac.
thanks !
from qemu-user-static.
@natcl, in dbhi/qus host architectures other than amd64 are supported.
from qemu-user-static.
Thanks will give it a try!
from qemu-user-static.
Related Issues (20)
- iptables not working on docker arm64 alpine HOT 2
- ldd fails with qemu-aarch64 HOT 6
- Need support for run x86_64 on linux/arm64 HOT 13
- Intermittent exec format error when building linux/arm64 (alpine 3.15+) on amd64 host HOT 1
- speed is slow when use as cross-compile solution HOT 5
- qemu: uncaught target signal 11 (Segmentation fault) - core dumped HOT 1
- Does loong64 and mips/mipsle will be support?
- Where is qemu-$to_arch-static binary files when container whose arch isn't equal to host's one is run? HOT 8
- Undocumented convention: The `--reset` flag must be the first argument
- Mirror docker image to ghcr.io HOT 3
- node.js 16 build on UBI8 is very slow and fails in GH Actions with ECONNRESET and too many open files errors.
- argv[0] can now be automatically fixed
- need to upgrade to support loongarch64 HOT 8
- [Problem] Can I use it in gitlab runner? HOT 4
- iptables-nft not supported in qemu-aarch64-static HOT 6
- Need pinned Alpine Linux versions, e.g., v3.17 HOT 1
- mount: permission denied (are you root?)
- Is this project still active? HOT 1
- armv7 and a page size of 32K
- Have trouble running quemu-static on arm64 with exec format error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qemu-user-static.