* [mickledore][PATCH 00/13] mickledore documentation backports
@ 2023-10-24 13:23 michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 01/13] ref-manual: Warn about COMPATIBLE_MACHINE skipping native recipes michael.opdenacker
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: michael.opdenacker @ 2023-10-24 13:23 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
Corresponding to changes in master which are
also applicable to mickledore
Arne Schwerdt (1):
ref-manual: Warn about COMPATIBLE_MACHINE skipping native recipes
BELHADJ SALEM Talel (5):
ref-manual: Fix PACKAGECONFIG term and add an example
dev-manual: layers: Add notes about layer.conf
ref-manual: variables: add RECIPE_SYSROOT and RECIPE_SYSROOT_NATIVE
ref-manual: variables: add TOOLCHAIN_OPTIONS variable
ref-manual: variables: add example for SYSROOT_DIRS variable
Michael Opdenacker (4):
bsp-guide: bsp: skip Intel machines no longer supported in Poky
sdk-manual: appendix-obtain: improve and update descriptions
brief-yoctoprojectqs: use new CDN mirror for sstate
dev-manual: start.rst: remove obsolete reference
Quentin Schulz (1):
ref-manual: variables: provide no-match example for COMPATIBLE_MACHINE
Robert P. J. Day (2):
dev-manual: new-recipe.rst: add missing parenthesis to "Patching Code"
section
profile-manual: aesthetic cleanups
documentation/brief-yoctoprojectqs/index.rst | 2 +-
documentation/bsp-guide/bsp.rst | 14 --
documentation/dev-manual/layers.rst | 14 ++
documentation/dev-manual/new-recipe.rst | 4 +-
documentation/dev-manual/start.rst | 24 +---
documentation/profile-manual/intro.rst | 40 +++---
documentation/ref-manual/variables.rst | 142 ++++++++++++++++++-
documentation/sdk-manual/appendix-obtain.rst | 50 +++----
8 files changed, 198 insertions(+), 92 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [mickledore][PATCH 01/13] ref-manual: Warn about COMPATIBLE_MACHINE skipping native recipes
2023-10-24 13:23 [mickledore][PATCH 00/13] mickledore documentation backports michael.opdenacker
@ 2023-10-24 13:23 ` michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 02/13] bsp-guide: bsp: skip Intel machines no longer supported in Poky michael.opdenacker
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: michael.opdenacker @ 2023-10-24 13:23 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker, Arne Schwerdt
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
From: Arne Schwerdt <arne.schwerdt@elbbits.com>
Signed-off-by: Arne Schwerdt <arne.schwerdt@elbbits.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
documentation/ref-manual/variables.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 5722376815..445274f62f 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -1362,6 +1362,13 @@ system and gives an overview of their function and contents.
speed since the build system skips parsing recipes not compatible
with the current machine.
+ .. note::
+
+ When :term:`COMPATIBLE_MACHINE` is set in a recipe inherits from
+ native, the recipe is always skipped. All native recipes must be
+ entirely target independent and should not rely on :term:`MACHINE`.
+
+
:term:`COMPLEMENTARY_GLOB`
Defines wildcards to match when installing a list of complementary
packages for all the packages explicitly (or implicitly) installed in
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [mickledore][PATCH 02/13] bsp-guide: bsp: skip Intel machines no longer supported in Poky
2023-10-24 13:23 [mickledore][PATCH 00/13] mickledore documentation backports michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 01/13] ref-manual: Warn about COMPATIBLE_MACHINE skipping native recipes michael.opdenacker
@ 2023-10-24 13:23 ` michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 03/13] sdk-manual: appendix-obtain: improve and update descriptions michael.opdenacker
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: michael.opdenacker @ 2023-10-24 13:23 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker, Robert P . J . Day
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
---
documentation/bsp-guide/bsp.rst | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/documentation/bsp-guide/bsp.rst b/documentation/bsp-guide/bsp.rst
index c78fbeb68f..a32555b110 100644
--- a/documentation/bsp-guide/bsp.rst
+++ b/documentation/bsp-guide/bsp.rst
@@ -774,20 +774,6 @@ workflow.
- Two general IA platforms (``genericx86`` and ``genericx86-64``)
- - There are three core Intel BSPs in the Yocto Project
- release, in the ``meta-intel`` layer:
-
- - ``intel-core2-32``, which is a BSP optimized for the Core2
- family of CPUs as well as all CPUs prior to the Silvermont
- core.
-
- - ``intel-corei7-64``, which is a BSP optimized for Nehalem
- and later Core and Xeon CPUs as well as Silvermont and later
- Atom CPUs, such as the Baytrail SoCs.
-
- - ``intel-quark``, which is a BSP optimized for the Intel
- Galileo gen1 & gen2 development boards.
-
When you set up a layer for a new BSP, you should follow a standard
layout. This layout is described in the ":ref:`bsp-guide/bsp:example filesystem layout`"
section. In the standard layout, notice
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [mickledore][PATCH 03/13] sdk-manual: appendix-obtain: improve and update descriptions
2023-10-24 13:23 [mickledore][PATCH 00/13] mickledore documentation backports michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 01/13] ref-manual: Warn about COMPATIBLE_MACHINE skipping native recipes michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 02/13] bsp-guide: bsp: skip Intel machines no longer supported in Poky michael.opdenacker
@ 2023-10-24 13:23 ` michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 04/13] dev-manual: new-recipe.rst: add missing parenthesis to "Patching Code" section michael.opdenacker
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: michael.opdenacker @ 2023-10-24 13:23 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
- Improve text formatting
- Stop mentioning all possible values
- Update examples
- Correct descriptions
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
documentation/sdk-manual/appendix-obtain.rst | 50 +++++++-------------
1 file changed, 18 insertions(+), 32 deletions(-)
diff --git a/documentation/sdk-manual/appendix-obtain.rst b/documentation/sdk-manual/appendix-obtain.rst
index ba844507d3..be4928cf4d 100644
--- a/documentation/sdk-manual/appendix-obtain.rst
+++ b/documentation/sdk-manual/appendix-obtain.rst
@@ -39,27 +39,20 @@ Follow these steps to locate and hand-install the toolchain:
download the installer appropriate for your build host, target
hardware, and image type.
- The installer files (``*.sh``) follow this naming convention::
+ The installer files (``*.sh``) follow this naming convention:
+ ``poky-glibc-host_system-core-image-type-arch-toolchain[-ext]-release.sh``:
- poky-glibc-host_system-core-image-type-arch-toolchain[-ext]-release.sh
+ - ``host_system``: string representing your development system: ``i686`` or ``x86_64``
- Where:
- host_system is a string representing your development system:
- "i686" or "x86_64"
+ - ``type``: string representing the image: ``sato`` or ``minimal``
- type is a string representing the image:
- "sato" or "minimal"
+ - ``arch``: string representing the target architecture such as ``cortexa57-qemuarm64``
- arch is a string representing the target architecture:
- "aarch64", "armv5e", "core2-64", "cortexa8hf-neon", "i586", "mips32r2",
- "mips64", or "ppc7400"
-
- release is the version of Yocto Project.
-
- NOTE:
- The standard SDK installer does not have the "-ext" string as
- part of the filename.
+ - ``release``: version of the Yocto Project.
+ .. note::
+ The standard SDK installer does not have the ``-ext`` string as
+ part of the filename.
The toolchains provided by the Yocto
Project are based off of the ``core-image-sato`` and
@@ -67,16 +60,16 @@ Follow these steps to locate and hand-install the toolchain:
developing against those images.
For example, if your build host is a 64-bit x86 system and you need
- an extended SDK for a 64-bit core2 target, go into the ``x86_64``
+ an extended SDK for a 64-bit core2 QEMU target, go into the ``x86_64``
folder and download the following installer::
- poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh
+ poky-glibc-x86_64-core-image-sato-core2-64-qemux86-64-toolchain-&DISTRO;.sh
#. *Run the Installer:* Be sure you have execution privileges and run
the installer. Following is an example from the ``Downloads``
directory::
- $ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-toolchain-ext-&DISTRO;.sh
+ $ ~/Downloads/poky-glibc-x86_64-core-image-sato-core2-64-qemux86-64-toolchain-&DISTRO;.sh
During execution of the script, you choose the root location for the
toolchain. See the
@@ -215,21 +208,14 @@ 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 these naming
- conventions::
-
- core-image-profile-arch.tar.bz2
+ The pre-built root filesystem image files follow the
+ ``core-image-profile-machine.tar.bz2`` naming convention:
- Where:
- profile is the filesystem image's profile:
- lsb, lsb-dev, lsb-sdk, minimal, minimal-dev, minimal-initramfs,
- sato, sato-dev, sato-sdk, sato-sdk-ptest. For information on
- these types of image profiles, see the "Images" chapter in
- the Yocto Project Reference Manual.
+ - ``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.
- arch is a string representing the target architecture:
- beaglebone-yocto, beaglebone-yocto-lsb, edgerouter, edgerouter-lsb,
- genericx86, genericx86-64, genericx86-64-lsb, genericx86-lsb and qemu*.
+ - ``machine``: same string as the name of the parent download directory.
The root filesystems
provided by the Yocto Project are based off of the
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [mickledore][PATCH 04/13] dev-manual: new-recipe.rst: add missing parenthesis to "Patching Code" section
2023-10-24 13:23 [mickledore][PATCH 00/13] mickledore documentation backports michael.opdenacker
` (2 preceding siblings ...)
2023-10-24 13:23 ` [mickledore][PATCH 03/13] sdk-manual: appendix-obtain: improve and update descriptions michael.opdenacker
@ 2023-10-24 13:23 ` michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 05/13] ref-manual: Fix PACKAGECONFIG term and add an example michael.opdenacker
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: michael.opdenacker @ 2023-10-24 13:23 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker, Robert P . J . Day
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
From: Robert P. J. Day <rpjday@crashcourse.ca>
Add missing parenthesis, and another example of a compressed patch filename.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
documentation/dev-manual/new-recipe.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/documentation/dev-manual/new-recipe.rst b/documentation/dev-manual/new-recipe.rst
index a330a8f8c6..8d5d546923 100644
--- a/documentation/dev-manual/new-recipe.rst
+++ b/documentation/dev-manual/new-recipe.rst
@@ -409,8 +409,8 @@ Patching Code
Sometimes it is necessary to patch code after it has been fetched. Any
files mentioned in :term:`SRC_URI` whose names end in ``.patch`` or
-``.diff`` or compressed versions of these suffixes (e.g. ``diff.gz`` are
-treated as patches. The
+``.diff`` or compressed versions of these suffixes (e.g. ``diff.gz``,
+``patch.bz2``, etc.) are treated as patches. The
:ref:`ref-tasks-patch` task
automatically applies these patches.
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [mickledore][PATCH 05/13] ref-manual: Fix PACKAGECONFIG term and add an example
2023-10-24 13:23 [mickledore][PATCH 00/13] mickledore documentation backports michael.opdenacker
` (3 preceding siblings ...)
2023-10-24 13:23 ` [mickledore][PATCH 04/13] dev-manual: new-recipe.rst: add missing parenthesis to "Patching Code" section michael.opdenacker
@ 2023-10-24 13:23 ` michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 06/13] profile-manual: aesthetic cleanups michael.opdenacker
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: michael.opdenacker @ 2023-10-24 13:23 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker, Talel BELHAJSALEM
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
From: BELHADJ SALEM Talel <bhstalel@gmail.com>
PACKAGECONFIG's first and second flag value will be added to PACKAGECONFIG_CONFARGS
and then it will be added to the appropriate variable (EXTRA_OECMAKE, or ...)
So we need to only mention PACKAGECONFIG_CONFARGS and it will lead to other variables.
I added a custom example that can help understanding very well PACKAGECONFIG.
Signed-off-by: Talel BELHAJSALEM <bhstalel@gmail.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
documentation/ref-manual/variables.rst | 42 ++++++++++++++++++++++----
1 file changed, 36 insertions(+), 6 deletions(-)
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 445274f62f..8d557495d4 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -5925,13 +5925,11 @@ system and gives an overview of their function and contents.
omit any argument you like but must retain the separating commas. The
order is important and specifies the following:
- #. Extra arguments that should be added to the configure script
- argument list (:term:`EXTRA_OECONF` or
- :term:`PACKAGECONFIG_CONFARGS`) if
- the feature is enabled.
+ #. Extra arguments that should be added to :term:`PACKAGECONFIG_CONFARGS`
+ if the feature is enabled.
- #. Extra arguments that should be added to :term:`EXTRA_OECONF` or
- :term:`PACKAGECONFIG_CONFARGS` if the feature is disabled.
+ #. Extra arguments that should be added to :term:`PACKAGECONFIG_CONFARGS`
+ if the feature is disabled.
#. Additional build dependencies (:term:`DEPENDS`)
that should be added if the feature is enabled.
@@ -5989,6 +5987,38 @@ system and gives an overview of their function and contents.
PACKAGECONFIG:append:pn-recipename = " f4"
+ Consider the following example of a :ref:`ref-classes-cmake` recipe with a systemd service
+ in which :term:`PACKAGECONFIG` is used to transform the systemd service
+ into a feature that can be easily enabled or disabled via :term:`PACKAGECONFIG`::
+
+ example.c
+ example.service
+ CMakeLists.txt
+
+ The ``CMakeLists.txt`` file contains::
+
+ if(WITH_SYSTEMD)
+ install(FILES ${PROJECT_SOURCE_DIR}/example.service DESTINATION /etc/systemd/systemd)
+ endif(WITH_SYSTEMD)
+
+ In order to enable the installation of ``example.service`` we need to
+ ensure that ``-DWITH_SYSTEMD=ON`` is passed to the ``cmake`` command
+ execution. Recipes that have ``CMakeLists.txt`` generally inherit the
+ :ref:`ref-classes-cmake` class, that runs ``cmake`` with
+ :term:`EXTRA_OECMAKE`, which :term:`PACKAGECONFIG_CONFARGS` will be
+ appended to. Now, knowing that :term:`PACKAGECONFIG_CONFARGS` is
+ automatically filled with either the first or second element of
+ :term:`PACKAGECONFIG` flag value, the recipe would be like::
+
+ inherit cmake
+ PACKAGECONFIG = "systemd"
+ PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF"
+
+ A side note to this recipe is to check if ``systemd`` is in fact the used :term:`INIT_MANAGER`
+ or not::
+
+ PACKAGECONFIG = "${@'systemd' if d.getVar('INIT_MANAGER') == 'systemd' else ''}"
+
:term:`PACKAGECONFIG_CONFARGS`
A space-separated list of configuration options generated from the
:term:`PACKAGECONFIG` setting.
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [mickledore][PATCH 06/13] profile-manual: aesthetic cleanups
2023-10-24 13:23 [mickledore][PATCH 00/13] mickledore documentation backports michael.opdenacker
` (4 preceding siblings ...)
2023-10-24 13:23 ` [mickledore][PATCH 05/13] ref-manual: Fix PACKAGECONFIG term and add an example michael.opdenacker
@ 2023-10-24 13:23 ` michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 07/13] ref-manual: variables: provide no-match example for COMPATIBLE_MACHINE michael.opdenacker
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: michael.opdenacker @ 2023-10-24 13:23 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker, Robert P . J . Day
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
From: Robert P. J. Day <rpjday@crashcourse.ca>
Various aesthetic cleanups of section 1 of that manual, including:
* replace 'HOWTO' with manual
* add more examples of sdk-related images
* font fixes
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
documentation/profile-manual/intro.rst | 40 ++++++++++++++------------
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/documentation/profile-manual/intro.rst b/documentation/profile-manual/intro.rst
index 93f8429ee3..86310cf318 100644
--- a/documentation/profile-manual/intro.rst
+++ b/documentation/profile-manual/intro.rst
@@ -7,43 +7,45 @@ Yocto Project Profiling and Tracing Manual
Introduction
============
-Yocto bundles a number of tracing and profiling tools --- this 'HOWTO'
+Yocto Project bundles a number of tracing and profiling tools --- this manual
describes their basic usage and shows by example how to make use of them
-to examine application and system behavior.
+to analyze application and system behavior.
-The tools presented are for the most part completely open-ended and have
+The tools presented are, for the most part, completely open-ended and have
quite good and/or extensive documentation of their own which can be used
to solve just about any problem you might come across in Linux. Each
section that describes a particular tool has links to that tool's
documentation and website.
-The purpose of this 'HOWTO' is to present a set of common and generally
+The purpose of this manual is to present a set of common and generally
useful tracing and profiling idioms along with their application (as
appropriate) to each tool, in the context of a general-purpose
'drill-down' methodology that can be applied to solving a large number
-(90%?) of problems. For help with more advanced usages and problems,
-please see the documentation and/or websites listed for each tool.
+of problems. For help with more advanced usages and problems,
+refer to the documentation and/or websites provided for each tool.
-The final section of this 'HOWTO' is a collection of real-world examples
-which we'll be continually adding to as we solve more problems using the
-tools --- feel free to add your own examples to the list!
+The final section of this manual is a collection of real-world examples
+which we'll be continually updating as we solve more problems using the
+tools --- feel free to suggest additions to what you read here.
General Setup
=============
-Most of the tools are available only in 'sdk' images or in images built
-after adding 'tools-profile' to your local.conf. So, in order to be able
-to access all of the tools described here, please first build and boot
-an 'sdk' image e.g. ::
+Most of the tools are available only in ``sdk`` images or in images built
+after adding ``tools-profile`` to your ``local.conf`` file. So, in order to be able
+to access all of the tools described here, you can build and boot
+an ``sdk`` image, perhaps one of::
$ bitbake core-image-sato-sdk
+ $ bitbake core-image-weston-sdk
+ $ bitbake core-image-rt-sdk
-or alternatively by adding 'tools-profile' to the :term:`EXTRA_IMAGE_FEATURES` line in
-your local.conf::
+Alternatively, you can add ``tools-profile`` to the :term:`EXTRA_IMAGE_FEATURES` line in
+your ``local.conf`` file::
EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile"
-If you use the 'tools-profile' method, you don't need to build an sdk image -
+If you use the ``tools-profile`` method, you don't need to build an sdk image ---
the tracing and profiling tools will be included in non-sdk images as well e.g.::
$ bitbake core-image-sato
@@ -64,12 +66,12 @@ the tracing and profiling tools will be included in non-sdk images as well e.g.:
If you've already built a stripped image, you can generate debug
packages (xxx-dbg) which you can manually install as needed.
-To generate debug info for packages, you can add dbg-pkgs to
-:term:`EXTRA_IMAGE_FEATURES` in local.conf. For example::
+To generate debug info for packages, you can add ``dbg-pkgs`` to
+:term:`EXTRA_IMAGE_FEATURES` in ``local.conf``. For example::
EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile dbg-pkgs"
-Additionally, in order to generate the right type of debuginfo, we also need to
+Additionally, in order to generate the right type of debug info, we also need to
set :term:`PACKAGE_DEBUG_SPLIT_STYLE` in the ``local.conf`` file::
PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [mickledore][PATCH 07/13] ref-manual: variables: provide no-match example for COMPATIBLE_MACHINE
2023-10-24 13:23 [mickledore][PATCH 00/13] mickledore documentation backports michael.opdenacker
` (5 preceding siblings ...)
2023-10-24 13:23 ` [mickledore][PATCH 06/13] profile-manual: aesthetic cleanups michael.opdenacker
@ 2023-10-24 13:23 ` michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 08/13] dev-manual: layers: Add notes about layer.conf michael.opdenacker
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: michael.opdenacker @ 2023-10-24 13:23 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker, Quentin Schulz, Quentin Schulz
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
COMPATIBLE_MACHINE is used to forbid the use of a recipe or its packages
for a specific set of machines.
In some cases, it may make more sense to have the logic inverted and
have the recipe always forbidden except for hand-picked machines. Such
could be the case for pieces of software that only support some
architectures. In that scenario, it is sometimes a bit easier on the eye
and for maintenance to use the OVERRIDES mechanism but for that, a
default should be set.
COMPATIBLE_MACHINE:aarch64 = "^(aarch64)$"
COMPATIBLE_MACHINE:mips64 = "^(mips64)$"
wouldn't do much because if COMPATIBLE_MACHINE isn't set, the recipe is
assumed compatible and therefore, if no default is provided we enter
that case.
Hence, we need to add
COMPATIBLE_MACHINE = "^$"
as default so that it only matches the empty string, which isn't
possible for MACHINEOVERRIDES.
Cc: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
documentation/ref-manual/variables.rst | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 8d557495d4..eb19048db2 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -1362,13 +1362,32 @@ system and gives an overview of their function and contents.
speed since the build system skips parsing recipes not compatible
with the current machine.
+ If one wants to have a recipe only available for some architectures
+ (here ``aarch64`` and ``mips64``), the following can be used::
+
+ COMPATIBLE_MACHINE = "^$"
+ COMPATIBLE_MACHINE:arch64 = "^(aarch64)$"
+ COMPATIBLE_MACHINE:mips64 = "^(mips64)$"
+
+ The first line means "match all machines whose :term:`MACHINEOVERRIDES`
+ contains the empty string", which will always be none.
+
+ The second is for matching all machines whose :term:`MACHINEOVERRIDES`
+ contains one override which is exactly ``aarch64``.
+
+ The third is for matching all machines whose :term:`MACHINEOVERRIDES`
+ contains one override which is exactly ``mips64``.
+
+ The same could be achieved with::
+
+ COMPATIBLE_MACHINE = "^(aarch64|mips64)$"
+
.. note::
When :term:`COMPATIBLE_MACHINE` is set in a recipe inherits from
native, the recipe is always skipped. All native recipes must be
entirely target independent and should not rely on :term:`MACHINE`.
-
:term:`COMPLEMENTARY_GLOB`
Defines wildcards to match when installing a list of complementary
packages for all the packages explicitly (or implicitly) installed in
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [mickledore][PATCH 08/13] dev-manual: layers: Add notes about layer.conf
2023-10-24 13:23 [mickledore][PATCH 00/13] mickledore documentation backports michael.opdenacker
` (6 preceding siblings ...)
2023-10-24 13:23 ` [mickledore][PATCH 07/13] ref-manual: variables: provide no-match example for COMPATIBLE_MACHINE michael.opdenacker
@ 2023-10-24 13:23 ` michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 09/13] brief-yoctoprojectqs: use new CDN mirror for sstate michael.opdenacker
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: michael.opdenacker @ 2023-10-24 13:23 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker, Talel BELHAJSALEM
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
From: BELHADJ SALEM Talel <bhstalel@gmail.com>
As discussed before with Richard Purdie, the code supports this but the documentation does not.
Developers in general will not notice this or focus on it because they do not mess with the
layer.conf template file, but in my opinion I think more details can help.
Signed-off-by: Talel BELHAJSALEM <bhstalel@gmail.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
documentation/dev-manual/layers.rst | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/documentation/dev-manual/layers.rst b/documentation/dev-manual/layers.rst
index 2d809562d1..c65a94b4fa 100644
--- a/documentation/dev-manual/layers.rst
+++ b/documentation/dev-manual/layers.rst
@@ -128,6 +128,20 @@ Follow these general steps to create your layer without using tools:
variable is a good way to indicate if your particular layer is
current.
+
+ .. note::
+
+ A layer does not have to contain only recipes ``.bb`` or append files
+ ``.bbappend``. Generally, developers create layers using
+ ``bitbake-layers create-layer``.
+ See ":ref:`dev-manual/layers:creating a general layer using the \`\`bitbake-layers\`\` script`",
+ explaining how the ``layer.conf`` file is created from a template located in
+ ``meta/lib/bblayers/templates/layer.conf``.
+ In fact, none of the variables set in ``layer.conf`` are mandatory,
+ except when :term:`BBFILE_COLLECTIONS` is present. In this case
+ :term:`LAYERSERIES_COMPAT` and :term:`BBFILE_PATTERN` have to be
+ defined too.
+
#. *Add Content:* Depending on the type of layer, add the content. If
the layer adds support for a machine, add the machine configuration
in a ``conf/machine/`` file within the layer. If the layer adds
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [mickledore][PATCH 09/13] brief-yoctoprojectqs: use new CDN mirror for sstate
2023-10-24 13:23 [mickledore][PATCH 00/13] mickledore documentation backports michael.opdenacker
` (7 preceding siblings ...)
2023-10-24 13:23 ` [mickledore][PATCH 08/13] dev-manual: layers: Add notes about layer.conf michael.opdenacker
@ 2023-10-24 13:23 ` michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 10/13] dev-manual: start.rst: remove obsolete reference michael.opdenacker
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: michael.opdenacker @ 2023-10-24 13:23 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker, richard.purdie
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
Recommended instead of the Yocto Project mirror, because expected
to be faster. Make sure you only set one such mirror.
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
CC: richard.purdie@linuxfoundation.org
---
documentation/brief-yoctoprojectqs/index.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/documentation/brief-yoctoprojectqs/index.rst b/documentation/brief-yoctoprojectqs/index.rst
index 0ccffccc60..df8d75edc2 100644
--- a/documentation/brief-yoctoprojectqs/index.rst
+++ b/documentation/brief-yoctoprojectqs/index.rst
@@ -254,7 +254,7 @@ an entire Linux distribution, including the toolchain, from source.
BB_SIGNATURE_HANDLER = "OEEquivHash"
BB_HASHSERVE = "auto"
BB_HASHSERVE_UPSTREAM = "hashserv.yocto.io:8687"
- SSTATE_MIRRORS ?= "file://.* https://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH"
+ SSTATE_MIRRORS ?= "file://.* http://cdn.jsdelivr.net/yocto/sstate/all/PATH;downloadfilename=PATH"
#. **Start the Build:** Continue with the following command to build an OS
image for the target, which is ``core-image-sato`` in this example:
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [mickledore][PATCH 10/13] dev-manual: start.rst: remove obsolete reference
2023-10-24 13:23 [mickledore][PATCH 00/13] mickledore documentation backports michael.opdenacker
` (8 preceding siblings ...)
2023-10-24 13:23 ` [mickledore][PATCH 09/13] brief-yoctoprojectqs: use new CDN mirror for sstate michael.opdenacker
@ 2023-10-24 13:23 ` michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 11/13] ref-manual: variables: add RECIPE_SYSROOT and RECIPE_SYSROOT_NATIVE michael.opdenacker
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: michael.opdenacker @ 2023-10-24 13:23 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker, Robert P . J . Day
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
Remove a reference to a web resource which is clearly marked as obsolete.
Replace the unnecessarily verbose note by just links to the mentioned tools.
[YOCTO #15233]
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
---
documentation/dev-manual/start.rst | 24 ++++++------------------
1 file changed, 6 insertions(+), 18 deletions(-)
diff --git a/documentation/dev-manual/start.rst b/documentation/dev-manual/start.rst
index 88afa27ad5..4a556967eb 100644
--- a/documentation/dev-manual/start.rst
+++ b/documentation/dev-manual/start.rst
@@ -88,27 +88,15 @@ particular working environment and set of practices.
For information about BitBake, see the
:doc:`bitbake:index`.
- It is relatively easy to set up Git services and create
- infrastructure like :yocto_git:`/`, which is based on
- server software called ``gitolite`` with ``cgit`` being used to
- generate the web interface that lets you view the repositories. The
- ``gitolite`` software identifies users using SSH keys and allows
+ It is relatively easy to set up Git services and create infrastructure like
+ :yocto_git:`/`, which is based on server software called
+ `Gitolite <https://gitolite.com>`__
+ with `cgit <https://git.zx2c4.com/cgit/about/>`__ being used to
+ generate the web interface that lets you view the repositories.
+ ``gitolite`` identifies users using SSH keys and allows
branch-based access controls to repositories that you can control as
little or as much as necessary.
- .. note::
-
- The setup of these services is beyond the scope of this manual.
- However, here are sites describing how to perform setup:
-
- - `Gitolite <https://gitolite.com>`__: Information for
- ``gitolite``.
-
- - `Interfaces, frontends, and
- tools <https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools>`__:
- Documentation on how to create interfaces and frontends for
- Git.
-
#. *Set up the Application Development Machines:* As mentioned earlier,
application developers are creating applications on top of existing
software stacks. Following are some best practices for setting up
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [mickledore][PATCH 11/13] ref-manual: variables: add RECIPE_SYSROOT and RECIPE_SYSROOT_NATIVE
2023-10-24 13:23 [mickledore][PATCH 00/13] mickledore documentation backports michael.opdenacker
` (9 preceding siblings ...)
2023-10-24 13:23 ` [mickledore][PATCH 10/13] dev-manual: start.rst: remove obsolete reference michael.opdenacker
@ 2023-10-24 13:23 ` michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 12/13] ref-manual: variables: add TOOLCHAIN_OPTIONS variable michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 13/13] ref-manual: variables: add example for SYSROOT_DIRS variable michael.opdenacker
12 siblings, 0 replies; 14+ messages in thread
From: michael.opdenacker @ 2023-10-24 13:23 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker, Talel BELHAJSALEM
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
From: BELHADJ SALEM Talel <bhstalel@gmail.com>
Signed-off-by: Talel BELHAJSALEM <bhstalel@gmail.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
documentation/ref-manual/variables.rst | 35 ++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index eb19048db2..aab41fedb2 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -6832,6 +6832,36 @@ system and gives an overview of their function and contents.
in the ":ref:`ref-manual/devtool-reference:checking on the upgrade status of a recipe`"
section.
+ :term:`RECIPE_SYSROOT`
+ This variable points to the directory that holds all files populated from
+ recipes specified in :term:`DEPENDS`. As the name indicates,
+ think of this variable as a custom root (``/``) for the recipe that will be
+ used by the compiler in order to find headers and other files needed to complete
+ its job.
+
+ This variable is related to :term:`STAGING_DIR_HOST` or :term:`STAGING_DIR_TARGET`
+ according to the type of the recipe and the build target.
+
+ To better understand this variable, consider the following examples:
+
+ - For ``#include <header.h>``, ``header.h`` should be in ``"${RECIPE_SYSROOT}/usr/include"``
+
+ - For ``-lexample``, ``libexample.so`` should be in ``"${RECIPE_SYSROOT}/lib"``
+ or other library sysroot directories.
+
+ The default value is ``"${WORKDIR}/recipe-sysroot"``.
+ Do not modify it.
+
+ :term:`RECIPE_SYSROOT_NATIVE`
+ This is similar to :term:`RECIPE_SYSROOT` but the populated files are from
+ ``-native`` recipes. This allows a recipe built for the target machine to
+ use ``native`` tools.
+
+ This variable is related to :term:`STAGING_DIR_NATIVE`.
+
+ The default value is ``"${WORKDIR}/recipe-sysroot-native"``.
+ Do not modify it.
+
:term:`REPODIR`
See :term:`bitbake:REPODIR` in the BitBake manual.
@@ -8071,10 +8101,15 @@ system and gives an overview of their function and contents.
for ``-native`` recipes, as they make use of host headers and
libraries.
+ Check :term:`RECIPE_SYSROOT` and :term:`RECIPE_SYSROOT_NATIVE`.
+
:term:`STAGING_DIR_NATIVE`
Specifies the path to the sysroot directory used when building
components that run on the build host itself.
+ The default value is ``"${RECIPE_SYSROOT_NATIVE}"``,
+ check :term:`RECIPE_SYSROOT_NATIVE`.
+
:term:`STAGING_DIR_TARGET`
Specifies the path to the sysroot used for the system for which the
component generates code. For components that do not generate code,
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [mickledore][PATCH 12/13] ref-manual: variables: add TOOLCHAIN_OPTIONS variable
2023-10-24 13:23 [mickledore][PATCH 00/13] mickledore documentation backports michael.opdenacker
` (10 preceding siblings ...)
2023-10-24 13:23 ` [mickledore][PATCH 11/13] ref-manual: variables: add RECIPE_SYSROOT and RECIPE_SYSROOT_NATIVE michael.opdenacker
@ 2023-10-24 13:23 ` michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 13/13] ref-manual: variables: add example for SYSROOT_DIRS variable michael.opdenacker
12 siblings, 0 replies; 14+ messages in thread
From: michael.opdenacker @ 2023-10-24 13:23 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker, Talel BELHAJSALEM
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
From: BELHADJ SALEM Talel <bhstalel@gmail.com>
Signed-off-by: Talel BELHAJSALEM <bhstalel@gmail.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
documentation/ref-manual/variables.rst | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index aab41fedb2..3529b6f47c 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -8931,6 +8931,16 @@ system and gives an overview of their function and contents.
portion of an eSDK. This is similar to :term:`TOOLCHAIN_HOST_TASK`
applying to SDKs.
+ :term:`TOOLCHAIN_OPTIONS`
+ This variable holds extra options passed to the compiler and the linker
+ for non ``-native`` recipes as they have to point to their custom
+ ``sysroot`` folder pointed to by :term:`RECIPE_SYSROOT`::
+
+ TOOLCHAIN_OPTIONS = " --sysroot=${RECIPE_SYSROOT}"
+
+ Native recipes don't need this variable to be set, as they are
+ built for the host machine with the native compiler.
+
:term:`TOOLCHAIN_OUTPUTNAME`
This variable defines the name used for the toolchain output. The
:ref:`populate_sdk_base <ref-classes-populate-sdk-*>` class sets
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [mickledore][PATCH 13/13] ref-manual: variables: add example for SYSROOT_DIRS variable
2023-10-24 13:23 [mickledore][PATCH 00/13] mickledore documentation backports michael.opdenacker
` (11 preceding siblings ...)
2023-10-24 13:23 ` [mickledore][PATCH 12/13] ref-manual: variables: add TOOLCHAIN_OPTIONS variable michael.opdenacker
@ 2023-10-24 13:23 ` michael.opdenacker
12 siblings, 0 replies; 14+ messages in thread
From: michael.opdenacker @ 2023-10-24 13:23 UTC (permalink / raw)
To: docs; +Cc: Michael Opdenacker, Talel BELHAJSALEM
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
From: BELHADJ SALEM Talel <bhstalel@gmail.com>
Signed-off-by: Talel BELHAJSALEM <bhstalel@gmail.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
documentation/ref-manual/variables.rst | 29 ++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index 3529b6f47c..4a0b50ed67 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -8294,6 +8294,35 @@ system and gives an overview of their function and contents.
${libdir}/${BPN}/ptest \
"
+ Consider the following example in which you need to manipulate this variable.
+ Assume you have a recipe ``A`` that provides a shared library ``.so.*`` that is
+ installed into a custom folder other than "``${libdir}``"
+ or "``${base_libdir}``", let's say "``/opt/lib``".
+
+ .. note::
+
+ This is not a recommended way to deal with shared libraries, but this
+ is just to show the usefulness of setting :term:`SYSROOT_DIRS`.
+
+ When a recipe ``B`` :term:`DEPENDS` on ``A``, it means what is in
+ :term:`SYSROOT_DIRS` will be copied from :term:`D` of the recipe ``B``
+ into ``B``'s :term:`SYSROOT_DESTDIR` that is "``${WORKDIR}/sysroot-destdir``".
+
+ Now, since ``/opt/lib`` is not in :term:`SYSROOT_DIRS`, it will never be copied to
+ ``A``'s :term:`RECIPE_SYSROOT`, which is "``${WORKDIR}/recipe-sysroot``". So,
+ the linking process will fail.
+
+ To fix this, you need to add ``/opt/lib`` to :term:`SYSROOT_DIRS`::
+
+ SYSROOT_DIRS:append = " /opt/lib"
+
+ .. note::
+ Even after setting ``/opt/lib`` to :term:`SYSROOT_DIRS`, the linking process will still fail
+ because the linker does not know that location, since :term:`TARGET_LDFLAGS`
+ doesn't contain it (if your recipe is for the target). Therefore, so you should add::
+
+ TARGET_LDFLAGS:append = " -L${RECIPE_SYSROOT}/opt/lib"
+
:term:`SYSROOT_DIRS_NATIVE`
Extra directories staged into the sysroot by the
:ref:`ref-tasks-populate_sysroot` task for
--
2.34.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
end of thread, other threads:[~2023-10-24 13:23 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-24 13:23 [mickledore][PATCH 00/13] mickledore documentation backports michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 01/13] ref-manual: Warn about COMPATIBLE_MACHINE skipping native recipes michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 02/13] bsp-guide: bsp: skip Intel machines no longer supported in Poky michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 03/13] sdk-manual: appendix-obtain: improve and update descriptions michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 04/13] dev-manual: new-recipe.rst: add missing parenthesis to "Patching Code" section michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 05/13] ref-manual: Fix PACKAGECONFIG term and add an example michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 06/13] profile-manual: aesthetic cleanups michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 07/13] ref-manual: variables: provide no-match example for COMPATIBLE_MACHINE michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 08/13] dev-manual: layers: Add notes about layer.conf michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 09/13] brief-yoctoprojectqs: use new CDN mirror for sstate michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 10/13] dev-manual: start.rst: remove obsolete reference michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 11/13] ref-manual: variables: add RECIPE_SYSROOT and RECIPE_SYSROOT_NATIVE michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 12/13] ref-manual: variables: add TOOLCHAIN_OPTIONS variable michael.opdenacker
2023-10-24 13:23 ` [mickledore][PATCH 13/13] ref-manual: variables: add example for SYSROOT_DIRS variable michael.opdenacker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox