From: Trevor Woerner <twoerner@gmail.com>
To: docs@lists.yoctoproject.org
Subject: [PATCH v3 2/4] docs: use the wks lexer for the kickstart examples
Date: Fri, 27 Nov 2026 07:05:26 -0500 [thread overview]
Message-ID: <20261127120528.837051-3-twoerner@gmail.com> (raw)
In-Reply-To: <20261127120528.837051-1-twoerner@gmail.com>
The wic kickstart examples in the manuals are tagged shell or text, or
left to the default language. Tag them wks so their statements and
options are highlighted as kickstart.
AI-Generated: codex/claude-opus 5.5 (xhigh)
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
changes in v3:
- new: tag the kickstart examples wks, as asked in review
---
documentation/dev-manual/wic.rst | 6 +++---
documentation/ref-manual/kickstart.rst | 16 ++++++++++------
documentation/ref-manual/variables.rst | 8 ++++++--
3 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/documentation/dev-manual/wic.rst b/documentation/dev-manual/wic.rst
index 85160bbdf1a0..07e165abeb11 100644
--- a/documentation/dev-manual/wic.rst
+++ b/documentation/dev-manual/wic.rst
@@ -343,7 +343,7 @@ Mode that uses the ``directdisk`` file:
Here are the actual partition language commands used in the
``genericx86.wks`` file to generate an image:
-.. code-block:: shell
+.. code-block:: wks
# short-description: Create an EFI disk image for genericx86*
# long-description: Creates a partitioned EFI disk image for genericx86* machines
@@ -403,7 +403,7 @@ implementation, it looks for the plugin with the same name as the
partition. For example, if the partition is set up using the following
command in a kickstart file:
-.. code-block:: shell
+.. code-block:: wks
part /boot --source bootimg_pcbios --ondisk sda --label boot --active --align 1024
@@ -598,7 +598,7 @@ changes all instances of "``--ondisk sda``" to "``--ondisk sdb``". The
example changes the following two lines and leaves the remaining lines
untouched:
-.. code-block:: shell
+.. code-block:: wks
part /boot --source bootimg_pcbios --ondisk sdb --label boot --active --align 1024
part / --source rootfs --ondisk sdb --fstype=ext4 --label platform --align 1024 --use-uuid
diff --git a/documentation/ref-manual/kickstart.rst b/documentation/ref-manual/kickstart.rst
index 8d5e9f317b06..c2b7d6aa1102 100644
--- a/documentation/ref-manual/kickstart.rst
+++ b/documentation/ref-manual/kickstart.rst
@@ -57,7 +57,9 @@ Command: part
-------------
This command creates a partition on the system and uses the
-following syntax::
+following syntax:
+
+.. code-block:: wks
part [mntpoint]
@@ -85,7 +87,9 @@ must also provide one of the ``--ondrive``, ``--ondisk``, or
be disabled in custom configurations.
Here is an example that uses "/" as the mountpoint. The command uses
-``--ondisk`` to force the partition onto the ``sdb`` disk::
+``--ondisk`` to force the partition onto the ``sdb`` disk:
+
+.. code-block:: wks
part / --source rootfs --ondisk sdb --fstype=ext3 --label platform --align 1024
@@ -275,7 +279,7 @@ The ``include`` directive can be used to include a WKS file into another. The
only argument to this command is the path to the file to include, relative to
the current file. For example:
-.. code-block:: shell
+.. code-block:: wks
include common.wks.inc
@@ -298,7 +302,7 @@ variable expansion mechanism:
:term:`wic` command-line utility, not :term:`BitBake`. However, the syntax to
reference these variables is the same. For example:
- .. code-block:: text
+ .. code-block:: wks
:caption: Snippet from ``mkefidisk.wks``
bootloader --ptable gpt --timeout=5 --append="rootfstype=ext4 console=${KERNEL_CONSOLE} console=tty0"
@@ -321,7 +325,7 @@ variable expansion mechanism:
This means that the :term:`WICVARS` list has no effect anymore: those
variables are expanded by :term:`BitBake` directly. For example:
- .. code-block:: text
+ .. code-block:: wks
:caption: Snippet from ``efi-uki-bootdisk.wks.in``
part /boot --source bootimg_efi --sourceparams="loader=${EFI_PROVIDER}" --label boot --active ...
@@ -331,7 +335,7 @@ variable expansion mechanism:
This also means that ``.wks.in`` files can contain inline Python expressions.
Here is a made up example:
- .. code-block:: text
+ .. code-block:: wks
part / --source rootfs --fstype=ext4 --label root --align ${@4 * 1024} --size 5G
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 2e01d04228ce..15ff5be2380a 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -4318,7 +4318,9 @@ system and gives an overview of their function and contents.
You can also specify the target by label, UUID or partition name if multiple
extra partitions coexist. Let's take the following example. This would be
- the WKS file for the image currently being built::
+ the WKS file for the image currently being built:
+
+ .. code-block:: wks
part --source extra_partition --fstype=ext4 --label foo
part --source extra_partition --fstype=ext4 --uuid e7d0824e-cda3-4bed-9f54-9ef5312d105d
@@ -12173,7 +12175,9 @@ system and gives an overview of their function and contents.
The resulting binary can be flashed using :doc:`WIC </dev-manual/wic>` or
any other flashing method at the environment offset, overriding any
existing environment if one is present. Below is an example of a WKS file
- to flash the binary::
+ to flash the binary:
+
+ .. code-block:: wks
part --source rawcopy --sourceparams="file=u-boot-initial-env-sd.bin" --ondisk sda --no-table --offset 4096k
--
2.50.0.173.g8b6f19ccfc3a
next prev parent reply other threads:[~2026-11-27 12:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 12:05 [PATCH v3 0/4] sphinx: add lexers for wic kickstart files and pydevshell sessions Trevor Woerner
2026-11-27 12:05 ` [PATCH v3 1/4] sphinx: add a lexer for wic kickstart files Trevor Woerner
2026-11-27 12:05 ` Trevor Woerner [this message]
2026-11-27 12:05 ` [PATCH v3 3/4] sphinx: add a lexer for pydevshell sessions Trevor Woerner
2026-11-27 12:05 ` [PATCH v3 4/4] dev-manual: use the pydevshell lexer for the session example Trevor Woerner
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=20261127120528.837051-3-twoerner@gmail.com \
--to=twoerner@gmail.com \
--cc=docs@lists.yoctoproject.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.