From c380ba5a177de32e97820279685c4af6f837c010 Mon Sep 17 00:00:00 2001 From: Quentin Schulz Date: Wed, 7 Apr 2021 18:07:24 +0200 Subject: docs: replace anchor links Anchor links are treated by Sphinx as external links and are not checked during build, meaning it is impossible to know if a link becomes broken or not. As a matter of fact, most of the anchor links replaced in this commit were actually broken. The README now states that anchor links are forbidden so that there's no need to go through such a change later on. (From yocto-docs rev: de9e4d26b46afa3c79137d07529a74553400d2e0) Signed-off-by: Quentin Schulz Reviewed-by: Michael Opdenacker Signed-off-by: Richard Purdie --- documentation/kernel-dev/advanced.rst | 42 ++++++++++++++++----------------- documentation/kernel-dev/common.rst | 44 +++++++++++++++++------------------ documentation/kernel-dev/intro.rst | 3 +-- 3 files changed, 43 insertions(+), 46 deletions(-) (limited to 'documentation/kernel-dev') diff --git a/documentation/kernel-dev/advanced.rst b/documentation/kernel-dev/advanced.rst index dd0b76bc31..fb6dfca85f 100644 --- a/documentation/kernel-dev/advanced.rst +++ b/documentation/kernel-dev/advanced.rst @@ -56,8 +56,8 @@ using the same BSP description. Multiple Corei7-based BSPs could share the same "intel-corei7-64" value for ``KMACHINE``. It is important to realize that ``KMACHINE`` is just for kernel mapping, while ``MACHINE`` is the machine type within a BSP Layer. Even with this distinction, -however, these two variables can hold the same value. See the `BSP -Descriptions <#bsp-descriptions>`__ section for more information. +however, these two variables can hold the same value. See the +":ref:`kernel-dev/advanced:bsp descriptions`" section for more information. Every linux-yocto style recipe must also indicate the Linux kernel source repository branch used to build the Linux kernel. The @@ -87,7 +87,7 @@ Together with ``KMACHINE``, ``LINUX_KERNEL_TYPE`` defines the search arguments used by the kernel tools to find the appropriate description within the kernel Metadata with which to build out the sources and configuration. The linux-yocto recipes define "standard", "tiny", and -"preempt-rt" kernel types. See the "`Kernel Types <#kernel-types>`__" +"preempt-rt" kernel types. See the ":ref:`kernel-dev/advanced:kernel types`" section for more information on kernel types. During the build, the kern-tools search for the BSP description file @@ -123,8 +123,8 @@ the entries in ``KERNEL_FEATURES`` are dependent on their location within the kernel Metadata itself. The examples here are taken from the ``yocto-kernel-cache`` repository. Each branch of this repository contains "features" and "cfg" subdirectories at the top-level. For more -information, see the "`Kernel Metadata -Syntax <#kernel-metadata-syntax>`__" section. +information, see the ":ref:`kernel-dev/advanced:kernel metadata syntax`" +section. Kernel Metadata Syntax ====================== @@ -148,7 +148,7 @@ Features aggregate sources in the form of patches and configuration fragments into a modular reusable unit. You can use features to implement conceptually separate kernel Metadata descriptions such as pure configuration fragments, simple patches, complex features, and -kernel types. `Kernel types <#kernel-types>`__ define general kernel +kernel types. :ref:`kernel-dev/advanced:kernel types` define general kernel features and policy to be reused in the BSPs. BSPs define hardware-specific features and aggregate them with kernel @@ -167,10 +167,9 @@ following Metadata file hierarchy is recommended: ktypes/ patches/ -The ``bsp`` directory contains the `BSP -descriptions <#bsp-descriptions>`__. The remaining directories all -contain "features". Separating ``bsp`` from the rest of the structure -aids conceptualizing intended usage. +The ``bsp`` directory contains the :ref:`kernel-dev/advanced:bsp descriptions`. +The remaining directories all contain "features". Separating ``bsp`` from the +rest of the structure aids conceptualizing intended usage. Use these guidelines to help place your ``scc`` description files within the structure: @@ -198,11 +197,12 @@ contain "features" as far as the kernel tools are concerned. Paths used in kernel Metadata files are relative to base, which is either :term:`FILESEXTRAPATHS` if -you are creating Metadata in `recipe-space <#recipe-space-metadata>`__, +you are creating Metadata in +:ref:`recipe-space `, or the top level of :yocto_git:`yocto-kernel-cache ` -if you are creating `Metadata outside of the -recipe-space <#metadata-outside-the-recipe-space>`__. +if you are creating +:ref:`kernel-dev/advanced:metadata outside the recipe-space`. .. [1] ``scc`` stands for Series Configuration Control, but the naming has @@ -353,9 +353,9 @@ as how an additional feature description file is included with the Typically, features are less granular than configuration fragments and are more likely than configuration fragments and patches to be the types of things you want to specify in the ``KERNEL_FEATURES`` variable of the -Linux kernel recipe. See the "`Using Kernel Metadata in a -Recipe <#using-kernel-metadata-in-a-recipe>`__" section earlier in the -manual. +Linux kernel recipe. See the +":ref:`kernel-dev/advanced:using kernel metadata in a recipe`" section earlier +in the manual. Kernel Types ------------ @@ -364,7 +364,7 @@ A kernel type defines a high-level kernel policy by aggregating non-hardware configuration fragments with patches you want to use when building a Linux kernel of a specific type (e.g. a real-time kernel). Syntactically, kernel types are no different than features as described -in the "`Features <#features>`__" section. The +in the ":ref:`kernel-dev/advanced:features`" section. The :term:`LINUX_KERNEL_TYPE` variable in the kernel recipe selects the kernel type. For example, in the ``linux-yocto_4.12.bb`` kernel recipe found in @@ -540,7 +540,7 @@ example, this is done using the following: This file aggregates all the configuration fragments, patches, and features that make up your standard kernel -policy. See the "`Kernel Types <#kernel-types>`__" section for more +policy. See the ":ref:`kernel-dev/advanced:kernel types`" section for more information. To aggregate common configurations and features specific to the kernel @@ -825,11 +825,11 @@ Given this scenario, you do not need to create any branches in the source repository. Rather, you just take the static patches you need and encapsulate them within a feature description. Once you have the feature description, you simply include that into the BSP description as -described in the "`BSP Descriptions <#bsp-descriptions>`__" section. +described in the ":ref:`kernel-dev/advanced:bsp descriptions`" section. You can find information on how to create patches and BSP descriptions -in the "`Patches <#patches>`__" and "`BSP -Descriptions <#bsp-descriptions>`__" sections. +in the ":ref:`kernel-dev/advanced:patches`" and +":ref:`kernel-dev/advanced:bsp descriptions`" sections. Machine Branches ---------------- diff --git a/documentation/kernel-dev/common.rst b/documentation/kernel-dev/common.rst index 3878f831be..56217b9d38 100644 --- a/documentation/kernel-dev/common.rst +++ b/documentation/kernel-dev/common.rst @@ -365,8 +365,7 @@ section: At this point, you are ready to start making modifications to the kernel using traditional kernel development steps. For a continued example, see -the "`Using Traditional Kernel Development to Patch the -Kernel <#using-traditional-kernel-development-to-patch-the-kernel>`__" +the ":ref:`kernel-dev/common:using traditional kernel development to patch the kernel`" section. Creating and Preparing a Layer @@ -463,8 +462,8 @@ Modifying an existing recipe can consist of the following: - :ref:`kernel-dev/common:changing the configuration` Before modifying an existing recipe, be sure that you have created a -minimal, custom layer from which you can work. See the "`Creating and -Preparing a Layer <#creating-and-preparing-a-layer>`__" section for +minimal, custom layer from which you can work. See the +":ref:`kernel-dev/common:creating and preparing a layer`" section for information. Creating the Append File @@ -710,7 +709,7 @@ Linux kernel, BitBake detects the change in the recipe and fetches and applies the new configuration before building the kernel. For a detailed example showing how to configure the kernel, see the -"`Configuring the Kernel <#configuring-the-kernel>`__" section. +":ref:`kernel-dev/common:configuring the kernel`" section. Using an "In-Tree"  ``defconfig`` File -------------------------------------- @@ -954,15 +953,14 @@ emulator console output at boot time through ``printk`` statements in the kernel's ``calibrate.c`` source code file. Applying the patch and booting the modified image causes the added messages to appear on the emulator's console. The example is a continuation of the setup procedure -found in the "`Getting Ready for Traditional Kernel -Development <#getting-ready-for-traditional-kernel-development>`__" +found in the +":ref:`kernel-dev/common:getting ready for traditional kernel development`" Section. 1. *Edit the Source Files* Prior to this step, you should have used Git to create a local copy of the repository for your kernel. Assuming - you created the repository as directed in the "`Getting Ready for - Traditional Kernel - Development <#getting-ready-for-traditional-kernel-development>`__" + you created the repository as directed in the + ":ref:`kernel-dev/common:getting ready for traditional kernel development`" section, use the following commands to edit the ``calibrate.c`` file: 1. *Change the working directory*: You need to locate the source @@ -1104,9 +1102,9 @@ Section. The :term:`FILESEXTRAPATHS` and :term:`SRC_URI` statements enable the OpenEmbedded build system to find the patch file. - For more information on append files and patches, see the "`Creating - the Append File <#creating-the-append-file>`__" and "`Applying - Patches <#applying-patches>`__" sections. You can also see the + For more information on append files and patches, see the + ":ref:`kernel-dev/common:creating the append file`" and + ":ref:`kernel-dev/common:applying patches`" sections. You can also see the ":ref:`dev-manual/common-tasks:using .bbappend files in your layer`" section in the Yocto Project Development Tasks Manual. @@ -1140,8 +1138,8 @@ configuration fragments, and how to interactively modify your ``.config`` file to create the leanest kernel configuration file possible. -For more information on kernel configuration, see the "`Changing the -Configuration <#changing-the-configuration>`__" section. +For more information on kernel configuration, see the +":ref:`kernel-dev/common:changing the configuration`" section. Using  ``menuconfig`` --------------------- @@ -1297,8 +1295,8 @@ created to hold the configuration changes. applies these on top of and after applying the existing ``defconfig`` file configurations. -For more information on configuring the kernel, see the "`Changing the -Configuration <#changing-the-configuration>`__" section. +For more information on configuring the kernel, see the +":ref:`kernel-dev/common:changing the configuration`" section. Creating Configuration Fragments -------------------------------- @@ -1369,8 +1367,8 @@ steps: $ bitbake linux-yocto -c diffconfig The ``diffconfig`` command creates a file that is a list of Linux kernel -``CONFIG_`` assignments. See the "`Changing the -Configuration <#changing-the-configuration>`__" section for additional +``CONFIG_`` assignments. See the +":ref:`kernel-dev/common:changing the configuration`" section for additional information on how to use the output as a configuration fragment. .. note:: @@ -1614,8 +1612,7 @@ source directory. Follow these steps to clean up the version string: ":ref:`kernel-dev/common:using \`\`devtool\`\` to patch the kernel`" section. For information on building the kernel image when using Bitbake, see the - "`Using Traditional Kernel Development to Patch the - Kernel <#using-traditional-kernel-development-to-patch-the-kernel>`__" + ":ref:`kernel-dev/common:using traditional kernel development to patch the kernel`" section. Working With Your Own Sources @@ -1733,8 +1730,9 @@ Here are some basic steps you can use to work with your own sources: 5. *Customize Your Recipe as Needed:* Provide further customizations to your recipe as needed just as you would customize an existing - linux-yocto recipe. See the "`Modifying an Existing - Recipe <#modifying-an-existing-recipe>`__" section for information. + linux-yocto recipe. See the + ":ref:`ref-manual/devtool-reference:modifying an existing recipe`" section + for information. Working with Out-of-Tree Modules ================================ diff --git a/documentation/kernel-dev/intro.rst b/documentation/kernel-dev/intro.rst index f6c9b97137..5592f74c82 100644 --- a/documentation/kernel-dev/intro.rst +++ b/documentation/kernel-dev/intro.rst @@ -90,8 +90,7 @@ understand the following documentation: - The ":ref:`dev-manual/common-tasks:understanding and creating layers`" section in the Yocto Project Development Tasks Manual. -- The "`Kernel Modification - Workflow <#kernel-modification-workflow>`__" section. +- The ":ref:`kernel-dev/intro:kernel modification workflow`" section. Kernel Modification Workflow ============================ -- cgit v1.2.3-54-g00ecf