ref-manual: add description for the "sysroot" term

Message ID 20220613155939.94911-1-michael.opdenacker@bootlin.com
State New
Headers show
Series ref-manual: add description for the "sysroot" term | expand

Commit Message

Michael Opdenacker June 13, 2022, 3:59 p.m. UTC
From: Michael Opdenacker <michael.opdenacker@bootlin.com>

This term is used throughout the manual but is not properly
introduced anywhere.

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
 documentation/ref-manual/terms.rst | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

Comments

Richard Purdie June 13, 2022, 4:55 p.m. UTC | #1
On Mon, 2022-06-13 at 17:59 +0200, Michael Opdenacker via
lists.yoctoproject.org wrote:
> From: Michael Opdenacker <michael.opdenacker@bootlin.com>
> 
> This term is used throughout the manual but is not properly
> introduced anywhere.
> 
> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
> ---
>  documentation/ref-manual/terms.rst | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/documentation/ref-manual/terms.rst b/documentation/ref-manual/terms.rst
> index cba514c345..76f3fb0d08 100644
> --- a/documentation/ref-manual/terms.rst
> +++ b/documentation/ref-manual/terms.rst
> @@ -383,6 +383,31 @@ universal, the list includes them just in case:
>       ":ref:`overview-manual/development-environment:repositories, tags, and branches`"
>       section in the Yocto Project Overview and Concepts Manual.
>  
> +   :term:`Sysroot`
> +

How about:

"""
When cross compiling, the target file system may be differently laid
out and contain different things to the of the host system. The concept
of a sysroot is directory which looks like the target filesystem and
can be used to cross compile against.
"""

then go on and explain target vs. native. 


Cheers,

Richard
Michael Opdenacker June 14, 2022, 5:20 p.m. UTC | #2
Hi Richard,

On 6/13/22 18:55, Richard Purdie wrote:
> On Mon, 2022-06-13 at 17:59 +0200, Michael Opdenacker via
> lists.yoctoproject.org wrote:
>> From: Michael Opdenacker <michael.opdenacker@bootlin.com>
>>
>> This term is used throughout the manual but is not properly
>> introduced anywhere.
>>
>> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
>> ---
>>   documentation/ref-manual/terms.rst | 25 +++++++++++++++++++++++++
>>   1 file changed, 25 insertions(+)
>>
>> diff --git a/documentation/ref-manual/terms.rst b/documentation/ref-manual/terms.rst
>> index cba514c345..76f3fb0d08 100644
>> --- a/documentation/ref-manual/terms.rst
>> +++ b/documentation/ref-manual/terms.rst
>> @@ -383,6 +383,31 @@ universal, the list includes them just in case:
>>        ":ref:`overview-manual/development-environment:repositories, tags, and branches`"
>>        section in the Yocto Project Overview and Concepts Manual.
>>   
>> +   :term:`Sysroot`
>> +
> How about:
>
> """
> When cross compiling, the target file system may be differently laid
> out and contain different things to the of the host system. The concept
> of a sysroot is directory which looks like the target filesystem and
> can be used to cross compile against.
> """
>
> then go on and explain target vs. native.


Thanks for the better description! I sent a new version with it, though 
I forgot to call it "v2".
Were you suggesting to drop the description of what a sysroot is in the 
context of a cross-compiling toolchain?

Thanks again for the review
Michael.

Patch

diff --git a/documentation/ref-manual/terms.rst b/documentation/ref-manual/terms.rst
index cba514c345..76f3fb0d08 100644
--- a/documentation/ref-manual/terms.rst
+++ b/documentation/ref-manual/terms.rst
@@ -383,6 +383,31 @@  universal, the list includes them just in case:
      ":ref:`overview-manual/development-environment:repositories, tags, and branches`"
      section in the Yocto Project Overview and Concepts Manual.
 
+   :term:`Sysroot`
+
+      A directory considered as the root directory for locating
+      header and library files needed to generate binaries for a target
+      processor architecture.
+
+      In the context of cross-compiling toolchains, a *sysroot*
+      typically contains C library and kernel headers, plus the
+      compiled binaries for the C library. A *multilib toolchain*
+      can contain multiple variants of the C library binaries,
+      each compiled for a target instruction set (such as ``armv5``,
+      ``armv7`` and ``armv8``), and possibly optimized for a specific CPU core.
+
+      In the more specific context of the OpenEmbedded build System and
+      of the Yocto Project, each recipe has two *sysroots*:
+
+      -  A *target sysroot* contains all the **target** libraries and headers
+         needed to build the recipe.
+
+      -  A *native sysroot* contains all the **host** files and executables
+         needed to build the recipe.
+
+      See the :term:`SYSROOT_* <SYSROOT_DESTDIR>` variables controlling
+      how sysroots are created and stored.
+
    :term:`Task`
       A per-recipe unit of execution for BitBake (e.g.
       :ref:`ref-tasks-compile`,