From 396408ee922eeb409f08fdab6f3df7400279e634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Tue, 19 Apr 2022 10:09:57 +0100 Subject: docs/devel: add some notes on the binfmt-image-debian targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We document some of this on the wiki but lets move it into our official developer notes documentation. Signed-off-by: Alex Bennée Cc: Paolo Bonzini Reviewed-by: Richard Henderson Message-Id: <20220419091020.3008144-3-alex.bennee@linaro.org> --- docs/devel/testing.rst | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'docs') diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 92d40cd..5b60a31 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -637,6 +637,44 @@ The full set of annotations can be found here: https://github.com/llvm/llvm-project/blob/master/compiler-rt/lib/tsan/rtl/tsan_interface_ann.cpp +docker-binfmt-image-debian-% targets +------------------------------------ + +It is possible to combine Debian's bootstrap scripts with a configured +``binfmt_misc`` to bootstrap a number of Debian's distros including +experimental ports not yet supported by a released OS. This can +simplify setting up a rootfs by using docker to contain the foreign +rootfs rather than manually invoking chroot. + +Setting up ``binfmt_misc`` +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can use the script ``qemu-binfmt-conf.sh`` to configure a QEMU +user binary to automatically run binaries for the foreign +architecture. While the scripts will try their best to work with +dynamically linked QEMU's a statically linked one will present less +potential complications when copying into the docker image. Modern +kernels support the ``F`` (fix binary) flag which will open the QEMU +executable on setup and avoids the need to find and re-open in the +chroot environment. This is triggered with the ``--persistent`` flag. + +Example invocation +~~~~~~~~~~~~~~~~~~ + +For example to setup the HPPA ports builds of Debian:: + + make docker-binfmt-image-debian-sid-hppa \ + DEB_TYPE=sid DEB_ARCH=hppa \ + DEB_URL=http://ftp.ports.debian.org/debian-ports/ \ + DEB_KEYRING=/usr/share/keyrings/debian-ports-archive-keyring.gpg \ + EXECUTABLE=(pwd)/qemu-hppa V=1 + +The ``DEB_`` variables are substitutions used by +``debian-boostrap.pre`` which is called to do the initial debootstrap +of the rootfs before it is copied into the container. The second stage +is run as part of the build. The final image will be tagged as +``qemu/debian-sid-hppa``. + VM testing ---------- -- cgit v1.1 From ab20edf59d1bb6fe3a2c780067dad5c1cce73334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Tue, 19 Apr 2022 10:09:58 +0100 Subject: docs/devel: drop :hidden: and :includehidden: tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was confusing and in the case of qtest was hiding the details of the qgraph sub-document in the qtest pages. Signed-off-by: Alex Bennée Acked-by: Richard Henderson Message-Id: <20220419091020.3008144-4-alex.bennee@linaro.org> --- docs/devel/index-api.rst | 1 - docs/devel/index-build.rst | 3 +-- docs/devel/index-internals.rst | 1 - docs/devel/index-process.rst | 1 - docs/devel/index-tcg.rst | 1 - docs/devel/index.rst | 2 -- docs/devel/qtest.rst | 1 - 7 files changed, 1 insertion(+), 9 deletions(-) (limited to 'docs') diff --git a/docs/devel/index-api.rst b/docs/devel/index-api.rst index b749240..60c0d74 100644 --- a/docs/devel/index-api.rst +++ b/docs/devel/index-api.rst @@ -6,7 +6,6 @@ generated from in-code annotations to function prototypes. .. toctree:: :maxdepth: 2 - :includehidden: bitops loads-stores diff --git a/docs/devel/index-build.rst b/docs/devel/index-build.rst index d96894f..1002a53 100644 --- a/docs/devel/index-build.rst +++ b/docs/devel/index-build.rst @@ -6,8 +6,7 @@ into our testing infrastructure. You will need to understand some of the basics if you are adding new files and targets to the build. .. toctree:: - :maxdepth: 2 - :includehidden: + :maxdepth: 3 build-system kconfig diff --git a/docs/devel/index-internals.rst b/docs/devel/index-internals.rst index bb118b8..a50889c 100644 --- a/docs/devel/index-internals.rst +++ b/docs/devel/index-internals.rst @@ -5,7 +5,6 @@ Details about QEMU's various subsystems including how to add features to them. .. toctree:: :maxdepth: 2 - :includehidden: qom atomics diff --git a/docs/devel/index-process.rst b/docs/devel/index-process.rst index 314e9e9..d0d7a20 100644 --- a/docs/devel/index-process.rst +++ b/docs/devel/index-process.rst @@ -5,7 +5,6 @@ Notes about how to interact with the community and how and where to submit patch .. toctree:: :maxdepth: 2 - :includehidden: code-of-conduct conflict-resolution diff --git a/docs/devel/index-tcg.rst b/docs/devel/index-tcg.rst index 3acbd95..0b0ad12 100644 --- a/docs/devel/index-tcg.rst +++ b/docs/devel/index-tcg.rst @@ -7,7 +7,6 @@ are only implementing things for HW accelerated hypervisors. .. toctree:: :maxdepth: 2 - :includehidden: tcg decodetree diff --git a/docs/devel/index.rst b/docs/devel/index.rst index a682070..09cfb32 100644 --- a/docs/devel/index.rst +++ b/docs/devel/index.rst @@ -8,8 +8,6 @@ modifying QEMU's source code. .. toctree:: :maxdepth: 1 - :includehidden: - index-process index-build diff --git a/docs/devel/qtest.rst b/docs/devel/qtest.rst index c3dceb6..add293d 100644 --- a/docs/devel/qtest.rst +++ b/docs/devel/qtest.rst @@ -3,7 +3,6 @@ QTest Device Emulation Testing Framework ======================================== .. toctree:: - :hidden: qgraph -- cgit v1.1