qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: Laurent Vivier <laurent@vivier.eu>, Riku Voipio <riku.voipio@iki.fi>
Subject: [Qemu-devel] [PATCH 0/3] linux-user: manage binfmt F flag
Date: Wed, 27 Jun 2018 22:53:14 +0200	[thread overview]
Message-ID: <20180627205317.10343-1-laurent@vivier.eu> (raw)

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

             reply	other threads:[~2018-06-27 20:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-27 20:53 Laurent Vivier [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180627205317.10343-1-laurent@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).