[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/25] docs/devel: add some notes on the binfmt-image-debian targe
From: |
Alex Bennée |
Subject: |
[PULL 02/25] docs/devel: add some notes on the binfmt-image-debian targets |
Date: |
Wed, 20 Apr 2022 19:08:09 +0100 |
We document some of this on the wiki but lets move it into our
official developer notes documentation.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220419091020.3008144-3-alex.bennee@linaro.org>
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 92d40cdd19..5b60a31807 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
----------
--
2.30.2
- [PULL 00/25] Various testing, doc and gdbstub fixes, Alex Bennée, 2022/04/20
- [PULL 01/25] tests/avocado: update aarch64_virt test to exercise -cpu max, Alex Bennée, 2022/04/20
- [PULL 03/25] docs/devel: drop :hidden: and :includehidden: tags, Alex Bennée, 2022/04/20
- [PULL 04/25] tests/docker: remove dead code for linux-user containers, Alex Bennée, 2022/04/20
- [PULL 02/25] docs/devel: add some notes on the binfmt-image-debian targets,
Alex Bennée <=
- [PULL 06/25] tests/docker: remove dead variable, Alex Bennée, 2022/04/20
- [PULL 07/25] tests/docker: remove unnecessary default definitions, Alex Bennée, 2022/04/20
- [PULL 10/25] tests/docker: simplify docker-TEST@IMAGE targets, Alex Bennée, 2022/04/20
- [PULL 05/25] tests/docker: remove test targets, Alex Bennée, 2022/04/20
- [PULL 09/25] tests/docker: remove unnecessary filtering of $(DOCKER_IMAGES), Alex Bennée, 2022/04/20
- [PULL 13/25] tests/tcg: remove CONFIG_LINUX_USER from config-target.mak, Alex Bennée, 2022/04/20
- [PULL 16/25] tests/tcg: list test targets in Makefile.prereqs, Alex Bennée, 2022/04/20
- [PULL 21/25] tests/tcg: remove duplicate sha512-sse case, Alex Bennée, 2022/04/20
- [PULL 08/25] tests/docker: inline variable definitions or move close to use, Alex Bennée, 2022/04/20
- [PULL 14/25] tests/tcg: remove CONFIG_USER_ONLY from config-target.mak, Alex Bennée, 2022/04/20