brief-yoctoprojectqs: add bitbake-setup info
RFC PATCH v2 1/1 brief-yoctoprojectqs: add bitbake-setup info
From: Tim Orling <[email protected]>
Largely replace the original Poky instructions with example instructions to use bitbake-setup.
Introduce the concept of OE_FRAGMENTS and how it is used by bitbake-setup to setup SSTATE_MIRRORS, etc.
---
Changes in v2:
- fix typos/grammar errors
- use commas instead of en dash
documentation/brief-yoctoprojectqs/index.rst | 221 ++++++++++--------- 1 file changed, 121 insertions(+), 100 deletions(-)
documentation/brief-yoctoprojectqs/index.rst +121 -100
@@ -87,75 +87,112 @@ distribution: see the :ref:`ref-manual/system-requirements:required packages for the build host` section in the Yocto Project Reference Manual. -Use Git to Clone Poky -===================== +Use Git to Clone bitbake-setup +============================== Once you complete the setup instructions for your machine, you need to -get a copy of the Poky repository on your build host. Use the following -commands to clone the Poky repository. +get a copy of the bitbake-setup tool to setup the Poky reference +distribution on your build host. Use the following commands to clone +the bitbake repository. .. code-block:: shell - $ git clone git://git.yoctoproject.org/poky - Cloning into 'poky'... - remote: Counting - objects: 432160, done. remote: Compressing objects: 100% - (102056/102056), done. remote: Total 432160 (delta 323116), reused - 432037 (delta 323000) Receiving objects: 100% (432160/432160), 153.81 MiB | 8.54 MiB/s, done. - Resolving deltas: 100% (323116/323116), done. - Checking connectivity... done. + $ git clone git://git.openembedded.org/bitbake bitbake-setup + Cloning into 'bitbake-setup'... + remote: Enumerating objects: 68454, done. + remote: Counting objects: 100% (49/49), done. + remote: Compressing objects: 100% (44/44), done. + remote: Total 68454 (delta 31), reused 5 (delta 5), pack-reused 68405 (from 1) + Receiving objects: 100% (68454/68454), 14.17 MiB | 10.56 MiB/s, done. + Resolving deltas: 100% (51776/51776), done. -Go to :yocto_wiki:`Releases wiki page </Releases>`, and choose a release -codename (such as ``&DISTRO_NAME_NO_CAP;``), corresponding to either the -latest stable release or a Long Term Support release. +Setup a build environment with the following command: -Then move to the ``poky`` directory and take a look at existing branches: +.. code-block:: shell + + $ ./bitbake-setup/bin/bitbake-setup init + +By default, this will setup in $HOME/bitbake-builds. If you prefer to +setup your builds in a different directory, for example the current +directory, you can instead use the ``--top-dir`` argument: .. code-block:: shell - $ cd poky - $ git branch -a - . - . - . - remotes/origin/HEAD -> origin/master - remotes/origin/dunfell - remotes/origin/dunfell-next - . - . - . - remotes/origin/gatesgarth - remotes/origin/gatesgarth-next - . - . - . - remotes/origin/master - remotes/origin/master-next - . - . - . - - -For this example, check out the ``&DISTRO_NAME_NO_CAP;`` branch based on the -``&DISTRO_NAME;`` release: + $ ./bitbake-setup/bin/bitbake-setup init --top-dir $PWD + +`bitbake-setup init` is an interactive program by default and will ask +you to make some decisions. Depending on your answers, the choices may +differ from the examples below. + +#. Choose a configuration (for example, ``yocto-master-options``): + + .. code-block:: shell + + Available configurations: + 0. yocto-master-nested-configs (future) Official Yocto configurations: poky, poky-altcfg, poky-tiny, for qemux86-64 and arm64 (defined with nested configurations) + 1. yocto-master-options (future) Official Yocto configurations: poky, poky-altcfg, poky-tiny, for qemux86-64, riscv64 and arm64 (defined with options) + + Please select one of the above configurations by its number: + 1 + +#. Choose a target machine (for example, ``qemux86-64``): + + .. code-block:: shell + + Selecting the only available bitbake configuration poky + Available target machines: + 0. machine/qemux86-64 + 1. machine/qemuarm64 + 2. machine/qemuriscv64 + Please select one of the above options by its number: + 0 + +#. Choose a distribution (for example, ``poky``): + + .. code-block:: shell + + Available distributions: + 0. distro/poky + 1. distro/poky-altcfg + 2. distro/poky-tiny + Please select one of the above options by its number: + 0 + Run 'bitbake-setup yocto-master-options poky distro/poky machine/qemux86-64' to select this configuration non-interactively. + Initializing a build in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64 + Fetching layer/tool repository bitbake into /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/bitbake + Fetching layer/tool repository openembedded-core into /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/openembedded-core + Fetching layer/tool repository meta-yocto into /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/meta-yocto + Fetching layer/tool repository yocto-docs into /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/yocto-docs + ============================== + Setting up bitbake configuration in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build + This bitbake configuration provides: Poky reference distro build + Usage instructions and additional information are in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/README + +If you prefer to run non-interactively, you could use a command +like the following: .. code-block:: shell - $ git checkout -t origin/&DISTRO_NAME_NO_CAP; -b my-&DISTRO_NAME_NO_CAP; - Branch 'my-&DISTRO_NAME_NO_CAP;' set up to track remote branch '&DISTRO_NAME_NO_CAP;' from 'origin'. - Switched to a new branch 'my-&DISTRO_NAME_NO_CAP;' + $ bitbake-setup yocto-master-options poky distro/poky machine/qemux86-64 -The previous Git checkout command creates a local branch named -``my-&DISTRO_NAME_NO_CAP;``. The files available to you in that branch -exactly match the repository's files in the ``&DISTRO_NAME_NO_CAP;`` -release branch. +Among other things, the script creates the :term:`Build Directory`, which is +``build`` in this case and is located in the "top-dir" directory. The script +also clones the layers needed to build the Poky reference distribution, in the +``layers`` subdirectory. After the script runs, your current working directory +is set to the :term:`Build Directory`. Later, when the build completes, the +:term:`Build Directory` contains all the files created during the build. -Note that you can regularly type the following command in the same directory -to keep your local files in sync with the release branch: + +Information about the build environment can be found in ``/path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/README`` which should look something like the following: .. code-block:: shell - $ git pull + Poky reference distro build + + Additional information is in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/conf/conf-summary.txt and /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/conf/conf-notes.txt + + Source the environment using '. /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/init-build-env' to run builds from the command line. + The bitbake configuration files (local.conf, bblayers.conf and more) can be found in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/conf For more options and information about accessing Yocto Project related repositories, see the
@@ -182,61 +219,47 @@ an entire Linux distribution, including the toolchain, from source. ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`" page of the Yocto Project Wiki. -#. **Initialize the Build Environment:** From within the ``poky`` - directory, run the :ref:`ref-manual/structure:``oe-init-build-env``` - environment - setup script to define Yocto Project's build environment on your - build host. +#. **Initialize the Build Environment:** + Run the ``init-build-env`` environment setup script within the build directory + to define Yocto Project's build environment on your build host. .. code-block:: shell - $ cd poky - $ source oe-init-build-env - You had no conf/local.conf file. This configuration file has therefore been - created for you with some default values. You may wish to edit it to, for - example, select a different MACHINE (target hardware). See conf/local.conf - for more information as common configuration options are commented. - - You had no conf/bblayers.conf file. This configuration file has therefore - been created for you with some default values. To add additional metadata - layers into your configuration please add entries to conf/bblayers.conf. - - The Yocto Project has extensive documentation about OE including a reference - manual which can be found at: - https://docs.yoctoproject.org + $ source /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/init-build-env + Poky reference distro build - For more information about OpenEmbedded see their website: - https://www.openembedded.org/ +#. **Examine Your Auto Configuration File:** When you set up the build + environment, an auto configuration file named ``auto.conf`` becomes + available in aa ``conf`` subdirectory of the :term:`Build Directory`. For this + example, the defaults are set to include three ``OE_FRAGMENTS``: + ``core/yocto/sstate-mirror-cdn``, ``machine/qemux86-64`` and ``distro/poky``. + These set up the environment similar to what was previously in the local + configuration file named ``local.conf`` which is now largely empty. + For more information on fragments, see :ref:`bitbake-user-manual/bitbake-user-manual-metadata:\`\`addfragments\`\` directive` in the Bitbake User Manual. - ### Shell environment set up for builds. ### + ``core/yocto/sstate-mirror-cdn`` sets up :term:`BB_HASHSERVE_UPSTREAM` and + :term:`SSTATE_MIRRORS`. The definition can be found in + ``../layers/openembedded-core/meta/conf/fragments/yocto/sstate-mirror-cdn.conf``. - You can now run 'bitbake <target>' - - Common targets are: - core-image-minimal - core-image-full-cmdline - core-image-sato - core-image-weston - meta-toolchain - meta-ide-support - - You can also run generated QEMU images with a command like 'runqemu qemux86-64' + .. code-block:: shell - Other commonly useful commands are: - - 'devtool' and 'recipetool' handle common recipe tasks - - 'bitbake-layers' handles common layer tasks - - 'oe-pkgdata-util' handles common target package tasks + BB_CONF_FRAGMENT_SUMMARY = "Use prebuilt sstate artifacts for standard Yocto build configurations." + BB_CONF_FRAGMENT_DESCRIPTION = "The Yocto Project has prebuilt artefacts available for standard build configurations. \ + This fragment enables their use. This will mean the build will query the \ + the network to check for artefacts at the start of builds, which does slow it down \ + initially but it will then speed up the builds by not having to build things if they are \ + present in the cache. It assumes you can download something faster than you can build it \ + which will depend on your network. \ + Note: For this to work you also need hash-equivalence passthrough to the matching server \ + " - Among other things, the script creates the :term:`Build Directory`, which is - ``build`` in this case and is located in the :term:`Source Directory`. After - the script runs, your current working directory is set to the - :term:`Build Directory`. Later, when the build completes, the - :term:`Build Directory` contains all the files created during the build. + BB_HASHSERVE_UPSTREAM = 'wss://hashserv.yoctoproject.org/ws' + SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH" #. **Examine Your Local Configuration File:** When you set up the build environment, a local configuration file named ``local.conf`` becomes available in a ``conf`` subdirectory of the :term:`Build Directory`. For this - example, the defaults are set to build for a ``qemux86`` target, + example, the defaults are set to build for a ``qemux86-64`` target, which is suitable for emulation. The package manager used is set to the RPM package manager.
@@ -249,13 +272,11 @@ an entire Linux distribution, including the toolchain, from source. This is relevant only when your network and the server that you use can download these artifacts faster than you would be able to build them. - To use such mirrors, uncomment the below lines in your ``conf/local.conf`` - file in the :term:`Build Directory`:: + To use such mirrors, ``bitbake-setup`` includes the following in your + ``conf/auto.conf`` file (or you can add it to ``conf/local.conf``) in + the :term:`Build Directory`:: - BB_HASHSERVE_UPSTREAM = "wss://hashserv.yoctoproject.org/ws" - SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH" - BB_HASHSERVE = "auto" - BB_SIGNATURE_HANDLER = "OEEquivHash" + OE_FRAGMENTS += "core/yocto/sstate-mirror-cdn" The hash equivalence server needs the websockets python module version 9.1 or later. Debian GNU/Linux 12 (Bookworm) and later, Fedora, CentOS Stream
Signature · 1 line
2.43.0
Thanks Tim, this is basically fine, but has to be held until bitbake-setup actually lands (and then adjusted to match that version).
I also wonder if the documentation needs to show exactly what the tool outputs, as that is prone to becoming out of sync, and the users will see it for themselves anyway.
--top-dir value can also be set from an environment variable, so you don't have to pass it in every time (and end up creating bogus top dir if forgetting to do so).
Alex
Quoted 307 lines · Tim Orling via lists.yoctoproject.org
From: Tim Orling <[email protected]>
Largely replace the original Poky instructions with example instructions to use bitbake-setup.
Introduce the concept of
OE_FRAGMENTSand how it is used by bitbake-setup to setupSSTATE_MIRRORS, etc.Signed-off-by Tim Orling <[email protected]>---
Changes in v2:
- fix typos/grammar errors
- use commas instead of en dashdocumentation/brief-yoctoprojectqs/index.rst | 221 ++++++++++--------- 1 file changed, 121 insertions(+), 100 deletions(-)documentation/brief-yoctoprojectqs/index.rst +121
-101@@ -87,75 +87,112 @@ distribution: see the :ref:`ref-manual/system-requirements:required packages for the build host` section in the Yocto Project Reference Manual. -Use Git to Clone Poky -===================== +Use Git to Clone bitbake-setup +============================== Once you complete the setup instructions for your machine, you need to -get a copy of the Poky repository on your build host. Use the following -commands to clone the Poky repository. +get a copy of the bitbake-setup tool to setup the Poky reference +distribution on your build host. Use the following commands to clone +the bitbake repository. .. code-block:: shell - $ git clone git://git.yoctoproject.org/poky - Cloning into 'poky'... - remote: Counting - objects: 432160, done. remote: Compressing objects: 100% - (102056/102056), done. remote: Total 432160 (delta 323116), reused - 432037 (delta 323000) Receiving objects: 100% (432160/432160), 153.81 MiB | 8.54 MiB/s, done. - Resolving deltas: 100% (323116/323116), done. - Checking connectivity... done. + $ git clone git://git.openembedded.org/bitbake bitbake-setup + Cloning into 'bitbake-setup'... + remote: Enumerating objects: 68454, done. + remote: Counting objects: 100% (49/49), done. + remote: Compressing objects: 100% (44/44), done. + remote: Total 68454 (delta 31), reused 5 (delta 5), pack-reused 68405 (from 1) + Receiving objects: 100% (68454/68454), 14.17 MiB | 10.56 MiB/s, done. + Resolving deltas: 100% (51776/51776), done. -Go to :yocto_wiki:`Releases wiki page </Releases>`, and choose a release -codename (such as ``&DISTRO_NAME_NO_CAP;``), corresponding to either the -latest stable release or a Long Term Support release. +Setup a build environment with the following command: -Then move to the ``poky`` directory and take a look at existing branches: +.. code-block:: shell + + $ ./bitbake-setup/bin/bitbake-setup init + +By default, this will setup in $HOME/bitbake-builds. If you prefer to +setup your builds in a different directory, for example the current +directory, you can instead use the ``--top-dir`` argument: .. code-block:: shell - $ cd poky - $ git branch -a - . - . - . - remotes/origin/HEAD -> origin/master - remotes/origin/dunfell - remotes/origin/dunfell-next - . - . - . - remotes/origin/gatesgarth - remotes/origin/gatesgarth-next - . - . - . - remotes/origin/master - remotes/origin/master-next - . - . - . - - -For this example, check out the ``&DISTRO_NAME_NO_CAP;`` branch based on the -``&DISTRO_NAME;`` release: + $ ./bitbake-setup/bin/bitbake-setup init --top-dir $PWD + +`bitbake-setup init` is an interactive program by default and will ask +you to make some decisions. Depending on your answers, the choices may +differ from the examples below. + +#. Choose a configuration (for example, ``yocto-master-options``): + + .. code-block:: shell + + Available configurations: + 0. yocto-master-nested-configs (future) Official Yocto configurations: poky, poky-altcfg, poky-tiny, for qemux86-64 and arm64 (defined with nested configurations) + 1. yocto-master-options (future) Official Yocto configurations: poky, poky-altcfg, poky-tiny, for qemux86-64, riscv64 and arm64 (defined with options) + + Please select one of the above configurations by its number: + 1 + +#. Choose a target machine (for example, ``qemux86-64``): + + .. code-block:: shell + + Selecting the only available bitbake configuration poky + Available target machines: + 0. machine/qemux86-64 + 1. machine/qemuarm64 + 2. machine/qemuriscv64 + Please select one of the above options by its number: + 0 + +#. Choose a distribution (for example, ``poky``): + + .. code-block:: shell + + Available distributions: + 0. distro/poky + 1. distro/poky-altcfg + 2. distro/poky-tiny + Please select one of the above options by its number: + 0 + Run 'bitbake-setup yocto-master-options poky distro/poky machine/qemux86-64' to select this configuration non-interactively. + Initializing a build in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64 + Fetching layer/tool repository bitbake into /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/bitbake + Fetching layer/tool repository openembedded-core into /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/openembedded-core + Fetching layer/tool repository meta-yocto into /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/meta-yocto + Fetching layer/tool repository yocto-docs into /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/yocto-docs + ============================== + Setting up bitbake configuration in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build + This bitbake configuration provides: Poky reference distro build + Usage instructions and additional information are in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/README + +If you prefer to run non-interactively, you could use a command +like the following: .. code-block:: shell - $ git checkout -t origin/&DISTRO_NAME_NO_CAP; -b my-&DISTRO_NAME_NO_CAP; - Branch 'my-&DISTRO_NAME_NO_CAP;' set up to track remote branch '&DISTRO_NAME_NO_CAP;' from 'origin'. - Switched to a new branch 'my-&DISTRO_NAME_NO_CAP;' + $ bitbake-setup yocto-master-options poky distro/poky machine/qemux86-64 -The previous Git checkout command creates a local branch named -``my-&DISTRO_NAME_NO_CAP;``. The files available to you in that branch -exactly match the repository's files in the ``&DISTRO_NAME_NO_CAP;`` -release branch. +Among other things, the script creates the :term:`Build Directory`, which is +``build`` in this case and is located in the "top-dir" directory. The script +also clones the layers needed to build the Poky reference distribution, in the +``layers`` subdirectory. After the script runs, your current working directory +is set to the :term:`Build Directory`. Later, when the build completes, the +:term:`Build Directory` contains all the files created during the build. -Note that you can regularly type the following command in the same directory -to keep your local files in sync with the release branch: + +Information about the build environment can be found in ``/path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/README`` which should look something like the following: .. code-block:: shell - $ git pull + Poky reference distro build + + Additional information is in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/conf/conf-summary.txt and /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/conf/conf-notes.txt + + Source the environment using '. /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/init-build-env' to run builds from the command line. + The bitbake configuration files (local.conf, bblayers.conf and more) can be found in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/conf For more options and information about accessing Yocto Project related repositories, see the@@ -182,61 +219,47 @@ an entire Linux distribution, including the toolchain, from source. ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`" page of the Yocto Project Wiki. -#. **Initialize the Build Environment:** From within the ``poky`` - directory, run the :ref:`ref-manual/structure:``oe-init-build-env``` - environment - setup script to define Yocto Project's build environment on your - build host. +#. **Initialize the Build Environment:** + Run the ``init-build-env`` environment setup script within the build directory + to define Yocto Project's build environment on your build host. .. code-block:: shell - $ cd poky - $ source oe-init-build-env - You had no conf/local.conf file. This configuration file has therefore been - created for you with some default values. You may wish to edit it to, for - example, select a different MACHINE (target hardware). See conf/local.conf - for more information as common configuration options are commented. - - You had no conf/bblayers.conf file. This configuration file has therefore - been created for you with some default values. To add additional metadata - layers into your configuration please add entries to conf/bblayers.conf. - - The Yocto Project has extensive documentation about OE including a reference - manual which can be found at: - https://docs.yoctoproject.org + $ source /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/init-build-env + Poky reference distro build - For more information about OpenEmbedded see their website: - https://www.openembedded.org/ +#. **Examine Your Auto Configuration File:** When you set up the build + environment, an auto configuration file named ``auto.conf`` becomes + available in aa ``conf`` subdirectory of the :term:`Build Directory`. For this + example, the defaults are set to include three ``OE_FRAGMENTS``: + ``core/yocto/sstate-mirror-cdn``, ``machine/qemux86-64`` and ``distro/poky``. + These set up the environment similar to what was previously in the local + configuration file named ``local.conf`` which is now largely empty. + For more information on fragments, see :ref:`bitbake-user-manual/bitbake-user-manual-metadata:\`\`addfragments\`\` directive` in the Bitbake User Manual. - ### Shell environment set up for builds. ### + ``core/yocto/sstate-mirror-cdn`` sets up :term:`BB_HASHSERVE_UPSTREAM` and + :term:`SSTATE_MIRRORS`. The definition can be found in + ``../layers/openembedded-core/meta/conf/fragments/yocto/sstate-mirror-cdn.conf``. - You can now run 'bitbake <target>' - - Common targets are: - core-image-minimal - core-image-full-cmdline - core-image-sato - core-image-weston - meta-toolchain - meta-ide-support - - You can also run generated QEMU images with a command like 'runqemu qemux86-64' + .. code-block:: shell - Other commonly useful commands are: - - 'devtool' and 'recipetool' handle common recipe tasks - - 'bitbake-layers' handles common layer tasks - - 'oe-pkgdata-util' handles common target package tasks + BB_CONF_FRAGMENT_SUMMARY = "Use prebuilt sstate artifacts for standard Yocto build configurations." + BB_CONF_FRAGMENT_DESCRIPTION = "The Yocto Project has prebuilt artefacts available for standard build configurations. \ + This fragment enables their use. This will mean the build will query the \ + the network to check for artefacts at the start of builds, which does slow it down \ + initially but it will then speed up the builds by not having to build things if they are \ + present in the cache. It assumes you can download something faster than you can build it \ + which will depend on your network. \ + Note: For this to work you also need hash-equivalence passthrough to the matching server \ + " - Among other things, the script creates the :term:`Build Directory`, which is - ``build`` in this case and is located in the :term:`Source Directory`. After - the script runs, your current working directory is set to the - :term:`Build Directory`. Later, when the build completes, the - :term:`Build Directory` contains all the files created during the build. + BB_HASHSERVE_UPSTREAM = 'wss://hashserv.yoctoproject.org/ws' + SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH" #. **Examine Your Local Configuration File:** When you set up the build environment, a local configuration file named ``local.conf`` becomes available in a ``conf`` subdirectory of the :term:`Build Directory`. For this - example, the defaults are set to build for a ``qemux86`` target, + example, the defaults are set to build for a ``qemux86-64`` target, which is suitable for emulation. The package manager used is set to the RPM package manager.@@ -249,13 +272,11 @@ an entire Linux distribution, including the toolchain, from source. This is relevant only when your network and the server that you use can download these artifacts faster than you would be able to build them. - To use such mirrors, uncomment the below lines in your ``conf/local.conf`` - file in the :term:`Build Directory`:: + To use such mirrors, ``bitbake-setup`` includes the following in your + ``conf/auto.conf`` file (or you can add it to ``conf/local.conf``) in + the :term:`Build Directory`:: - BB_HASHSERVE_UPSTREAM = "wss://hashserv.yoctoproject.org/ws" - SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH" - BB_HASHSERVE = "auto" - BB_SIGNATURE_HANDLER = "OEEquivHash" + OE_FRAGMENTS += "core/yocto/sstate-mirror-cdn" The hash equivalence server needs the websockets python module version 9.1 or later. Debian GNU/Linux 12 (Bookworm) and later, Fedora, CentOS Stream --2.43.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#7457): https://lists.yoctoproject.org/g/docs/message/7457
Mute This Topic: https://lists.yoctoproject.org/mt/114789217/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 4 lines · Alexander Kanavin
Thanks Tim, this is basically fine, but has to be held until bitbake-setup actually lands (and then adjusted to match that version).
Absolutely, this is why I put it out as an RFC. Plus I think (see the next paragraph) there needs to be some more discussion/thought about the documentation. We need to add more documentation about OE fragments and more about bitbake-setup configuration, etc.
Quoted 5 lines
I also wonder if the documentation needs to show exactly what the tool outputs, as that is prone to becoming out of sync, and the users will see it for themselves anyway.
I definitely agree and was on the fence about that. I was mostly following the pattern that was already in the quick start guide. Plus links to metadata don't exist yet, so that wasn't an option either. We should continue to discuss what will work best for the quick start guide and what else is needed elsewhere in the reference manual, etc.
Quoted 5 lines
--top-dir value can also be set from an environment variable, so you don't have to pass it in every time (and end up creating bogus top dir if forgetting to do so).
Good point. Perhaps I can document that in v3 instead of showing the command line.
I look forward to more discussion about all of this.
Quoted 391 lines
Alex
Quoted 15 lines · Tim Orling via lists.yoctoproject.org
From: Tim Orling <[email protected]>
Largely replace the original Poky instructions with example instructions to use bitbake-setup.
Introduce the concept of
OE_FRAGMENTSand how it is used by bitbake-setup to setupSSTATE_MIRRORS, etc.Signed-off-by Tim Orling <[email protected]>---
Changes in v2:
- fix typos/grammar errors
- use commas instead of en dashReview
Quoted 4 lines
documentation/brief-yoctoprojectqs/index.rst | 221 ++++++++++--------- 1 file changed, 121 insertions(+), 100 deletions(-)(quoted diff) +0
-0
b/documentation/brief-yoctoprojectqs/index.rstdocumentation/brief-yoctoprojectqs/index.rst distribution: · line 87
Quoted 5 lines
index
4a6f13d7e..8ef1f5bf5100644documentation/brief-yoctoprojectqs/index.rst +0
-0@@ -87,75 +87,112 @@ distribution: see the :ref:`ref-manual/system-requirements:required packages forthe build host`
Quoted 12 lines
documentation/brief-yoctoprojectqs/index.rst +4
-4section in the Yocto Project Reference Manual. -Use Git to Clone Poky -===================== +Use Git to Clone bitbake-setup +============================== Once you complete the setup instructions for your machine, you need to -get a copy of the Poky repository on your build host. Use the following -commands to clone the Poky repository. +get a copy of the bitbake-setup tool to setup the Poky reference +distribution on your build host. Use the following commands to clonedocumentation/brief-yoctoprojectqs/index.rst distribution:
Quoted 10 lines
documentation/brief-yoctoprojectqs/index.rst +1
-6+the bitbake repository. .. code-block:: shell - $ git clone git://git.yoctoproject.org/poky - Cloning into 'poky'... - remote: Counting - objects: 432160, done. remote: Compressing objects: 100% - (102056/102056), done. remote: Total 432160 (delta 323116), reused - 432037 (delta 323000) Receiving objects: 100% (432160/432160),153.81 MiB | 8.54 MiB/s, done.
documentation/brief-yoctoprojectqs/index.rst distribution:
Quoted 8 lines
documentation/brief-yoctoprojectqs/index.rst +6
-2- Resolving deltas: 100% (323116/323116), done. - Checking connectivity... done. + $ git clone git://git.openembedded.org/bitbake bitbake-setup + Cloning into 'bitbake-setup'... + remote: Enumerating objects: 68454, done. + remote: Counting objects: 100% (49/49), done. + remote: Compressing objects: 100% (44/44), done. + remote: Total 68454 (delta 31), reused 5 (delta 5), pack-reused68405 (from 1)
documentation/brief-yoctoprojectqs/index.rst distribution:
Quoted 9 lines
documentation/brief-yoctoprojectqs/index.rst +3
-4+ Receiving objects: 100% (68454/68454), 14.17 MiB | 10.56 MiB/s, done. + Resolving deltas: 100% (51776/51776), done. -Go to :yocto_wiki:`Releases wiki page </Releases>`, and choose a release -codename (such as ``&DISTRO_NAME_NO_CAP;``), corresponding to either the -latest stable release or a Long Term Support release. +Setup a build environment with the following command: -Then move to the ``poky`` directory and take a look at existingbranches:
Quoted 24 lines
documentation/brief-yoctoprojectqs/index.rst +7
-14+.. code-block:: shell + + $ ./bitbake-setup/bin/bitbake-setup init + +By default, this will setup in $HOME/bitbake-builds. If you prefer to +setup your builds in a different directory, for example the current +directory, you can instead use the ``--top-dir`` argument: .. code-block:: shell - $ cd poky - $ git branch -a - . - . - . - remotes/origin/HEAD -> origin/master - remotes/origin/dunfell - remotes/origin/dunfell-next - . - . - . - remotes/origin/gatesgarth - remotes/origin/gatesgarth-next - .documentation/brief-yoctoprojectqs/index.rst distribution:
Quoted 10 lines
documentation/brief-yoctoprojectqs/index.rst +0
-10- . - . - remotes/origin/master - remotes/origin/master-next - . - . - . - - -For this example, check out the ``&DISTRO_NAME_NO_CAP;`` branch basedon the
documentation/brief-yoctoprojectqs/index.rst distribution:
Quoted 13 lines
documentation/brief-yoctoprojectqs/index.rst +12
-1-``&DISTRO_NAME;`` release: + $ ./bitbake-setup/bin/bitbake-setup init --top-dir $PWD + +`bitbake-setup init` is an interactive program by default and will ask +you to make some decisions. Depending on your answers, the choices may +differ from the examples below. + +#. Choose a configuration (for example, ``yocto-master-options``): + + .. code-block:: shell + + Available configurations: + 0. yocto-master-nested-configs (future) Official Yoctoconfigurations: poky, poky-altcfg, poky-tiny, for qemux86-64 and arm64 (defined with nested configurations)
documentation/brief-yoctoprojectqs/index.rst distribution: · line 133
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+ 1. yocto-master-options (future) Official Yocto configurations:poky, poky-altcfg, poky-tiny, for qemux86-64, riscv64 and arm64 (defined with options)
Quoted 17 lines
documentation/brief-yoctoprojectqs/index.rst +17
-0+ + Please select one of the above configurations by its number: + 1 + +#. Choose a target machine (for example, ``qemux86-64``): + + .. code-block:: shell + + Selecting the only available bitbake configuration poky + Available target machines: + 0. machine/qemux86-64 + 1. machine/qemuarm64 + 2. machine/qemuriscv64 + Please select one of the above options by its number: + 0 + +#. Choose a distribution (for example, ``poky``):documentation/brief-yoctoprojectqs/index.rst distribution:
Quoted 10 lines
documentation/brief-yoctoprojectqs/index.rst +10
-0+ + .. code-block:: shell + + Available distributions: + 0. distro/poky + 1. distro/poky-altcfg + 2. distro/poky-tiny + Please select one of the above options by its number: + 0 + Run 'bitbake-setup yocto-master-options poky distro/pokymachine/qemux86-64' to select this configuration non-interactively.
documentation/brief-yoctoprojectqs/index.rst distribution: · line 161
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+ Initializing a build in/path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64
documentation/brief-yoctoprojectqs/index.rst distribution: · line 162
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+ Fetching layer/tool repository bitbake into/path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/bitbake
documentation/brief-yoctoprojectqs/index.rst distribution: · line 163
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+ Fetching layer/tool repository openembedded-core into/path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/openembedded-core
documentation/brief-yoctoprojectqs/index.rst distribution: · line 164
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+ Fetching layer/tool repository meta-yocto into/path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/meta-yocto
documentation/brief-yoctoprojectqs/index.rst distribution: · line 165
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+ Fetching layer/tool repository yocto-docs into/path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/yocto-docs
documentation/brief-yoctoprojectqs/index.rst distribution: · line 167
Quoted 2 lines
documentation/brief-yoctoprojectqs/index.rst +2
-0+ ============================== + Setting up bitbake configuration in/path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build
documentation/brief-yoctoprojectqs/index.rst distribution: · line 169
Quoted 2 lines
documentation/brief-yoctoprojectqs/index.rst +2
-0+ This bitbake configuration provides: Poky reference distro build + Usage instructions and additional information are in/path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/README
documentation/brief-yoctoprojectqs/index.rst distribution:
Quoted 7 lines
documentation/brief-yoctoprojectqs/index.rst +3
-1+ +If you prefer to run non-interactively, you could use a command +like the following: .. code-block:: shell - $ git checkout -t origin/&DISTRO_NAME_NO_CAP; -bmy-&DISTRO_NAME_NO_CAP;
documentation/brief-yoctoprojectqs/index.rst distribution: · line 145
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +0
-1- Branch 'my-&DISTRO_NAME_NO_CAP;' set up to track remote branch'
&DISTRO_NAME_NO_CAP;' from 'origin'.documentation/brief-yoctoprojectqs/index.rst distribution: · line 176
Quoted 2 lines
documentation/brief-yoctoprojectqs/index.rst +1
-1- Switched to a new branch 'my-&DISTRO_NAME_NO_CAP;' + $ bitbake-setup yocto-master-options poky distro/pokymachine/qemux86-64
documentation/brief-yoctoprojectqs/index.rst distribution:
Quoted 6 lines
documentation/brief-yoctoprojectqs/index.rst +1
-4-The previous Git checkout command creates a local branch named -``my-&DISTRO_NAME_NO_CAP;``. The files available to you in that branch -exactly match the repository's files in the ``&DISTRO_NAME_NO_CAP;`` -release branch. +Among other things, the script creates the :term:`Build Directory`,which is
documentation/brief-yoctoprojectqs/index.rst distribution: · line 178
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+``build`` in this case and is located in the "top-dir" directory. Thescript
documentation/brief-yoctoprojectqs/index.rst distribution: · line 179
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+also clones the layers needed to build the Poky reference distribution,in the
documentation/brief-yoctoprojectqs/index.rst distribution: · line 180
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+``layers`` subdirectory. After the script runs, your current workingdirectory
documentation/brief-yoctoprojectqs/index.rst distribution: · line 181
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+is set to the :term:`Build Directory`. Later, when the build completes,the
documentation/brief-yoctoprojectqs/index.rst distribution:
Quoted 3 lines
documentation/brief-yoctoprojectqs/index.rst +1
-1+:term:`Build Directory` contains all the files created during the build. -Note that you can regularly type the following command in the samedirectory
documentation/brief-yoctoprojectqs/index.rst distribution:
Quoted 3 lines
documentation/brief-yoctoprojectqs/index.rst +2
-1-to keep your local files in sync with the release branch: + +Information about the build environment can be found in``/path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/README`` which should look something like the following:
documentation/brief-yoctoprojectqs/index.rst distribution:
Quoted 7 lines
documentation/brief-yoctoprojectqs/index.rst +3
-1.. code-block:: shell - $ git pull + Poky reference distro build + + Additional information is in/path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/conf/conf-summary.txt and /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/conf/conf-notes.txt
documentation/brief-yoctoprojectqs/index.rst distribution: · line 192
Quoted 2 lines
documentation/brief-yoctoprojectqs/index.rst +2
-0+ + Source the environment using './path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/init-build-env' to run builds from the command line.
documentation/brief-yoctoprojectqs/index.rst distribution: · line 193
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+ The bitbake configuration files (local.conf, bblayers.conf and more)can be found in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/conf
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the
Quoted 4 lines
documentation/brief-yoctoprojectqs/index.rst +0
-0For more options and information about accessing Yocto Project related repositories, see the@@ -182,61 +219,47 @@ an entire Linux distribution, including thetoolchain, from source.
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 219
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +0
-0":yocto_wiki:`Working Behind a Network Proxy</Working_Behind_a_Network_Proxy>`"
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source.
Quoted 9 lines
documentation/brief-yoctoprojectqs/index.rst +2
-5page of the Yocto Project Wiki. -#. **Initialize the Build Environment:** From within the ``poky`` - directory, run the :ref:`ref-manual/structure:``oe-init-build-env``` - environment - setup script to define Yocto Project's build environment on your - build host. +#. **Initialize the Build Environment:** + Run the ``init-build-env`` environment setup script within the builddirectory
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source.
Quoted 7 lines
documentation/brief-yoctoprojectqs/index.rst +1
-3+ to define Yocto Project's build environment on your build host. .. code-block:: shell - $ cd poky - $ source oe-init-build-env - You had no conf/local.conf file. This configuration file hastherefore been
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 196
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +0
-1- created for you with some default values. You may wish to edit itto, for
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 197
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +0
-1- example, select a different MACHINE (target hardware). See
conf/local.confdocumentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 198
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +0
-1- for more information as common configuration options arecommented.
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 200
Quoted 2 lines
documentation/brief-yoctoprojectqs/index.rst +0
-2- - You had no conf/bblayers.conf file. This configuration file hastherefore
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 201
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +0
-1- been created for you with some default values. To add additionalmetadata
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 202
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +0
-1- layers into your configuration please add entries to
conf/bblayers.conf.documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 204
Quoted 2 lines
documentation/brief-yoctoprojectqs/index.rst +0
-2- - The Yocto Project has extensive documentation about OE includinga reference
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source.
Quoted 3 lines
documentation/brief-yoctoprojectqs/index.rst +1
-2- manual which can be found at: - https://docs.yoctoproject.org + $ source/path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/init-build-env
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source.
Quoted 7 lines
documentation/brief-yoctoprojectqs/index.rst +4
-2+ Poky reference distro build - For more information about OpenEmbedded see their website: - https://www.openembedded.org/ +#. **Examine Your Auto Configuration File:** When you set up the build + environment, an auto configuration file named ``auto.conf`` becomes + available in aa ``conf`` subdirectory of the :term:`BuildDirectory`. For this
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 235
Quoted 2 lines
documentation/brief-yoctoprojectqs/index.rst +2
-0+ example, the defaults are set to include three ``OE_FRAGMENTS``: + ``core/yocto/sstate-mirror-cdn``, ``machine/qemux86-64`` and``distro/poky``.
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 236
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+ These set up the environment similar to what was previously in thelocal
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 238
Quoted 2 lines
documentation/brief-yoctoprojectqs/index.rst +2
-0+ configuration file named ``local.conf`` which is now largely empty. + For more information on fragments, see:ref:
bitbake-user-manual/bitbake-user-manual-metadata:\\addfragments\\directivein the Bitbake User Manual.documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 239
Quoted 3 lines
documentation/brief-yoctoprojectqs/index.rst +1
-1- ### Shell environment set up for builds. ### + ``core/yocto/sstate-mirror-cdn`` sets up:term:
BB_HASHSERVE_UPSTREAManddocumentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 241
Quoted 2 lines
documentation/brief-yoctoprojectqs/index.rst +2
-0+ :term:`SSTATE_MIRRORS`. The definition can be found in +``../layers/openembedded-core/meta/conf/fragments/yocto/sstate-mirror-cdn.conf``.
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source.
Quoted 12 lines
documentation/brief-yoctoprojectqs/index.rst +0
-11- You can now run 'bitbake <target>' - - Common targets are: - core-image-minimal - core-image-full-cmdline - core-image-sato - core-image-weston - meta-toolchain - meta-ide-support - - You can also run generated QEMU images with a command like'runqemu qemux86-64'
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source.
Quoted 7 lines
documentation/brief-yoctoprojectqs/index.rst +2
-4+ .. code-block:: shell - Other commonly useful commands are: - - 'devtool' and 'recipetool' handle common recipe tasks - - 'bitbake-layers' handles common layer tasks - - 'oe-pkgdata-util' handles common target package tasks + BB_CONF_FRAGMENT_SUMMARY = "Use prebuilt sstate artifacts forstandard Yocto build configurations."
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 245
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+ BB_CONF_FRAGMENT_DESCRIPTION = "The Yocto Project has prebuiltartefacts available for standard build configurations. \
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 246
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+ This fragment enables their use. This will mean the build willquery the \
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 247
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+ the network to check for artefacts at the start of builds, whichdoes slow it down \
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 248
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+ initially but it will then speed up the builds by not having tobuild things if they are \
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 249
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+ present in the cache. It assumes you can download somethingfaster than you can build it \
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 251
Quoted 2 lines
documentation/brief-yoctoprojectqs/index.rst +2
-0+ which will depend on your network. \ + Note: For this to work you also need hash-equivalence passthroughto the matching server \
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source.
Quoted 3 lines
documentation/brief-yoctoprojectqs/index.rst +1
-1+ " - Among other things, the script creates the :term:`Build Directory`,which is
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 229
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +0
-1- ``build`` in this case and is located in the :term:`SourceDirectory`. After
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source.
Quoted 3 lines
documentation/brief-yoctoprojectqs/index.rst +0
-3- the script runs, your current working directory is set to the - :term:`Build Directory`. Later, when the build completes, the - :term:`Build Directory` contains all the files created during thebuild.
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 255
Quoted 2 lines
documentation/brief-yoctoprojectqs/index.rst +2
-0+ BB_HASHSERVE_UPSTREAM = 'wss://hashserv.yoctoproject.org/ws' + SSTATE_MIRRORS ?= "file://.*http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH"
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source.
Quoted 4 lines
documentation/brief-yoctoprojectqs/index.rst +0
-0#. **Examine Your Local Configuration File:** When you set up the build environment, a local configuration file named ``local.conf`` becomes available in a ``conf`` subdirectory of the :term:`Build Directory`.For this
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the
Quoted 6 lines
documentation/brief-yoctoprojectqs/index.rst +1
-1- example, the defaults are set to build for a ``qemux86`` target, + example, the defaults are set to build for a ``qemux86-64`` target, which is suitable for emulation. The package manager used is set to the RPM package manager.@@ -249,13 +272,11 @@ an entire Linux distribution, including thetoolchain, from source.
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 272
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +0
-0This is relevant only when your network and the server that youuse
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 273
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +0
-0can download these artifacts faster than you would be able tobuild them.
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 251
Quoted 2 lines
documentation/brief-yoctoprojectqs/index.rst +0
-1- To use such mirrors, uncomment the below lines in your``conf/local.conf``
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 274
Quoted 2 lines
documentation/brief-yoctoprojectqs/index.rst +1
-1- file in the :term:`Build Directory`:: + To use such mirrors, ``bitbake-setup`` includes the following inyour
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 275
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+ ``conf/auto.conf`` file (or you can add it to``conf/local.conf``) in
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source.
Quoted 4 lines
documentation/brief-yoctoprojectqs/index.rst +1
-2+ the :term:`Build Directory`:: - BB_HASHSERVE_UPSTREAM = "wss://hashserv.yoctoproject.org/ws" - SSTATE_MIRRORS ?= "file://.*http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH"
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source.
Quoted 5 lines
documentation/brief-yoctoprojectqs/index.rst +1
-2- BB_HASHSERVE = "auto" - BB_SIGNATURE_HANDLER = "OEEquivHash" + OE_FRAGMENTS += "core/yocto/sstate-mirror-cdn" The hash equivalence server needs the websockets python moduleversion 9.1
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the · line 281
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +0
-0or later. Debian GNU/Linux 12 (Bookworm) and later, Fedora,CentOS Stream
Quoted 7 lines
documentation/brief-yoctoprojectqs/index.rst +0
-1--2.43.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#7457):https://lists.yoctoproject.org/g/docs/message/7457
Quoted 3 lines
Mute This Topic: https://lists.yoctoproject.org/mt/114789217/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/docs/unsub [Quoted 2 lines
-=-=-=-=-=-=-=-=-=-=-=-
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source. · line 282
Quoted 13 lines · Tim Orling via lists.yoctoproject.org
documentation/brief-yoctoprojectqs/index.rst +4
-4+ To use such mirrors, ``bitbake-setup`` includes the following in your + ``conf/auto.conf`` file (or you can add it to ``conf/local.conf``) in + the :term:`Build Directory`:: - BB_HASHSERVE_UPSTREAM = "wss://hashserv.yoctoproject.org/ws" - SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH" - BB_HASHSERVE = "auto" - BB_SIGNATURE_HANDLER = "OEEquivHash" + OE_FRAGMENTS += "core/yocto/sstate-mirror-cdn" The hash equivalence server needs the websockets python module version 9.1 or later. Debian GNU/Linux 12 (Bookworm) and later, Fedora, CentOS Stream
Random note: today was the first time I tried the official Yocto SSTATE_MIRRORS, since it is enabled by default with bitbake-setup. Until now I only used SSTATE_MIRRORS only on my local network, using direct IP addresses.
One thing I noticed was that it absolutely hammers the DNS: it sends hundreds of requests/second over and over again, resolving the SSTATE_MIRRORS url for each request. My PiHole kept stopping resolving queries just after a few seconds when I started the build - it turns out that by default it rate-limits clients with more than 1000 requests/minute, didn't even know that it does that.
I don't know if this is something that should be documented here (as long as it exists), or somewhere else, or maybe nowhere. But anyway, I thought I share while the memories are fresh.
Quoted 27 lines · Gyorgy Sarvari
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source. · line 282
Quoted 13 lines · Tim Orling via lists.yoctoproject.org
documentation/brief-yoctoprojectqs/index.rst +4
-4+ To use such mirrors, ``bitbake-setup`` includes the following in your + ``conf/auto.conf`` file (or you can add it to ``conf/local.conf``) in + the :term:`Build Directory`:: - BB_HASHSERVE_UPSTREAM = "wss://hashserv.yoctoproject.org/ws" - SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH" - BB_HASHSERVE = "auto" - BB_SIGNATURE_HANDLER = "OEEquivHash" + OE_FRAGMENTS += "core/yocto/sstate-mirror-cdn" The hash equivalence server needs the websockets python module version 9.1 or later. Debian GNU/Linux 12 (Bookworm) and later, Fedora, CentOS StreamRandom note: today was the first time I tried the official Yocto
SSTATE_MIRRORS, since it is enabled by default with bitbake-setup. Until now I only usedSSTATE_MIRRORSonly on my local network, using direct IP addresses.One thing I noticed was that it absolutely hammers the DNS: it sends hundreds of requests/second over and over again, resolving the
SSTATE_MIRRORSurl for each request. My PiHole kept stopping resolving queries just after a few seconds when I started the build - it turns out that by default it rate-limits clients with more than 1000 requests/minute, didn't even know that it does that.
Quoted 3 lines
I don't know if this is something that should be documented here (as long as it exists), or somewhere else, or maybe nowhere. But anyway, I thought I share while the memories are fresh.
I spotted this email while reading the more recent replies in the thread.
If everything is working as intended, DNS responses will be cached by the client for a sensible amount of time and you won't see hundreds of requests per second.
I've seen a similar issue before with pi-hole though. Pi-hole uses dnsmasq which gives replies with a TTL of zero when the DNS entry is locally set or automatically added by the DHCP server - this tells the client not to cache the result at all. The dnsmasq docs say that the default local-ttl of zero "is the correct thing to do in almost all situations" but I strongly disagree!
To fix this I created a config file at /etc/dnsmasq.d/99-local.conf on my pi-hole server with the following contents so that local records will be cached by clients for a minute:
local-ttl=60
dhcp-ttl=60(if you're running pi-hole in docker then setting this inside the docker container is left as an exercise for the reader)
I saw this while using an sstate mirror on an internal Minio instance, so the DNS records were local to my pi-hole instance. You may need to look into other dnsmasq TTL settings or the TTL values being set by your upstream DNS server if you're seeing external DNS entries not being cached.
Thanks,
Signature · 1 line
Paul Barker
Quoted 49 lines · Paul Barker
Quoted 26 lines · Gyorgy Sarvari
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source. · line 282
Quoted 13 lines · Tim Orling via lists.yoctoproject.org
documentation/brief-yoctoprojectqs/index.rst +4
-4+ To use such mirrors, ``bitbake-setup`` includes the following in your + ``conf/auto.conf`` file (or you can add it to ``conf/local.conf``) in + the :term:`Build Directory`:: - BB_HASHSERVE_UPSTREAM = "wss://hashserv.yoctoproject.org/ws" - SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH" - BB_HASHSERVE = "auto" - BB_SIGNATURE_HANDLER = "OEEquivHash" + OE_FRAGMENTS += "core/yocto/sstate-mirror-cdn" The hash equivalence server needs the websockets python module version 9.1 or later. Debian GNU/Linux 12 (Bookworm) and later, Fedora, CentOS StreamRandom note: today was the first time I tried the official Yocto
SSTATE_MIRRORS, since it is enabled by default with bitbake-setup. Until now I only usedSSTATE_MIRRORSonly on my local network, using direct IP addresses.One thing I noticed was that it absolutely hammers the DNS: it sends hundreds of requests/second over and over again, resolving the
SSTATE_MIRRORSurl for each request. My PiHole kept stopping resolving queries just after a few seconds when I started the build - it turns out that by default it rate-limits clients with more than 1000 requests/minute, didn't even know that it does that.Quoted 3 lines
I don't know if this is something that should be documented here (as long as it exists), or somewhere else, or maybe nowhere. But anyway, I thought I share while the memories are fresh.
I spotted this email while reading the more recent replies in the thread.
If everything is working as intended, DNS responses will be cached by the client for a sensible amount of time and you won't see hundreds of requests per second.
I've seen a similar issue before with pi-hole though. Pi-hole uses dnsmasq which gives replies with a TTL of zero when the DNS entry is locally set or automatically added by the DHCP server - this tells the client not to cache the result at all. The dnsmasq docs say that the default local-ttl of zero "is the correct thing to do in almost all situations" but I strongly disagree!
To fix this I created a config file at
/etc/dnsmasq.d/99-local.confon my pi-hole server with the following contents so that local records will be cached by clients for a minute:local-ttl=60 dhcp-ttl=60
Quoted 9 lines
(if you're running pi-hole in docker then setting this inside the docker container is left as an exercise for the reader)
I saw this while using an sstate mirror on an internal Minio instance, so the DNS records were local to my pi-hole instance. You may need to look into other dnsmasq TTL settings or the TTL values being set by your upstream DNS server if you're seeing external DNS entries not being cached.
Thanks a lot! Will definitely set this up and give it a go.
Hi Tim,
As said in the call earlier, here are some reviews. I know the tool has changed quite a bit since then, but some of the comments probably apply. Some comments are just formatting related.
From our earlier discussion, we want to document an alternate way of settings things up, where we instruct to clone each repository manually and source the oe-init-build-env script instead. Do you want to work on that too? If not that's completely fine - this patch can be limited on bitbake-setup only and I will work on the other "legacy" part.
Quoted 24 lines · Tim Orling via lists.yoctoproject.org
From: Tim Orling <[email protected]>
Largely replace the original Poky instructions with example instructions to use bitbake-setup.
Introduce the concept of
OE_FRAGMENTSand how it is used by bitbake-setup to setupSSTATE_MIRRORS, etc.Signed-off-by Tim Orling <[email protected]>---
Changes in v2:
- fix typos/grammar errors
- use commas instead of en dashdocumentation/brief-yoctoprojectqs/index.rst | 221 ++++++++++--------- 1 file changed, 121 insertions(+), 100 deletions(-)documentation/brief-yoctoprojectqs/index.rst +0
-0@@ -87,75 +87,112 @@ distribution: see the :ref:`ref-manual/system-requirements:required packages for the build host` section in the Yocto Project Reference Manual.
documentation/brief-yoctoprojectqs/index.rst distribution: · line 94
Quoted 10 lines
documentation/brief-yoctoprojectqs/index.rst +3
-4-Use Git to Clone Poky -===================== +Use Git to Clone bitbake-setup +============================== Once you complete the setup instructions for your machine, you need to -get a copy of the Poky repository on your build host. Use the following -commands to clone the Poky repository. +get a copy of the bitbake-setup tool to setup the Poky reference
s/bitbake-setup/``bitbake-setup``/
documentation/brief-yoctoprojectqs/index.rst distribution: · line 95
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+distribution on your build host. Use the following commands to clone
s/commands/command/
documentation/brief-yoctoprojectqs/index.rst distribution: · line 96
Quoted 1 line
documentation/brief-yoctoprojectqs/index.rst +1
-0+the bitbake repository.
s/repository./repository:/
Quoted 9 lines
documentation/brief-yoctoprojectqs/index.rst +0
-6.. code-block:: shell - $ git clone git://git.yoctoproject.org/poky - Cloning into 'poky'... - remote: Counting - objects: 432160, done. remote: Compressing objects: 100% - (102056/102056), done. remote: Total 432160 (delta 323116), reused - 432037 (delta 323000) Receiving objects: 100% (432160/432160), 153.81 MiB | 8.54 MiB/s, done.
documentation/brief-yoctoprojectqs/index.rst distribution: · line 107
Quoted 10 lines
documentation/brief-yoctoprojectqs/index.rst +8
-2- Resolving deltas: 100% (323116/323116), done. - Checking connectivity... done. + $ git clone git://git.openembedded.org/bitbake bitbake-setup + Cloning into 'bitbake-setup'... + remote: Enumerating objects: 68454, done. + remote: Counting objects: 100% (49/49), done. + remote: Compressing objects: 100% (44/44), done. + remote: Total 68454 (delta 31), reused 5 (delta 5), pack-reused 68405 (from 1) + Receiving objects: 100% (68454/68454), 14.17 MiB | 10.56 MiB/s, done. + Resolving deltas: 100% (51776/51776), done.
As Alex said, I also agree on just showing the commands. That's really easier to maintain and makes the docs a bit clearer / less noisy.
Quoted 4 lines
documentation/brief-yoctoprojectqs/index.rst +0
-3-Go to :yocto_wiki:`Releases wiki page </Releases>`, and choose a release -codename (such as ``&DISTRO_NAME_NO_CAP;``), corresponding to either the -latest stable release or a Long Term Support release.
documentation/brief-yoctoprojectqs/index.rst distribution: · line 117
Quoted 10 lines
documentation/brief-yoctoprojectqs/index.rst +8
-1+Setup a build environment with the following command: -Then move to the ``poky`` directory and take a look at existing branches: +.. code-block:: shell + + $ ./bitbake-setup/bin/bitbake-setup init + +By default, this will setup in $HOME/bitbake-builds. If you prefer to +setup your builds in a different directory, for example the current +directory, you can instead use the ``--top-dir`` argument:
This has not changed but we do have the ~/.config/bitbake-setup/ directory where to put a default value for this. We should mention it here.
Quoted 21 lines
documentation/brief-yoctoprojectqs/index.rst +0
-18.. code-block:: shell - $ cd poky - $ git branch -a - . - . - . - remotes/origin/HEAD -> origin/master - remotes/origin/dunfell - remotes/origin/dunfell-next - . - . - . - remotes/origin/gatesgarth - remotes/origin/gatesgarth-next - . - . - . - remotes/origin/master - remotes/origin/master-next
documentation/brief-yoctoprojectqs/index.rst distribution: · line 123
Quoted 10 lines
documentation/brief-yoctoprojectqs/index.rst +3
-7- . - . - . - - -For this example, check out the ``&DISTRO_NAME_NO_CAP;`` branch based on the -``&DISTRO_NAME;`` release: + $ ./bitbake-setup/bin/bitbake-setup init --top-dir $PWD + +`bitbake-setup init` is an interactive program by default and will ask
We need to user double tick here (``bitbake-setup init``).
Quoted 46 lines
documentation/brief-yoctoprojectqs/index.rst +46
-0+you to make some decisions. Depending on your answers, the choices may +differ from the examples below. + +#. Choose a configuration (for example, ``yocto-master-options``): + + .. code-block:: shell + + Available configurations: + 0. yocto-master-nested-configs (future) Official Yocto configurations: poky, poky-altcfg, poky-tiny, for qemux86-64 and arm64 (defined with nested configurations) + 1. yocto-master-options (future) Official Yocto configurations: poky, poky-altcfg, poky-tiny, for qemux86-64, riscv64 and arm64 (defined with options) + + Please select one of the above configurations by its number: + 1 + +#. Choose a target machine (for example, ``qemux86-64``): + + .. code-block:: shell + + Selecting the only available bitbake configuration poky + Available target machines: + 0. machine/qemux86-64 + 1. machine/qemuarm64 + 2. machine/qemuriscv64 + Please select one of the above options by its number: + 0 + +#. Choose a distribution (for example, ``poky``): + + .. code-block:: shell + + Available distributions: + 0. distro/poky + 1. distro/poky-altcfg + 2. distro/poky-tiny + Please select one of the above options by its number: + 0 + Run 'bitbake-setup yocto-master-options poky distro/poky machine/qemux86-64' to select this configuration non-interactively. + Initializing a build in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64 + Fetching layer/tool repository bitbake into /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/bitbake + Fetching layer/tool repository openembedded-core into /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/openembedded-core + Fetching layer/tool repository meta-yocto into /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/meta-yocto + Fetching layer/tool repository yocto-docs into /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/layers/yocto-docs + ============================== + Setting up bitbake configuration in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build + This bitbake configuration provides: Poky reference distro build + Usage instructions and additional information are in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/README
documentation/brief-yoctoprojectqs/index.rst distribution: · line 176
Quoted 10 lines
documentation/brief-yoctoprojectqs/index.rst +4
-3+ +If you prefer to run non-interactively, you could use a command +like the following: .. code-block:: shell - $ git checkout -t origin/&DISTRO_NAME_NO_CAP; -b my-&DISTRO_NAME_NO_CAP; - Branch 'my-&DISTRO_NAME_NO_CAP;' set up to track remote branch '&DISTRO_NAME_NO_CAP;' from 'origin'. - Switched to a new branch 'my-&DISTRO_NAME_NO_CAP;' + $ bitbake-setup yocto-master-options poky distro/poky machine/qemux86-64
Now it's:
bitbake-setup init --non-interactive ...
Quoted 30 lines
documentation/brief-yoctoprojectqs/index.rst +14
-7-The previous Git checkout command creates a local branch named -``my-&DISTRO_NAME_NO_CAP;``. The files available to you in that branch -exactly match the repository's files in the ``&DISTRO_NAME_NO_CAP;`` -release branch. +Among other things, the script creates the :term:`Build Directory`, which is +``build`` in this case and is located in the "top-dir" directory. The script +also clones the layers needed to build the Poky reference distribution, in the +``layers`` subdirectory. After the script runs, your current working directory +is set to the :term:`Build Directory`. Later, when the build completes, the +:term:`Build Directory` contains all the files created during the build. -Note that you can regularly type the following command in the same directory -to keep your local files in sync with the release branch: + +Information about the build environment can be found in ``/path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/README`` which should look something like the following: .. code-block:: shell - $ git pull + Poky reference distro build + + Additional information is in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/conf/conf-summary.txt and /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/conf/conf-notes.txt + + Source the environment using '. /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/init-build-env' to run builds from the command line. + The bitbake configuration files (local.conf, bblayers.conf and more) can be found in /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/conf For more options and information about accessing Yocto Project related repositories, see the
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source. · line 223
Quoted 10 lines
documentation/brief-yoctoprojectqs/index.rst +2
-5@@ -182,61 +219,47 @@ an entire Linux distribution, including the toolchain, from source. ":yocto_wiki:`Working Behind a Network Proxy </Working_Behind_a_Network_Proxy>`" page of the Yocto Project Wiki. -#. **Initialize the Build Environment:** From within the ``poky`` - directory, run the :ref:`ref-manual/structure:``oe-init-build-env``` - environment - setup script to define Yocto Project's build environment on your - build host. +#. **Initialize the Build Environment:** + Run the ``init-build-env`` environment setup script within the build directory
s/Run/Source/
Quoted 16 lines
documentation/brief-yoctoprojectqs/index.rst +1
-12+ to define Yocto Project's build environment on your build host. .. code-block:: shell - $ cd poky - $ source oe-init-build-env - You had no conf/local.conf file. This configuration file has therefore been - created for you with some default values. You may wish to edit it to, for - example, select a different MACHINE (target hardware). See conf/local.conf - for more information as common configuration options are commented. - - You had no conf/bblayers.conf file. This configuration file has therefore - been created for you with some default values. To add additional metadata - layers into your configuration please add entries to conf/bblayers.conf. - - The Yocto Project has extensive documentation about OE including a reference
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source. · line 233
Quoted 10 lines
documentation/brief-yoctoprojectqs/index.rst +5
-4- manual which can be found at: - https://docs.yoctoproject.org + $ source /path/to/top-dir/yocto-master-options-poky-distro_poky-machine_qemux86-64/build/init-build-env + Poky reference distro build - For more information about OpenEmbedded see their website: - https://www.openembedded.org/ +#. **Examine Your Auto Configuration File:** When you set up the build + environment, an auto configuration file named ``auto.conf`` becomes + available in aa ``conf`` subdirectory of the :term:`Build Directory`. For this
s/aa/a/
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source. · line 235
Quoted 2 lines
documentation/brief-yoctoprojectqs/index.rst +2
-0+ example, the defaults are set to include three ``OE_FRAGMENTS``: + ``core/yocto/sstate-mirror-cdn``, ``machine/qemux86-64`` and ``distro/poky``.
This might be subject to change a so a bit of a maintenance burden. Can we rephrase to:
"""
Fragments of configurations are listed in the :term:OE_FRAGMENTS variable. """
OE_FRAGMENTS would need to be documented too ideally
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source. · line 242
Quoted 8 lines
documentation/brief-yoctoprojectqs/index.rst +6
-1+ These set up the environment similar to what was previously in the local + configuration file named ``local.conf`` which is now largely empty. + For more information on fragments, see :ref:`bitbake-user-manual/bitbake-user-manual-metadata:\`\`addfragments\`\` directive` in the Bitbake User Manual. - ### Shell environment set up for builds. ### + ``core/yocto/sstate-mirror-cdn`` sets up :term:`BB_HASHSERVE_UPSTREAM` and + :term:`SSTATE_MIRRORS`. The definition can be found in + ``../layers/openembedded-core/meta/conf/fragments/yocto/sstate-mirror-cdn.conf``.
Do we want to list this here? I feel like this could distract from the point of this section, which is to showcase how to use bitbake-setup. I think we need a separate section on fragments that we could link from here. I know this is additional work: we can merge this as-is but probably a task for later.
Quoted 25 lines
documentation/brief-yoctoprojectqs/index.rst +8
-15- You can now run 'bitbake <target>' - - Common targets are: - core-image-minimal - core-image-full-cmdline - core-image-sato - core-image-weston - meta-toolchain - meta-ide-support - - You can also run generated QEMU images with a command like 'runqemu qemux86-64' + .. code-block:: shell - Other commonly useful commands are: - - 'devtool' and 'recipetool' handle common recipe tasks - - 'bitbake-layers' handles common layer tasks - - 'oe-pkgdata-util' handles common target package tasks + BB_CONF_FRAGMENT_SUMMARY = "Use prebuilt sstate artifacts for standard Yocto build configurations." + BB_CONF_FRAGMENT_DESCRIPTION = "The Yocto Project has prebuilt artefacts available for standard build configurations. \ + This fragment enables their use. This will mean the build will query the \ + the network to check for artefacts at the start of builds, which does slow it down \ + initially but it will then speed up the builds by not having to build things if they are \ + present in the cache. It assumes you can download something faster than you can build it \ + which will depend on your network. \
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source. · line 257
Quoted 10 lines
documentation/brief-yoctoprojectqs/index.rst +4
-5+ Note: For this to work you also need hash-equivalence passthrough to the matching server \ + " - Among other things, the script creates the :term:`Build Directory`, which is - ``build`` in this case and is located in the :term:`Source Directory`. After - the script runs, your current working directory is set to the - :term:`Build Directory`. Later, when the build completes, the - :term:`Build Directory` contains all the files created during the build. + BB_HASHSERVE_UPSTREAM = 'wss://hashserv.yoctoproject.org/ws' + SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH"
This can be printed with bitbake-config-build show-fragment core/yocto/sstate-mirror-cdn now.
Quoted 17 lines
documentation/brief-yoctoprojectqs/index.rst +3
-3#. **Examine Your Local Configuration File:** When you set up the build environment, a local configuration file named ``local.conf`` becomes available in a ``conf`` subdirectory of the :term:`Build Directory`. For this - example, the defaults are set to build for a ``qemux86`` target, + example, the defaults are set to build for a ``qemux86-64`` target, which is suitable for emulation. The package manager used is set to the RPM package manager.@@ -249,13 +272,11 @@ an entire Linux distribution, including the toolchain, from source. This is relevant only when your network and the server that you use can download these artifacts faster than you would be able to build them. - To use such mirrors, uncomment the below lines in your ``conf/local.conf`` - file in the :term:`Build Directory`:: + To use such mirrors, ``bitbake-setup`` includes the following in your + ``conf/auto.conf`` file (or you can add it to ``conf/local.conf``) in
documentation/brief-yoctoprojectqs/index.rst an entire Linux distribution, including the toolchain, from source. · line 282
Quoted 10 lines
documentation/brief-yoctoprojectqs/index.rst +2
-4+ the :term:`Build Directory`:: - BB_HASHSERVE_UPSTREAM = "wss://hashserv.yoctoproject.org/ws" - SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH" - BB_HASHSERVE = "auto" - BB_SIGNATURE_HANDLER = "OEEquivHash" + OE_FRAGMENTS += "core/yocto/sstate-mirror-cdn" The hash equivalence server needs the websockets python module version 9.1 or later. Debian GNU/Linux 12 (Bookworm) and later, Fedora, CentOS Stream
Thanks!
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 4 lines · Antonin Godard via lists.yoctoproject.org
Do we want to list this here? I feel like this could distract from the point of this section, which is to showcase how to use bitbake-setup. I think we need a separate section on fragments that we could link from here. I know this is additional work: we can merge this as-is but probably a task for later.
I too think properly documenting the oe-core fragment implementation and available fragments should be done first, and only then full bitbake-setup documentation should be based on it. Bitbake manual describes the addfragments keyword, but not what is actually done with that keyword in oe-core, or available tooling (in oe-core) to manage fragments, or available fragments.
You can write a top level user guide for 'initial setup/status/update' with bitbake-setup without getting into fragments, but the moment you go into how bitbake-setup really works and what needs to be in a config file for it, they're are a key piece.
Alex
Quoted 8 lines · Alexander Kanavin via lists.yoctoproject.org
Quoted 4 lines · Antonin Godard via lists.yoctoproject.org
Do we want to list this here? I feel like this could distract from the point of this section, which is to showcase how to use bitbake-setup. I think we need a separate section on fragments that we could link from here. I know this is additional work: we can merge this as-is but probably a task for later.
Quoted 6 lines
I too think properly documenting the oe-core fragment implementation and available fragments should be done first, and only then full bitbake-setup documentation should be based on it. Bitbake manual describes the addfragments keyword, but not what is actually done with that keyword in oe-core, or available tooling (in oe-core) to manage fragments, or available fragments.
I'm working on adding the docs on the fragments at the moment, it should be out this week.
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 15 lines · Alexander Kanavin
Quoted 4 lines · Antonin Godard via lists.yoctoproject.org
Do we want to list this here? I feel like this could distract from the point of this section, which is to showcase how to use bitbake-setup. I think we need a separate section on fragments that we could link from here. I know this is additional work: we can merge this as-is but probably a task for later.
I too think properly documenting the oe-core fragment implementation and available fragments should be done first, and only then full bitbake-setup documentation should be based on it. Bitbake manual describes the addfragments keyword, but not what is actually done with that keyword in oe-core, or available tooling (in oe-core) to manage fragments, or available fragments.
Quoted 4 lines
You can write a top level user guide for 'initial setup/status/update' with bitbake-setup without getting into fragments, but the moment you go into how bitbake-setup really works and what needs to be in a config file for it, they're are a key piece.
Is there also a plan to document how to create the conf.json files for use with bitbake-setup?
I tried to use bitbake-layers create-layers-setup ... but that doesn't seem to be the right way to create them - the bitbake repository was not included in the generated json file.
Apologies if I've missed something!
Thanks,
Signature · 1 line
Paul Barker
Quoted 8 lines · Paul Barker
Is there also a plan to document how to create the conf.json files for use with bitbake-setup?
I tried to use
bitbake-layers create-layers-setup ...but that doesn't seem to be the right way to create them - the bitbake repository was not included in the generated json file.Apologies if I've missed something!
I don't think anything was missed. There are three still to be done items here:
- extending code in bitbake-layers so it can create a full bitbake-setup config from an active build, rather than just the layers bit (what it does now is intended for the oe-setup-layers tool, which is a sort of precursor to bitbake-setup). I believe all the pieces can be programmatically obtained: particularly active fragments and the list of enabled layers.
- documenting how to use that;
- documenting how to write advanced bitbake-setup configurations by hand and the full range of syntax and features.
Alex