qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] linux-user: manage binfmt F flag
@ 2018-06-27 20:53 Laurent Vivier
  2018-06-27 20:53 ` [Qemu-devel] [PATCH 1/3] qemu-binfmt-conf.sh: cleanup --credential Laurent Vivier
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Laurent Vivier @ 2018-06-27 20:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Laurent Vivier, Riku Voipio

The binfmt F flag ("Fix binaries") allows to
load the interpreter binary at configuration time
and all future users are cloned from this memory copy.

This avoids to have to copy the interpreter to
the filesystem of the target we want to use.

This series introduces this new flag in qemu-binfmt-conf.sh
and another new parameter to provide a suffix to the default
qemu-CPU name to be able to use static version of qemu linux-user
provided by distros:

  qemu-binfmt-conf.sh --qemu-path /usr/bin --qemu-suffix -static \
                      --systemd m68k --credential yes --persistent yes

configures binfmt to use /usr/bin/qemu-m68k-static from the root filesystem
to interpret m68k binaries in unmodified chroots or containers/dockers.

With systemd, the interpreter is loaded when you restart the systemd-binfmt
service:

  systemctl restart systemd-binfmt.service

With that, you can execute directly a debootstrap without the --foreign
parameter.

  debootstrap --arch=m68k --variant=minbase \
              --no-check-gpg etch-m68k chroot-m68k \
              http://archive.debian.org/debian
  chroot chroot-m68k
  localhost:/# ls
  bin   dev  home    lib    mnt  proc  sbin  sys   usr
  boot  etc  initrd  media  opt  root  srv   tmp   var

Laurent Vivier (3):
  qemu-binfmt-conf.sh: cleanup --credential
  qemu-binfmt-conf.sh: add persistent (F) flags
  qemu-binfmt-conf.sh: allow to provide a suffix to the interpreter name

 scripts/qemu-binfmt-conf.sh | 64 +++++++++++++++++++++++++++++----------------
 1 file changed, 41 insertions(+), 23 deletions(-)

-- 
2.14.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-07-02  2:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-27 20:53 [Qemu-devel] [PATCH 0/3] linux-user: manage binfmt F flag Laurent Vivier
2018-06-27 20:53 ` [Qemu-devel] [PATCH 1/3] qemu-binfmt-conf.sh: cleanup --credential Laurent Vivier
2018-06-27 20:53 ` [Qemu-devel] [PATCH 2/3] qemu-binfmt-conf.sh: add persistent (F) flags Laurent Vivier
2018-06-27 20:53 ` [Qemu-devel] [PATCH 3/3] qemu-binfmt-conf.sh: allow to provide a suffix to the interpreter name Laurent Vivier
2018-07-02  2:37 ` [Qemu-devel] [PATCH 0/3] linux-user: manage binfmt F flag no-reply

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).