-
Notifications
You must be signed in to change notification settings - Fork 315
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
Support foreign architectures (e.g. aarch64 on amd64) #718
Comments
This appears to work perfectly. We're using Ubuntu 20.04 There's an unrelated issue apparently in Do we need to detect and confirm the presence of |
right now, if some tool we need is missing we'll just fail invoking it, which isn't ideal, but also not a loss, since this is developer-focussed stuff and the error yous see pretty discriptive. Also, if this works for Debian only initially, that's fine. If others are interested for other distros we can extend this later. Hence please submit the change as PR |
This should work as is these days if the version of systemd-nspawn is recent enough (v250 or later) so let's close this. If there are any remaining issues, please open a new issue. |
Issue ##138 added the
--architecture
option, but it is limited to architectures compatible with the host (e.g.x86
onx86_64
). That issue originally asked forarmhf
support.We're working on a project that harnesses
systemd-nspawn
andmkosi
creating base template images foramd64
andarm64
Debian architectures. Containers will run on native host architectures but whilst we're building and refining the images it is much faster working on powerfulamd64
hosts when building and testing thearm64 (aarch64)
images.With the support of
qemu-user-static
and itsqemu-aarch64-static
we can successfully build and run Debianchroot
s usingdebootstrap --arch=arm64 --foreign ...
followed bychroot target/ /debootstrap/debootstrap --second-stage
, or more conveniently by simply calling the wrapperqemu-debootstrap --arch=arm64 ...
We're investigating adding support for this into
mkosi
locally but consider it would be a great addition to mkosi's capabilities and so are seeking feedback on any wider considerations we should take into account before submitting a PR.Most obviously would be supporting it across distro's and there we'd need input and help from
Fedora
anddnf
experts since we're a Debian/Ubuntu site.Some changes to hard coded assumptions will be necessary as well, such as code of the form
extra_packages.add("linux-image-amd64")
.The text was updated successfully, but these errors were encountered: