summaryrefslogtreecommitdiffstats
path: root/Documentation/user
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2023-08-23 09:57:55 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2023-08-23 09:57:55 +0200
commit5b0c3cb80d1e16346f42165230496336e6d06de9 (patch)
treec2590a2e0e69b068e705dbc96f24a9e01f93a4e4 /Documentation/user
parent33f8161a72e2dd4911b60cb0eaee5f1a3a1bd0f3 (diff)
parent411e9ba6e803a35feb35ed2544e0cdf555161d65 (diff)
downloadbarebox-5b0c3cb80d1e16346f42165230496336e6d06de9.tar.gz
barebox-5b0c3cb80d1e16346f42165230496336e6d06de9.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'Documentation/user')
-rw-r--r--Documentation/user/barebox.rst21
-rw-r--r--Documentation/user/virtio.rst14
2 files changed, 23 insertions, 12 deletions
diff --git a/Documentation/user/barebox.rst b/Documentation/user/barebox.rst
index 7b37ddba77..c95adb78bb 100644
--- a/Documentation/user/barebox.rst
+++ b/Documentation/user/barebox.rst
@@ -300,16 +300,25 @@ so it may be loaded by the boot ROM of the relevant SoCs.
In addition to these barebox also builds host and target tools that are useful
outside of barebox build: e.g. to manipulate the environment or to load an
-image over a boot ROM's USB recovery protocol.
+image over a boot ROM's USB recovery protocol. These tools may link against
+libraries, which are detected using ``PKG_CONFIG`` and ``CROSS_PKG_CONFIG``
+for native and cross build respectively. Their default values are::
-There are two ``ARCH=sandbox`` to make this more straight forward:
+ PKG_CONFIG=pkg-config
+ CROSS_PKG_CONFIG=${CROSS_COMPILE}pkg-config
+
+These can be overridden using environment or make variables.
+
+As use of pkg-config both for host and target tool in the same build can
+complicate build system integration. There are two ``ARCH=sandbox`` configuration
+to make this more straight forward:
Host Tools
^^^^^^^^^^
The ``hosttools_defconfig`` will compile standalone host tools for the
-host (build) system. To build the USB loaders, ``pkg-config`` needs to know
-about ``libusb-1.0``.
+host (build) system. To build the USB loaders, ``PKG_CONFIG`` needs to know
+about ``libusb-1.0``. This config won't build any target tools.
.. code-block:: console
@@ -322,9 +331,9 @@ Target Tools
The ``targettools_defconfig`` will cross-compile standalone target tools for the
target system. To build the USB loaders, ``CROSS_PKG_CONFIG`` needs to know
-about ``libusb-1.0``. This config won't built any host tools, so it's ok to
+about ``libusb-1.0``. This config won't build any host tools, so it's ok to
set ``CROSS_PKG_CONFIG=pkg-config`` if ``pkg-config`` is primed for target
-use. The default is ``CROSS_PKG_CONFIG=$(CROSS_COMPILE)pkg-config``. Example:
+use. Example:
.. code-block:: console
diff --git a/Documentation/user/virtio.rst b/Documentation/user/virtio.rst
index a8624649f4..046e5dac82 100644
--- a/Documentation/user/virtio.rst
+++ b/Documentation/user/virtio.rst
@@ -72,15 +72,17 @@ malta VM with one HWRNG and 2 block VirtIO PCI devices::
$ qemu-system-mips -m 256M -M malta -serial stdio \
-bios ./images/barebox-qemu-malta.img -monitor null \
- -device virtio-rng-pci,disable-legacy=on \
+ -device virtio-rng-pci \
-drive if=none,file=image1.hdimg,format=raw,id=hd0 \
- -device virtio-blk-pci,drive=hd0,disable-legacy=on \
+ -device virtio-blk-pci,drive=hd0 \
-drive if=none,file=image2.hdimg,format=raw,id=hd1 \
- -device virtio-blk-pci,drive=hd1,disable-legacy=on
+ -device virtio-blk-pci,drive=hd1
-Note the use of ``disable-legacy=on``. barebox doesn't support legacy
-or transitional VirtIO devices. Some versions of QEMU may need to
-have ``,disable-modern=off`` specfied as well.
+Note that barebox does not support non-transitional legacy Virt I/O devices.
+Depending on QEMU version used, it may be required to add
+``disable-legacy=on``, ``disable-modern=off`` or both, e.g.::
+
+ -device virtio-blk-pci,drive=hd1,disable-legacy=on,disable-modern=off
.. _VirtIO: http://docs.oasis-open.org/virtio/virtio/v1.0/virtio-v1.0.pdf
.. _qemu: https://www.qemu.org