On Tue, Apr 27, 2021 at 03:37:37PM -0400, Daniel Walsh wrote:
With the emulator software installed, the kernel figures out that the
arch
is different and runs the emulator. I am not quite sure how all this magic
happens, but Buildah is not involved, it is just the beneficiary.
The Fedora version of the package drops configuration files into
/usr/lib/binfmt.d/ for each emulator in the package, and systemd's
systemd-binfmt.service uses the information they contain to configure
the kernel's binfmt_misc module to invoke the right interpreter for the
binaries that they can handle, usually at boot-time.
That registration is also triggered when the package is installed.
Those config files are generated by a script that's part of the qemu
source tree [1], and it can configure /proc directly if that's closer to
what you need.
HTH,
Nalin
[1]
https://github.com/qemu/qemu/blob/master/scripts/qemu-binfmt-conf.sh