Skip to contentSkip to conversation

sdk-manual: fix code-blocks, migrate one PNG to SVG, remove unused PNG

PATCH Applied Quentin Schulz 2 participants 15 messages Jan 21 – Feb 10

lore
Share & tools
lore
#0 lore raw

v2 cover sdk-manual: fix code-blocks, migrate one PNG to SVG, remove unused PNG

This migrates literal and code blocks to an explicit lexer in sdk-manual.

It also migrate one PNG to SVG (one that was "easy enough" for me to quickly do), as well as deleting an unused PNG.

In addition, this removes two PNGs in favor of simple parsed literal blocks when listing the directory layout as it doesn't bring anything valuable and makes accessibility worse.

Finally, it also fixes some improper indent that resulted in explanations unintentionally being part of a code-block.

---
Changes in v2:
- used parsed-literal blocks instead of code-blocks for directory
layout,
- highlighted placeholders with the same mechanism as in parsed-literal
blocks (italicized),
- highlighted possible values of placeholders with double-tick instead
of single-tick,
- updated directory layout with output from 5.0.15 toolchains,
- reorder alphabetically the directory layouts such that files and
directories are now mixed,
- reworded text after the now-deleted figures as it still said "Within
the figure", and highlighted placeholders in the text the same way
as they appear in the parsed-literal block,
- added patch to use parsed-literal block for the naming convention of
the install scripts,
- added patch to fix SDK filename example,
- added patch to fix default path for eSDK installer script,
- Link to v1: https://patch.msgid.link/[email protected]

---
Quentin Schulz (12):
sdk-manual: fix incorrect highlight language for text code-blocks
sdk-manual: fix incorrect highlight language for console code-blocks
sdk-manual: fix improper indent of general form of tarball installer scripts
sdk-manual: working-projects: properly highlight code code-blocks
sdk-manual: appending-customizing: use none lexer for BitBake code blocks
sdk-manual: appendix-obtain: replace directory structure PNG with a parsed-literal block
sdk-manual: appendix-obtain: replace eSDK directory structure PNG with a parsed-literal block
sdk-manual: replace sdk-environment PNG with SVG
sdk-manual: delete sdk-title PNG
sdk-manual: appendix-obtain: use parsed-literal block for naming convention of the installer scripts
sdk-manual: using: fix SDK filename example
sdk-manual: appendix-obtain: fix default path for eSDK installer script

 documentation/sdk-manual/appendix-customizing.rst  |  36 +-
 documentation/sdk-manual/appendix-obtain.rst       | 154 +++++--
 documentation/sdk-manual/extensible.rst            |  63 +--
 .../sdk-manual/figures/sdk-environment.png         | Bin 42098 -> 0 bytes
 .../sdk-installed-extensible-sdk-directory.png     | Bin 66753 -> 0 bytes
 .../sdk-installed-standard-sdk-directory.png       | Bin 39099 -> 0 bytes
 documentation/sdk-manual/figures/sdk-title.png     | Bin 31039 -> 0 bytes
 documentation/sdk-manual/intro.rst                 |   2 +-
 documentation/sdk-manual/svg/sdk-environment.svg   | 463 +++++++++++++++++++++
 documentation/sdk-manual/using.rst                 |  35 +-
 documentation/sdk-manual/working-projects.rst      | 112 +++--
 11 files changed, 746 insertions(+), 119 deletions(-)

---
base-commit: b8a56b8b2e8c0417b2f7204f80c79b05d95e9ce4
change-id: 20260114-code-block-misc-20260114-bf035e4362c2

Best regards,

Signature · 1 line
Quentin Schulz <[email protected]>
#1 lore raw

PATCH v2 1/12 sdk-manual: fix incorrect highlight language for text code-blocks

From: Quentin Schulz <[email protected]>

When unspecified in conf.py via the highlight_language variable (and highlight variable for code-blocks), the lexer used for literal blocks is "default" which tries to highlight the block as Python code.

These blocks aren't Python but either simply the console output or a file name (which we should probably just double tick-quote instead), so let's render those blocks with the "text" lexer.

---
 documentation/sdk-manual/appendix-obtain.rst | 12 +++++++++---
 documentation/sdk-manual/extensible.rst      |  4 +++-
 documentation/sdk-manual/using.rst           |  8 ++++++--
 3 files changed, 18 insertions(+), 6 deletions(-)
documentation/sdk-manual/appendix-obtain.rst +9 -3
index a42cbc31b..94c5552e5 100644
@@ -61,7 +61,9 @@ Follow these steps to locate and hand-install the toolchain:
 
    For example, if your build host is a 64-bit x86 system and you need
    an extended SDK for a 64-bit core2 QEMU target, go into the ``x86_64``
-   folder and download the following installer::
+   folder and download the following installer:
+
+   .. code-block:: text
 
       poky-glibc-x86_64-core-image-sato-core2-64-qemux86-64-toolchain-&DISTRO;.sh
 
@@ -130,7 +132,9 @@ build the SDK installer. Follow these steps:
       :term:`SDKMACHINE` value must be set for the architecture of the
       machine you are using to build the installer. If :term:`SDKMACHINE`
       is not set appropriately, the build fails and provides an error
-      message similar to the following::
+      message similar to the following:
+
+      .. code-block:: text
 
          The extensible SDK can currently only be built for the same
          architecture as the machine being built on - SDK_ARCH
@@ -224,7 +228,9 @@ Follow these steps to extract the root filesystem:
 
    For example, if you plan on using a BeagleBone device as your target
    hardware and your image is a ``core-image-sato-sdk`` image, you can
-   download the following file::
+   download the following file:
+
+   .. code-block:: text
 
       core-image-sato-sdk-beaglebone-yocto.tar.bz2
 
documentation/sdk-manual/extensible.rst +3 -1
index e5e9e4a03..fe5e4cdd5 100644
@@ -121,7 +121,9 @@ is the general form::
 
 For example, the following SDK installer is for a 64-bit
 development host system and a i586-tuned target architecture based off
-the SDK for ``core-image-sato`` and using the current &DISTRO; snapshot::
+the SDK for ``core-image-sato`` and using the current &DISTRO; snapshot:
+
+.. code-block:: text
 
    poky-glibc-x86_64-core-image-sato-i586-toolchain-ext-&DISTRO;.sh
 
documentation/sdk-manual/using.rst +6 -2
index bfb306abf..eced4a5c5 100644
@@ -52,7 +52,9 @@ libraries appropriate for developing against the corresponding image.
 
 The names of the tarball installer scripts are such that a string
 representing the host system appears first in the filename and then is
-immediately followed by a string representing the target architecture::
+immediately followed by a string representing the target architecture:
+
+.. code-block:: text
 
    poky-glibc-host_system-image_type-arch-toolchain-release_version.sh
 
@@ -75,7 +77,9 @@ immediately followed by a string representing the target architecture::
 
 For example, the following SDK installer is for a 64-bit
 development host system and a i586-tuned target architecture based off
-the SDK for ``core-image-sato`` and using the current DISTRO snapshot::
+the SDK for ``core-image-sato`` and using the current DISTRO snapshot:
+
+.. code-block:: text
 
    poky-glibc-x86_64-core-image-sato-i586-toolchain-DISTRO.sh
 
Signature · 1 line
2.52.0
#2 lore raw

PATCH v2 2/12 sdk-manual: fix incorrect highlight language for console code-blocks

In reply to Quentin Schulz

From: Quentin Schulz <[email protected]>

When unspecified in conf.py via the highlight_language variable (and highlight variable for code-blocks), the lexer used for literal blocks is "default" which tries to highlight the block as Python code.

These blocks aren't Python but simple command lines prefixed by a prompt so let's use the "console" lexer to properly highlight.

---
 documentation/sdk-manual/appendix-customizing.rst |  4 +-
 documentation/sdk-manual/appendix-obtain.rst      | 28 ++++++--
 documentation/sdk-manual/extensible.rst           | 38 +++++++---
 documentation/sdk-manual/using.rst                |  8 ++-
 documentation/sdk-manual/working-projects.rst     | 84 +++++++++++++++++------
 5 files changed, 121 insertions(+), 41 deletions(-)
documentation/sdk-manual/appendix-customizing.rst +3 -1
index e08630dce..e984b86bd 100644
@@ -189,7 +189,9 @@ the installed SDKs to update the installed SDKs by using the
 #. Build the extensible SDK normally (i.e., use the
    ``bitbake -c populate_sdk_ext`` imagename command).
 
-#. Publish the SDK using the following command::
+#. Publish the SDK using the following command:
+
+   .. code-block:: console
 
       $ oe-publish-sdk some_path/sdk-installer.sh path_to_shared_http_directory
 
documentation/sdk-manual/appendix-obtain.rst +21 -7
index 94c5552e5..9590cf95a 100644
@@ -69,7 +69,9 @@ Follow these steps to locate and hand-install the toolchain:
 
 #. *Run the Installer:* Be sure you have execution privileges and run
    the installer. Here is an example from the ``Downloads``
-   directory::
+   directory:
+
+   .. code-block:: console
 
       $ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-qemux86-64-toolchain-&DISTRO;.sh
 
@@ -106,7 +108,9 @@ build the SDK installer. Follow these steps:
    the Source Directory (i.e. ``poky``), run the
    :ref:`structure-core-script` environment
    setup script to define the OpenEmbedded build environment on your
-   build host::
+   build host:
+
+   .. code-block:: console
 
       $ source oe-init-build-env
 
@@ -145,11 +149,15 @@ build the SDK installer. Follow these steps:
 
 #. *Build the SDK Installer:* To build the SDK installer for a standard
    SDK and populate the SDK image, use the following command form. Be
-   sure to replace ``image`` with an image (e.g. "core-image-sato")::
+   sure to replace ``image`` with an image (e.g. "core-image-sato"):
+
+   .. code-block:: console
 
       $ bitbake image -c populate_sdk
 
-   You can do the same for the extensible SDK using this command form::
+   You can do the same for the extensible SDK using this command form:
+
+   .. code-block:: console
 
       $ bitbake image -c populate_sdk_ext
 
@@ -174,7 +182,9 @@ build the SDK installer. Follow these steps:
          libc-staticdev"
 
 #. *Run the Installer:* You can now run the SDK installer from
-   ``tmp/deploy/sdk`` in the :term:`Build Directory`. Here is an example::
+   ``tmp/deploy/sdk`` in the :term:`Build Directory`. Here is an example:
+
+   .. code-block:: console
 
       $ cd poky/build/tmp/deploy/sdk
       $ ./poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh
@@ -242,7 +252,9 @@ Follow these steps to extract the root filesystem:
    installed the toolchain (e.g. ``poky_sdk``).
 
    Here is an example based on the toolchain installed in the
-   ":ref:`sdk-manual/appendix-obtain:locating pre-built sdk installers`" section::
+   ":ref:`sdk-manual/appendix-obtain:locating pre-built sdk installers`" section:
+
+   .. code-block:: console
 
       $ source poky_sdk/environment-setup-core2-64-poky-linux
 
@@ -253,7 +265,9 @@ Follow these steps to extract the root filesystem:
    from a previously built root filesystem image that was downloaded
    from the :yocto_dl:`Index of Releases </releases/yocto/&DISTRO_REL_LATEST_TAG;/machines/>`.
    This command extracts the root filesystem into the ``core2-64-sato``
-   directory::
+   directory:
+
+   .. code-block:: console
 
       $ runqemu-extract-sdk ~/Downloads/core-image-sato-sdk-beaglebone-yocto.tar.bz2 ~/beaglebone-sato
 
documentation/sdk-manual/extensible.rst +28 -10
index fe5e4cdd5..808e076e6 100644
@@ -71,7 +71,9 @@ Setting up the Extensible SDK environment directly in a Yocto build
 #. Set up all the needed layers and a Yocto :term:`Build Directory`, e.g. a regular Yocto
    build where ``bitbake`` can be executed.
 
-#. Run::
+#. Run:
+
+.. code-block:: console
 
       $ bitbake meta-ide-support
       $ bitbake -c populate_sysroot gtk+3
@@ -144,7 +146,9 @@ must be writable for whichever users need to use the SDK.
 The following command shows how to run the installer given a toolchain
 tarball for a 64-bit x86 development host system and a 64-bit x86 target
 architecture. The example assumes the SDK installer is located in
-``~/Downloads/`` and has execution rights::
+``~/Downloads/`` and has execution rights:
+
+.. code-block:: console
 
    $ ./Downloads/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.5.sh
    Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.5
@@ -194,7 +198,9 @@ begin with the string "``environment-setup``" and include as part of
 their name the tuned target architecture. As an example, the following
 commands set the working directory to where the SDK was installed and
 then source the environment setup script. In this example, the setup
-script is for an IA-based target machine using i586 tuning::
+script is for an IA-based target machine using i586 tuning:
+
+.. code-block:: console
 
    $ cd /home/scottrif/poky_sdk
    $ source environment-setup-core2-64-poky-linux
@@ -202,7 +208,9 @@ script is for an IA-based target machine using i586 tuning::
    Run devtool --help for further details.
 
 When using the environment script directly in a Yocto build, it can
-be run similarly::
+be run similarly:
+
+.. code-block:: console
 
    $ source tmp/deploy/images/qemux86-64/environment-setup-core2-64-poky-linux
 
@@ -272,7 +280,9 @@ populated on-demand. Sometimes you must explicitly install extra items
 into the SDK. If you need these extra items, you can first search for
 the items using the ``devtool search`` command. For example, suppose you
 need to link to libGL but you are not sure which recipe provides libGL.
-You can use the following command to find out::
+You can use the following command to find out:
+
+.. code-block:: console
 
    $ devtool search libGL mesa
    A free implementation of the OpenGL API
@@ -285,7 +295,9 @@ When using the extensible SDK directly in a Yocto build
 
 In this scenario, the Yocto build tooling, e.g. ``bitbake``
 is directly accessible to build additional items, and it
-can simply be executed directly::
+can simply be executed directly:
+
+.. code-block:: console
 
    $ bitbake curl-native
    # Add newly built native items to native sysroot
@@ -297,14 +309,16 @@ can simply be executed directly::
 When using a standalone installer for the Extensible SDK
 --------------------------------------------------------
 
-::
+.. code-block:: console
 
    $ devtool sdk-install mesa
 
 By default, the ``devtool sdk-install`` command assumes
 the item is available in pre-built form from your SDK provider. If the
 item is not available and it is acceptable to build the item from
-source, you can add the "-s" option as follows::
+source, you can add the "-s" option as follows:
+
+.. code-block:: console
 
    $ devtool sdk-install -s mesa
 
@@ -320,7 +334,9 @@ If you are working with an installed extensible SDK that gets
 occasionally updated (e.g. a third-party SDK), then you will need to
 manually "pull down" the updates into the installed SDK.
 
-To update your installed SDK, use ``devtool`` as follows::
+To update your installed SDK, use ``devtool`` as follows:
+
+.. code-block:: console
 
    $ devtool sdk-update
 
@@ -328,7 +344,9 @@ The previous command assumes your SDK provider has set the default update URL
 for you through the :term:`SDK_UPDATE_URL` variable as described in the
 ":ref:`sdk-manual/appendix-customizing:Providing Updates to the Extensible SDK After Installation`"
 section. If the SDK provider has not set that default URL, you need to
-specify it yourself in the command as follows::
+specify it yourself in the command as follows:
+
+.. code-block:: console
 
    $ devtool sdk-update path_to_update_directory
 
documentation/sdk-manual/using.rst +6 -2
index eced4a5c5..28f9e33b0 100644
@@ -100,7 +100,9 @@ must be writable for whichever users need to use the SDK.
 The following command shows how to run the installer given a toolchain
 tarball for a 64-bit x86 development host system and a 64-bit x86 target
 architecture. The example assumes the SDK installer is located in
-``~/Downloads/`` and has execution rights::
+``~/Downloads/`` and has execution rights:
+
+.. code-block:: console
 
    $ ./Downloads/poky-glibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
    Poky (Yocto Project Reference Distro) SDK installer version &DISTRO;
@@ -140,7 +142,9 @@ begin with the string "``environment-setup``" and include as part of
 their name the tuned target architecture. As an example, the following
 commands set the working directory to where the SDK was installed and
 then source the environment setup script. In this example, the setup
-script is for an IA-based target machine using i586 tuning::
+script is for an IA-based target machine using i586 tuning:
+
+.. code-block:: console
 
    $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
 
documentation/sdk-manual/working-projects.rst +63 -21

201 lines not on this page · raw message

Signature · 1 line
2.52.0
#3 lore raw

PATCH v2 3/12 sdk-manual: fix improper indent of general form of tarball installer scripts

In reply to Quentin Schulz

From: Quentin Schulz <[email protected]>

poky-glibc-host_system-image_type-arch-toolchain-ext-release_version.sh is in a code-block and thus requires to be indented (it is). Sphinx knows a block has ended when the indentation of the next line is smaller than in the block, otherwise it's all in the same block.

The explanation of the replaceable parts in the tarball installer script filename should be text and not part of the block, so let's do that.

While at it, reformat by putting each replaceable part in a bullet list, highlight the replaceable part or what it can replaced with as well as putting the replacement on the same line instead of making it a quote by having them indented in the bullet list.

Finally, replace the literal block (::) with a parsed-literal block so we can highlight the placeholders appropriately.

---
 documentation/sdk-manual/extensible.rst | 21 ++++++++-------------
 documentation/sdk-manual/using.rst      | 21 +++++++--------------
 2 files changed, 15 insertions(+), 27 deletions(-)
documentation/sdk-manual/extensible.rst +8 -13
index 808e076e6..0eb9eda8d 100644
@@ -100,26 +100,21 @@ The names of the tarball installer scripts are such that a string
 representing the host system appears first in the filename and then is
 immediately followed by a string representing the target architecture.
 An extensible SDK has the string "-ext" as part of the name. Following
-is the general form::
+is the general form:
 
-   poky-glibc-host_system-image_type-arch-toolchain-ext-release_version.sh
+.. parsed-literal::
 
-   Where:
-       host_system is a string representing your development system:
+   poky-glibc-*host_system*-*image_type*-*arch*-toolchain-ext-*release_version*.sh
 
-                  i686 or x86_64.
+Where:
 
-       image_type is the image for which the SDK was built:
+-  *host_system* is a string representing your development system: ``i686`` or ``x86_64``.
 
-                  core-image-sato or core-image-minimal
+-  *image_type* is the image for which the SDK was built: ``core-image-sato`` or ``core-image-minimal``.
 
-       arch is a string representing the tuned target architecture:
+-  *arch* is a string representing the tuned target architecture: ``aarch64``, ``armv5e``, ``core2-64``, ``i586``, ``mips32r2``, ``mips64``, ``ppc7400``, or ``cortexa8hf-neon``.
 
-                  aarch64, armv5e, core2-64, i586, mips32r2, mips64, ppc7400, or cortexa8hf-neon
-
-       release_version is a string representing the release number of the Yocto Project:
-
-                  &DISTRO;, &DISTRO;+snapshot
+-  *release_version* is a string representing the release number of the Yocto Project: ``&DISTRO;``, ``&DISTRO;+snapshot``.
 
 For example, the following SDK installer is for a 64-bit
 development host system and a i586-tuned target architecture based off
documentation/sdk-manual/using.rst +7 -14
index 28f9e33b0..792e159bf 100644
@@ -54,26 +54,19 @@ The names of the tarball installer scripts are such that a string
 representing the host system appears first in the filename and then is
 immediately followed by a string representing the target architecture:
 
-.. code-block:: text
+.. parsed-literal::
 
-   poky-glibc-host_system-image_type-arch-toolchain-release_version.sh
+   poky-glibc-*host_system*-*image_type*-*arch*-toolchain-*release_version*.sh
 
-   Where:
-       host_system is a string representing your development system:
+Where:
 
-                  i686 or x86_64.
+-  *host_system* is a string representing your development system: ``i686`` or ``x86_64``.
 
-       image_type is the image for which the SDK was built:
+-  *image_type* is the image for which the SDK was built: ``core-image-minimal`` or ``core-image-sato``.
 
-                  core-image-minimal or core-image-sato.
+-  *arch* is a string representing the tuned target architecture: ``aarch64``, ``armv5e``, ``core2-64``, ``i586``, ``mips32r2``, ``mips64``, ``ppc7400``, or ``cortexa8hf-neon``.
 
-       arch is a string representing the tuned target architecture:
-
-                  aarch64, armv5e, core2-64, i586, mips32r2, mips64, ppc7400, or cortexa8hf-neon.
-
-       release_version is a string representing the release number of the Yocto Project:
-
-                  &DISTRO;, &DISTRO;+snapshot
+-  *release_version* is a string representing the release number of the Yocto Project: ``&DISTRO;``, ``&DISTRO;+snapshot``.
 
 For example, the following SDK installer is for a 64-bit
 development host system and a i586-tuned target architecture based off
Signature · 1 line
2.52.0
#4 lore raw

PATCH v2 4/12 sdk-manual: working-projects: properly highlight code code-blocks

In reply to Quentin Schulz

From: Quentin Schulz <[email protected]>

There are some blocks containing C code so highlight them as C with the "c" lexer.

For autotool'ed files, there's no lexer available so "none" will do just fine.

Finally, there's one Makefile code block so highlight it with the "makefile" lexer.

---
 documentation/sdk-manual/working-projects.rst | 28 ++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)
documentation/sdk-manual/working-projects.rst +21 -7
index ceae1fedd..d64dae435 100644
@@ -56,7 +56,9 @@ project:
    Create the remaining
    three files as follows:
 
-   -  ``hello.c``::
+   -  ``hello.c``:
+
+      .. code-block:: c
 
          #include <stdio.h>
 
@@ -66,7 +68,9 @@ project:
                  return 0;
              }
 
-   -  ``configure.ac``::
+   -  ``configure.ac``:
+
+      .. code-block:: none
 
          AC_INIT(hello,0.1)
          AM_INIT_AUTOMAKE([foreign])
@@ -74,7 +78,9 @@ project:
          AC_CONFIG_FILES(Makefile)
          AC_OUTPUT
 
-   -  ``Makefile.am``::
+   -  ``Makefile.am``:
+
+      .. code-block:: none
 
          bin_PROGRAMS = hello
          hello_SOURCES = hello.c
@@ -271,7 +277,9 @@ example:
 
    Create the three files as follows:
 
-   -  ``main.c``::
+   -  ``main.c``:
+
+      .. code-block:: c
 
          #include "module.h"
          void sample_func();
@@ -281,12 +289,16 @@ example:
              return 0;
          }
 
-   -  ``module.h``::
+   -  ``module.h``:
+
+      .. code-block:: c
 
          #include <stdio.h>
          void sample_func();
 
-   -  ``module.c``::
+   -  ``module.c``:
+
+      .. code-block:: c
 
          #include "module.h"
          void sample_func()
@@ -321,7 +333,9 @@ example:
    two lines that can be used to set the :term:`CC` variable. One line is
    identical to the value that is set when you run the SDK environment
    setup script, and the other line sets :term:`CC` to "gcc", the default
-   GNU compiler on the build host::
+   GNU compiler on the build host:
+
+   .. code-block:: Makefile
 
       # CC=i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/2.5/sysroots/i586-poky-linux
       # CC="gcc"
Signature · 1 line
2.52.0
#5 lore raw

PATCH v2 5/12 sdk-manual: appending-customizing: use none lexer for BitBake code blocks

In reply to Quentin Schulz

From: Quentin Schulz <[email protected]>

No lexer exists for BitBake right now, so let's simply disable the lexer entirely by using the "none" lexer.

I'm using "none" instead of "text" to be able to "easily" replace none code blocks the day a BitBake lexer exists. I "reserve" "text" for actual text content (e.g. a filename, or the output of a command line without the command line).

---
 documentation/sdk-manual/appendix-customizing.rst | 32 +++++++++++++++++------
 1 file changed, 24 insertions(+), 8 deletions(-)
documentation/sdk-manual/appendix-customizing.rst +24 -8
index e984b86bd..467c5c10c 100644
@@ -147,7 +147,9 @@ from the :term:`DISTRO` variable.
 The
 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
 class defines the default value of the :term:`SDK_TITLE` variable as
-follows::
+follows:
+
+.. code-block:: none
 
    SDK_TITLE ??= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
 
@@ -159,7 +161,9 @@ an example, assume you have your own layer for your distribution named
 does the default "poky" distribution. If so, you could update the
 :term:`SDK_TITLE` variable in the
 ``~/meta-mydistro/conf/distro/mydistro.conf`` file using the following
-form::
+form:
+
+.. code-block:: none
 
    SDK_TITLE = "your_title"
 
@@ -214,7 +218,9 @@ installation directory for the SDK is based on the
 :term:`SDKEXTPATH` variables from
 within the
 :ref:`populate_sdk_base <ref-classes-populate-sdk-*>`
-class as follows::
+class as follows:
+
+.. code-block:: none
 
    SDKEXTPATH ??= "~/${@d.getVar('DISTRO')}_sdk"
 
@@ -231,7 +237,9 @@ assume you have your own layer for your distribution named
 does the default "poky" distribution. If so, you could update the
 :term:`SDKEXTPATH` variable in the
 ``~/meta-mydistro/conf/distro/mydistro.conf`` file using the following
-form::
+form:
+
+.. code-block:: none
 
    SDKEXTPATH = "some_path_for_your_installed_sdk"
 
@@ -265,7 +273,9 @@ source, you need to do a number of things:
 
 #. Set the appropriate configuration so that the produced SDK knows how
    to find the configuration. The variable you need to set is
-   :term:`SSTATE_MIRRORS`::
+   :term:`SSTATE_MIRRORS`:
+
+   .. code-block:: none
 
       SSTATE_MIRRORS = "file://.* https://example.com/some_path/sstate-cache/PATH"
 
@@ -278,7 +288,9 @@ source, you need to do a number of things:
       side, and its contents will not interfere with the build), then
       you can set the variable in your ``local.conf`` or custom distro
       configuration file. You can then pass the variable to the SDK by
-      adding the following::
+      adding the following:
+
+      .. code-block:: none
 
          ESDK_LOCALCONF_ALLOW = "SSTATE_MIRRORS"
 
@@ -301,7 +313,9 @@ everything needed to reconstruct the image for which the SDK was built.
 This bundling can lead to an SDK installer file that is a Gigabyte or
 more in size. If the size of this file causes a problem, you can build
 an SDK that has just enough in it to install and provide access to the
-``devtool command`` by setting the following in your configuration::
+``devtool command`` by setting the following in your configuration:
+
+.. code-block:: none
 
    SDK_EXT_TYPE = "minimal"
 
@@ -323,7 +337,9 @@ information enables the ``devtool search`` command to return useful
 results.
 
 To facilitate this wider range of information, you would need to set the
-following::
+following:
+
+.. code-block:: none
 
    SDK_INCLUDE_PKGDATA = "1"
 
Signature · 1 line
2.52.0
#6 lore raw

PATCH v2 6/12 sdk-manual: appendix-obtain: replace directory structure PNG with a parsed-literal block

In reply to Quentin Schulz

From: Quentin Schulz <[email protected]>

This PNG is totally unnecessary and makes accessibility much worse, so let's simply replace the PNG with a parsed-literal block showing the same directory layout with the same highlighted placeholders.

While at it, update the layout to match the more recent one (5.0.15) and have it alphabetically sorted (mixed files and directories).

The placeholders are highlighted the same way inside and outside the parsed-literal block for consistency.

---
 documentation/sdk-manual/appendix-obtain.rst       |  50 ++++++++++++++++-----
 .../sdk-installed-extensible-sdk-directory.png     | Bin 66753 -> 0 bytes
 2 files changed, 39 insertions(+), 11 deletions(-)
documentation/sdk-manual/appendix-obtain.rst +39 -11
index 9590cf95a..26c39f17f 100644
@@ -276,24 +276,52 @@ Follow these steps to extract the root filesystem:
 Installed Standard SDK Directory Structure
 ==========================================
 
-The following figure shows the resulting directory structure after you
-install the Standard SDK by running the ``*.sh`` SDK installation
-script:
+After you install the Standard SDK by running the ``*.sh`` SDK installation
+script, the following directory structure should be observed:
 
-.. image:: figures/sdk-installed-standard-sdk-directory.png
-   :scale: 100%
+.. parsed-literal::
+
+   *install_dir*/*version*/
+   ├── buildinfo
+   ├── environment-setup-*target*-poky-linux
+   ├── site-config-*target*-poky-linux
+   ├── sysroots/
+   │   ├── *target*-poky-linux/
+   │   │   ├── bin/
+   │   │   ├── boot/
+   │   │   ├── etc/
+   │   │   ├── home/
+   │   │   ├── lib/
+   │   │   ├── media/
+   │   │   ├── mnt/
+   │   │   ├── proc/
+   │   │   ├── run/
+   │   │   ├── sbin/
+   │   │   ├── sys/
+   │   │   ├── tmp/
+   │   │   ├── usr/
+   │   │   └── var/
+   │   └── *host*-pokysdk-linux/
+   │       ├── bin/
+   │       ├── environment-setup.d/
+   │       ├── etc/
+   │       ├── lib/
+   │       ├── sbin/
+   │       ├── usr/
+   │       └── var/
+   └── version-*target*-poky-linux
 
 The installed SDK consists of an environment setup script for the SDK, a
 configuration file for the target, a version file for the target, and
 the root filesystem (``sysroots``) needed to develop objects for the
 target system.
 
-Within the figure, italicized text is used to indicate replaceable
-portions of the file or directory name. For example, install_dir/version
-is the directory where the SDK is installed. By default, this directory
-is ``/opt/poky/``. And, version represents the specific snapshot of the
-SDK (e.g. &DISTRO;). Furthermore, target represents the target architecture
-(e.g. ``i586``) and host represents the development system's
+In the layout above, italicized text is used to indicate replaceable
+portions of the file or directory name. For example, *install_dir*/*version*
+is the directory where the SDK is installed. By default, *install_dir*
+is ``/opt/poky/``. And, *version* represents the specific snapshot of the
+SDK (e.g. &DISTRO;). Furthermore, *target* represents the target architecture
+(e.g. ``i586``) and *host* represents the development system's
 architecture (e.g. ``x86_64``). Thus, the complete names of the two
 directories within the ``sysroots`` could be ``i586-poky-linux`` and
 ``x86_64-pokysdk-linux`` for the target and host, respectively.
documentation/sdk-manual/figures/sdk-installed-extensible-sdk-directory.png deleted binary +0 -0
deleted file mode 100644
index b71c8ad73c3e5eddcb0708c0bd6ad2118a922961..0000000000000000000000000000000000000000
GIT binary patch
Signature · 1 line
2.52.0
#7 lore raw

PATCH v2 7/12 sdk-manual: appendix-obtain: replace eSDK directory structure PNG with a parsed-literal block

In reply to Quentin Schulz

From: Quentin Schulz <[email protected]>

This PNG is totally unnecessary and makes accessibility much worse, so let's simply replace the PNG with a parsed-literal block showing the same directory layout with the same highlighted placeholders.

While at it, update the layout to match the more recent one (5.0.15) and have it alphabetically sorted (mixed files and directories).

The placeholders are highlighted the same way inside and outside the parsed-literal block for consistency.

---
 documentation/sdk-manual/appendix-obtain.rst       |  34 +++++++++++++++------
 .../sdk-installed-standard-sdk-directory.png       | Bin 39099 -> 0 bytes
 2 files changed, 25 insertions(+), 9 deletions(-)
documentation/sdk-manual/appendix-obtain.rst +25 -9
index 26c39f17f..7fbb72d54 100644
@@ -329,13 +329,29 @@ directories within the ``sysroots`` could be ``i586-poky-linux`` and
 Installed Extensible SDK Directory Structure
 ============================================
 
-The following figure shows the resulting directory structure after you
-install the Extensible SDK by running the ``*.sh`` SDK installation
-script:
+After you install the Extensible SDK by running the ``*.sh`` SDK installation
+script, the following directory structure should be observed:
 
-.. image:: figures/sdk-installed-extensible-sdk-directory.png
-   :scale: 80%
-   :align: center
+.. parsed-literal::
+
+   *install_dir*/
+   ├── bitbake-cookerdaemon.log
+   ├── buildinfo
+   ├── buildtools/
+   ├── cache/
+   ├── conf/
+   ├── .devtoolbase
+   ├── downloads/
+   ├── environment-setup-*target*-poky-linux
+   ├── layers/
+   ├── oe-time-dd-test.dat
+   ├── preparing_system_build.log
+   ├── site-config-*target*-poky-linux
+   ├── sstate-cache/
+   ├── sysroots/
+   ├── tmp/
+   ├── version-*target*-poky-linux
+   └── workspace/
 
 The installed directory structure for the extensible SDK is quite
 different than the installed structure for the standard SDK. The
@@ -348,7 +364,7 @@ the SDK, a configuration file for the target, a version file for the
 target, and log files for the OpenEmbedded build system preparation
 script run by the installer and BitBake.
 
-Within the figure, italicized text is used to indicate replaceable
-portions of the file or directory name. For example, install_dir is the
+In the layout above, italicized text is used to indicate replaceable
+portions of the file or directory name. For example, *install_dir* is the
 directory where the SDK is installed, which is ``poky_sdk`` by default,
-and target represents the target architecture (e.g. ``i586``).
+and *target* represents the target architecture (e.g. ``i586``).
documentation/sdk-manual/figures/sdk-installed-standard-sdk-directory.png deleted binary +0 -0
deleted file mode 100644
index 45c0154b19f3dc93cdb6819592a7f2ad5013b5b2..0000000000000000000000000000000000000000
GIT binary patch
Signature · 1 line
2.52.0
#8 lore raw

PATCH v2 8/12 sdk-manual: replace sdk-environment PNG with SVG

In reply to Quentin Schulz

From: Quentin Schulz <[email protected]>

This replaces the PNG figure with an SVG.

---
 .../sdk-manual/figures/sdk-environment.png         | Bin 42098 -> 0 bytes
 documentation/sdk-manual/intro.rst                 |   2 +-
 documentation/sdk-manual/svg/sdk-environment.svg   | 463 +++++++++++++++++++++
 3 files changed, 464 insertions(+), 1 deletion(-)
documentation/sdk-manual/figures/sdk-environment.png deleted binary +0 -0
deleted file mode 100644
index 78b8cad39e38e7cba2c25a9f035f0bbfcb022fee..0000000000000000000000000000000000000000
GIT binary patch
documentation/sdk-manual/intro.rst +1 -1
index fbfc8c2ac..c96e58dd7 100644
@@ -148,7 +148,7 @@ SDK Development Model
 
 Fundamentally, the SDK fits into the development process as follows:
 
-.. image:: figures/sdk-environment.png
+.. image:: svg/sdk-environment.*
    :width: 100%
 
 The SDK is installed on any machine and can be used to develop applications,
documentation/sdk-manual/svg/sdk-environment.svg new file +463 -0

463 lines not on this page · raw message

Signature · 1 line
2.52.0
#9 lore raw

PATCH v2 9/12 sdk-manual: delete sdk-title PNG

In reply to Quentin Schulz

From: Quentin Schulz <[email protected]>

It hasn't been used since the migration to Sphinx so let's remove it.

---
 documentation/sdk-manual/figures/sdk-title.png | Bin 31039 -> 0 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
documentation/sdk-manual/figures/sdk-title.png deleted binary +0 -0
deleted file mode 100644
index e69e03935a90f33a52b1fb63c54bc2a4dde25cda..0000000000000000000000000000000000000000
GIT binary patch
Signature · 1 line
2.52.0
#10 lore raw

PATCH v2 10/12 sdk-manual: appendix-obtain: use parsed-literal block for naming convention of the installer scripts

In reply to Quentin Schulz

From: Quentin Schulz <[email protected]>

It's easier on the eye to use a parsed-literal block for highlighting things that must be changed than simply stating the word, so this makes use of a parsed-literal block instead of a simple inline code-block and also highlight in italic which words are placeholders.

Also make the explanation below the literal-block use the same highlighting (italic).

---
 documentation/sdk-manual/appendix-obtain.rst | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)
documentation/sdk-manual/appendix-obtain.rst +19 -9
index 7fbb72d54..34a3f5bbb 100644
@@ -40,15 +40,20 @@ Follow these steps to locate and hand-install the toolchain:
    hardware, and image type.
 
    The installer files (``*.sh``) follow this naming convention:
-   ``poky-glibc-host_system-core-image-type-arch-toolchain[-ext]-release.sh``:
 
-   -  ``host_system``: string representing your development system: ``i686`` or ``x86_64``
+   .. parsed-literal::
 
-   -  ``type``: string representing the image: ``sato`` or ``minimal``
+      poky-glibc-*host_system*-core-image-*type*-*arch*-toolchain[-ext]-*release*.sh
 
-   -  ``arch``: string representing the target architecture such as ``cortexa57-qemuarm64``
+   With:
 
-   -  ``release``: version of the Yocto Project.
+   -  *host_system*: string representing your development system: ``i686`` or ``x86_64``
+
+   -  *type*: string representing the image: ``sato`` or ``minimal``
+
+   -  *arch*: string representing the target architecture such as ``cortexa57-qemuarm64``
+
+   -  *release*: version of the Yocto Project.
 
    .. note::
       The standard SDK installer does not have the ``-ext`` string as
@@ -223,14 +228,19 @@ Follow these steps to extract the root filesystem:
    also contain flattened root filesystem image files (``*.ext4``),
    which you can use with QEMU directly.
 
-   The pre-built root filesystem image files follow the
-   ``core-image-profile-machine.tar.bz2`` naming convention:
+   The pre-built root filesystem image files follow this naming convention:
 
-   -  ``profile``: filesystem image's profile, such as ``minimal``,
+   .. parsed-literal::
+
+      core-image-*profile*-*machine*.tar.bz2
+
+   With:
+
+   -  *profile*: filesystem image's profile, such as ``minimal``,
       ``minimal-dev`` or ``sato``. For information on these types of image
       profiles, see the "Images" chapter in the Yocto Project Reference Manual.
 
-   -  ``machine``:  same string as the name of the parent download directory.
+   -  *machine*:  same string as the name of the parent download directory.
 
    The root filesystems
    provided by the Yocto Project are based off of the
Signature · 1 line
2.52.0
#11 lore raw

PATCH v2 11/12 sdk-manual: using: fix SDK filename example

In reply to Quentin Schulz

From: Quentin Schulz <[email protected]>

I'm pretty sure we meant to use the DISTRO poky.yaml.in placeholder which can only be replaced when surrounding by & and ; characters. Therefore let's fix this oversight.

Also, the example isn't actually pointing at the snapshot, but the actual release, so let's reword that as well so it matches the example. I decided to do that instead of adding +snapshot to the filename because the example in the next section is actually using that same filename so for consistency it seemed more appropriate.

---
 documentation/sdk-manual/using.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
documentation/sdk-manual/using.rst +2 -2
index 792e159bf..a53010f02 100644
@@ -70,11 +70,11 @@ Where:
 
 For example, the following SDK installer is for a 64-bit
 development host system and a i586-tuned target architecture based off
-the SDK for ``core-image-sato`` and using the current DISTRO snapshot:
+the SDK for ``core-image-sato`` and the ``&DISTRO;`` release:
 
 .. code-block:: text
 
-   poky-glibc-x86_64-core-image-sato-i586-toolchain-DISTRO.sh
+   poky-glibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
 
 .. note::
 
Signature · 1 line
2.52.0
#12 lore raw

PATCH v2 12/12 sdk-manual: appendix-obtain: fix default path for eSDK installer script

In reply to Quentin Schulz

From: Quentin Schulz <[email protected]>

The eSDK installer script installs in poky_sdk directory but under the user's home directory so let's make that explicit.

---
 documentation/sdk-manual/appendix-obtain.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
documentation/sdk-manual/appendix-obtain.rst +2 -2
index 34a3f5bbb..83eefecd6 100644
@@ -376,5 +376,5 @@ script run by the installer and BitBake.
 
 In the layout above, italicized text is used to indicate replaceable
 portions of the file or directory name. For example, *install_dir* is the
-directory where the SDK is installed, which is ``poky_sdk`` by default,
-and *target* represents the target architecture (e.g. ``i586``).
+directory where the SDK is installed, which is by default ``poky_sdk`` in your
+home directory and *target* represents the target architecture (e.g. ``i586``).
Signature · 1 line
2.52.0
#13 lore raw
In reply to Quentin Schulz

Hi,

Quoted 10 lines · Quentin Schulz

This migrates literal and code blocks to an explicit lexer in sdk-manual.

It also migrate one PNG to SVG (one that was "easy enough" for me to quickly do), as well as deleting an unused PNG.

In addition, this removes two PNGs in favor of simple parsed literal blocks when listing the directory layout as it doesn't bring anything valuable and makes accessibility worse.

Quoted 8 lines

Finally, it also fixes some improper indent that resulted in explanations unintentionally being part of a code-block.

---
Changes in v2:
- used parsed-literal blocks instead of code-blocks for directory layout,

It looks really good IMO! That's neat way to make some text stand-out in a code block. I also think this would be a good way to make text diagrams.

Thanks for taking the time to do this,

Antonin

Signature · 3 lines
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#14 lore raw
In reply to Quentin Schulz

Applied, thanks!

[01/12] sdk-manual: fix incorrect highlight language for text code-blocks

        commit: 72354c27000aba3ae583894ff6112a1a017e33d5
[02/12] sdk-manual: fix incorrect highlight language for console code-blocks
        commit: c6039ce11d638a0b64844480e51d126fcda304b4
[03/12] sdk-manual: fix improper indent of general form of tarball installer scripts
        commit: 04c883216158edafe6a4c4ddfb38f63ffb5d5c24
[04/12] sdk-manual: working-projects: properly highlight code code-blocks
        commit: 10d40604cb4affb17dda2253f82a2422d5a9bcf6
[05/12] sdk-manual: appending-customizing: use none lexer for BitBake code blocks
        commit: d682bce63cdc5aad9c2d3b932a6ba2d27ecfe107
[06/12] sdk-manual: appendix-obtain: replace directory structure PNG with a parsed-literal block
        commit: 0c68497ec5f6525483e5a98e15db24f651bf28ba
[07/12] sdk-manual: appendix-obtain: replace eSDK directory structure PNG with a parsed-literal block
        commit: 77b24b4a8d437797ab25dfeb37ae5cd911c52d31
[08/12] sdk-manual: replace sdk-environment PNG with SVG
        commit: 39fb148792cd6b8e567a496bdbe63a50759eef36
[09/12] sdk-manual: delete sdk-title PNG
        commit: ffaea8391b3d78c2ccf964474e03c50a1c043c6c
[10/12] sdk-manual: appendix-obtain: use parsed-literal block for naming convention of the installer scripts
        commit: 41ee642c33cc2e7435e6037bf49fe7495ffa6133
[11/12] sdk-manual: using: fix SDK filename example
        commit: ede411d70ffc837e5bea4666da9706e67960b0f2
[12/12] sdk-manual: appendix-obtain: fix default path for eSDK installer script
        commit: 52ec12522bad3bbdff937f1c66224aa9b2d299cd