From: Kuan-Wei Chiu <visitorckw@gmail.com>
To: trini@konsulko.com, tuomas.tynkkynen@iki.fi, bmeng.cn@gmail.com,
sjg@chromium.org, jerome.forissier@arm.com
Cc: jserv@ccns.ncku.edu.tw, eleanor15x@gmail.com,
marscheng@google.com, u-boot@lists.u-boot-project.org,
Kuan-Wei Chiu <visitorckw@gmail.com>
Subject: [PATCH v2 4/6] doc: 9p: Add 9P filesystem documentation
Date: Sat, 29 Aug 2026 19:21:17 +0000 [thread overview]
Message-ID: <20260829192119.2658328-5-visitorckw@gmail.com> (raw)
In-Reply-To: <20260829192119.2658328-1-visitorckw@gmail.com>
Add documentation for 9P filesystem support, including configuration
options, QEMU configuration, and basic usage examples.
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
---
doc/usage/filesystems/9p.rst | 55 ++++++++++++++++++++++++++++++++++++
doc/usage/index.rst | 1 +
2 files changed, 56 insertions(+)
create mode 100644 doc/usage/filesystems/9p.rst
diff --git a/doc/usage/filesystems/9p.rst b/doc/usage/filesystems/9p.rst
new file mode 100644
index 00000000000..ca44b74de12
--- /dev/null
+++ b/doc/usage/filesystems/9p.rst
@@ -0,0 +1,55 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. Copyright (C) 2026, Kuan-Wei Chiu <visitorckw@gmail.com>
+
+9P Filesystem
+=============
+
+The 9P filesystem is a network-based file sharing protocol. It is primarily
+used to share files between a host and a guest over virtio, providing a way
+to load kernels, device trees, and initial ramdisks without needing a disk
+image or networking setup like TFTP.
+
+Configuration
+-------------
+
+To enable the 9P filesystem support, you must enable the following configuration
+options:
+
+* ``CONFIG_FS_9P``: Enables the 9P filesystem layer.
+* ``CONFIG_NET_9P``: Enables the core 9P2000.L client protocol.
+* ``CONFIG_VIRTIO_9P``: Enables the virtio transport driver for 9P.
+
+QEMU Setup
+----------
+
+To use 9P with QEMU, you need to expose a host directory to the guest using
+the ``-fsdev`` and ``-device`` parameters.
+
+For example, to share the host's `/tmp/shared` directory with the guest under
+the mount tag `rootfs`:
+
+.. code-block:: bash
+
+ qemu-system-aarch64 \
+ -machine virt \
+ -nographic \
+ -fsdev local,id=fsdev0,path=/tmp/shared,security_model=none \
+ -device virtio-9p-device,fsdev=fsdev0,mount_tag=rootfs
+
+U-Boot Usage
+------------
+
+Once booted into U-Boot, you must first probe the virtio subsystem. You can then
+access the 9P filesystem using the ``9p`` interface name. You can specify a mount tag
+(such as ``rootfs``), a device index (such as ``0``), or use ``-`` to select the
+default (first) device.
+
+.. code-block:: bash
+
+ => virtio scan
+ => ls 9p rootfs /
+ => ls 9p 0 /
+ => ls 9p - /
+ => load 9p rootfs $kernel_addr_r /Image
+ => load 9p rootfs $ramdisk_addr_r /initramfs.cpio
+ => booti $kernel_addr_r $ramdisk_addr_r:$filesize $fdtcontroladdr
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index 6f477b842ca..6d7ca6b9aec 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -46,3 +46,4 @@ File Systems
:maxdepth: 1
filesystems/ext4
+ filesystems/9p
--
2.55.0.897.gb25b4bd76c-goog
next prev parent reply other threads:[~2026-08-29 19:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-29 19:21 [PATCH v2 0/6] fs: Add 9P filesystem support over virtio Kuan-Wei Chiu
2026-08-29 19:21 ` [PATCH v2 1/6] net: 9p: Add 9P2000.L protocol support Kuan-Wei Chiu
2026-09-11 11:43 ` Simon Glass
2026-08-29 19:21 ` [PATCH v2 2/6] fs: 9p: Add 9P filesystem support Kuan-Wei Chiu
2026-09-11 11:43 ` Simon Glass
2026-08-29 19:21 ` [PATCH v2 3/6] virtio: 9p: Add 9P transport driver Kuan-Wei Chiu
2026-09-11 11:43 ` Simon Glass
2026-08-29 19:21 ` Kuan-Wei Chiu [this message]
2026-09-11 11:43 ` [PATCH v2 4/6] doc: 9p: Add 9P filesystem documentation Simon Glass
2026-08-29 19:21 ` [PATCH v2 5/6] test: 9p: Add test for 9P filesystem Kuan-Wei Chiu
2026-09-11 11:44 ` Simon Glass
2026-08-29 19:21 ` [PATCH v2 6/6] MAINTAINERS: Add entry for 9PFS Kuan-Wei Chiu
2026-08-30 10:41 ` [PATCH v2 0/6] fs: Add 9P filesystem support over virtio Peter Robinson
2026-09-02 1:51 ` Kuan-Wei Chiu
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=20260829192119.2658328-5-visitorckw@gmail.com \
--to=visitorckw@gmail.com \
--cc=bmeng.cn@gmail.com \
--cc=eleanor15x@gmail.com \
--cc=jerome.forissier@arm.com \
--cc=jserv@ccns.ncku.edu.tw \
--cc=marscheng@google.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=tuomas.tynkkynen@iki.fi \
--cc=u-boot@lists.u-boot-project.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.