From patchwork Thu Feb 13 08:23:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 57246 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBDD3C021A8 for ; Thu, 13 Feb 2025 08:23:29 +0000 (UTC) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by mx.groups.io with SMTP id smtpd.web10.6627.1739435003584035753 for ; Thu, 13 Feb 2025 00:23:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=mmIH74PB; spf=pass (domain: bootlin.com, ip: 217.70.183.195, mailfrom: antonin.godard@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id DE28F20454; Thu, 13 Feb 2025 08:23:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1739435002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8Lavwrzod1nmAdtb6L5HHQEVpbc41UdSwzzh/4hiFt4=; b=mmIH74PBaAGYa1MT5H2PdUXtlWDf6SEMpfpK/eBgk+EUx7uB79IyW89JgVA8JnLkEX4ov2 doRCMm1L1n8yrZTXGyusVSSKICE5wir7bSoWwEumhvPDRk/UFpFHi094L/8NBZcmdZIlm/ BYtZ4fjPaL3eNwKkdpsWPdC3E4DIUxSW6hImVFiy7/xdbJHxXxxZoa/wyay+Btg8kPO2qz msCv/sIJOLLkKfGpWTh5H3ku8Sl2lYmPJvxlfbj2orHUCJJsQnrkrxTJiqRapI+1HNiO+v RT/xloGXOIgmVD99wisrTMTjRAVbWs12BYk/Kk8zrqI6eXc6/NRWHPP4vucjog== From: Antonin Godard Date: Thu, 13 Feb 2025 09:23:15 +0100 Subject: [PATCH v2 1/6] dev-manual: move multiconfig documentation to its own document MIME-Version: 1.0 Message-Id: <20250213-multiconfig-doc-v2-1-f2bd35115cb7@bootlin.com> References: <20250213-multiconfig-doc-v2-0-f2bd35115cb7@bootlin.com> In-Reply-To: <20250213-multiconfig-doc-v2-0-f2bd35115cb7@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Antonin Godard X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=16361; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=y/EOC3AaI/o3iNx5zS8ICZQJakA0zURWUJ65srT7MTk=; b=owEBbQKS/ZANAwAIAdGAQUApo6g2AcsmYgBnrav4CLAdVBnAg4CQYDGCzxPsXNM0tIvnPM9Qf jNDeb2VbHSJAjMEAAEIAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCZ62r+AAKCRDRgEFAKaOo NpIxD/9r5Nh/W9ibmfGGJwVt6+0dTbrxVgmiNqq7noMiMm47piMtdikBn9byLDZiAyG4k4IJI2S fBctIJ0DfvsM/xkQifSXuBD43uPmWrVb/typ0OXsMIWSeHCUIwHvWc6c3T9Yk3UQ4n1RaE4/JFQ 3wzFS7jo97AWeL43R8sEQIkipDSJtuwrz7VcBYEMM3X2VvW1BSDEMz3HcTZkU7ZH2UxmYUHvff8 xfOkgkkfHuYAOxSrOxu4MLfon+gOe/TgmqP6bbHN+sAxM2aeNJE179x2qowuB4Zlpb2r7OrHgmM 6gxN7iJM0A5Om5rpi6z4YntYxDQw/N5tpGk6821jy/u7L5Ws3Gdb+exMqOTtxiVIhz7P5rhqw5V ODetbF/unghrHHwk19CrvKfL9ngBqqO8OJw9Im4TpjPT5xQ2vtYcILOX1XxJJe7cBDlcVbwZWHS hvCNsCMskYvk1tRDRNRp94KMB/kL/1f9/otu47bXV72Qr7yRKSjIjgzwfHKIab2jYoppGcuFMzV i0E0x3owKaxDyd1pQOtZVOeZxAgyLBv27H8vxdmjGsa7MnUBvXguchTUfQZpUoSZ7dYyNYBIDxo 6gQAyCeTmXnI0DxUeFt0jvZV0S4pH1EGG/Nx2W3sQ/0FZE/TgHHy6zJiR8c3bjNLeGZi+6ge203 kteGqmZs9Uc29AQ== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegiedvkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeetnhhtohhnihhnucfiohgurghrugcuoegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepheeigeeuhfefgeehfffgueeiteehieelfeehjeektefgkeeuheeuleduvdelgffhnecukfhppedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehledphhgvlhhopegluddvjedrtddruddrudgnpdhmrghilhhfrhhomheprghnthhonhhinhdrghhouggrrhgusegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopeefpdhrtghpthhtohepughotghssehlihhsthhsrdihohgtthhophhrohhjvggtthdrohhrghdprhgtphhtthhopehthhhomhgrshdrphgvthgriiiiohhnihessghoohhtlhhinhdrtghomhdprhgtphhtthhopegrnhhtohhnihhnrdhgohgurghrugessghoo hhtlhhinhdrtghomh X-GND-Sasl: antonin.godard@bootlin.com List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 13 Feb 2025 08:23:29 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/6359 In preparation of more section and examples to multiconfig, move the section about it in building.rst into its own document. Signed-off-by: Antonin Godard Reviewed-by: Quentin Schulz --- documentation/dev-manual/building.rst | 156 +----------------------------- documentation/dev-manual/index.rst | 1 + documentation/dev-manual/multiconfig.rst | 160 +++++++++++++++++++++++++++++++ 3 files changed, 163 insertions(+), 154 deletions(-) diff --git a/documentation/dev-manual/building.rst b/documentation/dev-manual/building.rst index 4770a5a18..807c665f6 100644 --- a/documentation/dev-manual/building.rst +++ b/documentation/dev-manual/building.rst @@ -113,160 +113,8 @@ The following figure and list overviews the build process: Building Images for Multiple Targets Using Multiple Configurations ================================================================== -You can use a single ``bitbake`` command to build multiple images or -packages for different targets where each image or package requires a -different configuration (multiple configuration builds). The builds, in -this scenario, are sometimes referred to as "multiconfigs", and this -section uses that term throughout. - -This section describes how to set up for multiple configuration builds -and how to account for cross-build dependencies between the -multiconfigs. - -Setting Up and Running a Multiple Configuration Build ------------------------------------------------------ - -To accomplish a multiple configuration build, you must define each -target's configuration separately using a parallel configuration file in -the :term:`Build Directory` or configuration directory within a layer, and you -must follow a required file hierarchy. Additionally, you must enable the -multiple configuration builds in your ``local.conf`` file. - -Follow these steps to set up and execute multiple configuration builds: - -- *Create Separate Configuration Files*: You need to create a single - configuration file for each build target (each multiconfig). - The configuration definitions are implementation dependent but often - each configuration file will define the machine and the - temporary directory BitBake uses for the build. Whether the same - temporary directory (:term:`TMPDIR`) can be shared will depend on what is - similar and what is different between the configurations. Multiple MACHINE - targets can share the same (:term:`TMPDIR`) as long as the rest of the - configuration is the same, multiple :term:`DISTRO` settings would need separate - (:term:`TMPDIR`) directories. - - For example, consider a scenario with two different multiconfigs for the same - :term:`MACHINE`: "qemux86" built - for two distributions such as "poky" and "poky-lsb". In this case, - you would need to use the different :term:`TMPDIR`. - - Here is an example showing the minimal statements needed in a - configuration file for a "qemux86" target whose temporary build - directory is ``tmpmultix86``:: - - MACHINE = "qemux86" - TMPDIR = "${TOPDIR}/tmpmultix86" - - The location for these multiconfig configuration files is specific. - They must reside in the current :term:`Build Directory` in a sub-directory of - ``conf`` named ``multiconfig`` or within a layer's ``conf`` directory - under a directory named ``multiconfig``. Here is an example that defines - two configuration files for the "x86" and "arm" multiconfigs: - - .. image:: figures/multiconfig_files.png - :align: center - :width: 50% - - The usual :term:`BBPATH` search path is used to locate multiconfig files in - a similar way to other conf files. - -- *Add the BitBake Multi-configuration Variable to the Local - Configuration File*: Use the - :term:`BBMULTICONFIG` - variable in your ``conf/local.conf`` configuration file to specify - each multiconfig. Continuing with the example from the previous - figure, the :term:`BBMULTICONFIG` variable needs to enable two - multiconfigs: "x86" and "arm" by specifying each configuration file:: - - BBMULTICONFIG = "x86 arm" - - .. note:: - - A "default" configuration already exists by definition. This - configuration is named: "" (i.e. empty string) and is defined by - the variables coming from your ``local.conf`` - file. Consequently, the previous example actually adds two - additional configurations to your build: "arm" and "x86" along - with "". - -- *Launch BitBake*: Use the following BitBake command form to launch - the multiple configuration build:: - - $ bitbake [mc:multiconfigname:]target [[[mc:multiconfigname:]target] ... ] - - For the example in this section, the following command applies:: - - $ bitbake mc:x86:core-image-minimal mc:arm:core-image-sato mc::core-image-base - - The previous BitBake command builds a ``core-image-minimal`` image - that is configured through the ``x86.conf`` configuration file, a - ``core-image-sato`` image that is configured through the ``arm.conf`` - configuration file and a ``core-image-base`` that is configured - through your ``local.conf`` configuration file. - -.. note:: - - Support for multiple configuration builds in the Yocto Project &DISTRO; - (&DISTRO_NAME;) Release does not include Shared State (sstate) - optimizations. Consequently, if a build uses the same object twice - in, for example, two different :term:`TMPDIR` - directories, the build either loads from an existing sstate cache for - that build at the start or builds the object fresh. - -Enabling Multiple Configuration Build Dependencies --------------------------------------------------- - -Sometimes dependencies can exist between targets (multiconfigs) in a -multiple configuration build. For example, suppose that in order to -build a ``core-image-sato`` image for an "x86" multiconfig, the root -filesystem of an "arm" multiconfig must exist. This dependency is -essentially that the -:ref:`ref-tasks-image` task in the -``core-image-sato`` recipe depends on the completion of the -:ref:`ref-tasks-rootfs` task of the -``core-image-minimal`` recipe. - -To enable dependencies in a multiple configuration build, you must -declare the dependencies in the recipe using the following statement -form:: - - task_or_package[mcdepends] = "mc:from_multiconfig:to_multiconfig:recipe_name:task_on_which_to_depend" - -To better show how to use this statement, consider the example scenario -from the first paragraph of this section. The following statement needs -to be added to the recipe that builds the ``core-image-sato`` image:: - - do_image[mcdepends] = "mc:x86:arm:core-image-minimal:do_rootfs" - -In this example, the `from_multiconfig` is "x86". The `to_multiconfig` is "arm". The -task on which the :ref:`ref-tasks-image` task in the recipe depends is the -:ref:`ref-tasks-rootfs` task from the ``core-image-minimal`` recipe associated -with the "arm" multiconfig. - -Once you set up this dependency, you can build the "x86" multiconfig -using a BitBake command as follows:: - - $ bitbake mc:x86:core-image-sato - -This command executes all the tasks needed to create the -``core-image-sato`` image for the "x86" multiconfig. Because of the -dependency, BitBake also executes through the :ref:`ref-tasks-rootfs` task for the -"arm" multiconfig build. - -Having a recipe depend on the root filesystem of another build might not -seem that useful. Consider this change to the statement in the -``core-image-sato`` recipe:: - - do_image[mcdepends] = "mc:x86:arm:core-image-minimal:do_image" - -In this case, BitBake must -create the ``core-image-minimal`` image for the "arm" build since the -"x86" build depends on it. - -Because "x86" and "arm" are enabled for multiple configuration builds -and have separate configuration files, BitBake places the artifacts for -each build in the respective temporary build directories (i.e. -:term:`TMPDIR`). +See the :doc:`multiconfig` section of the Yocto Project Development Tasks +Manual. Building an Initial RAM Filesystem (Initramfs) Image ==================================================== diff --git a/documentation/dev-manual/index.rst b/documentation/dev-manual/index.rst index 760108f60..63736e0ab 100644 --- a/documentation/dev-manual/index.rst +++ b/documentation/dev-manual/index.rst @@ -20,6 +20,7 @@ Yocto Project Development Tasks Manual development-shell python-development-shell building + multiconfig speeding-up-build libraries prebuilt-libraries diff --git a/documentation/dev-manual/multiconfig.rst b/documentation/dev-manual/multiconfig.rst new file mode 100644 index 000000000..8464f80c3 --- /dev/null +++ b/documentation/dev-manual/multiconfig.rst @@ -0,0 +1,160 @@ +.. SPDX-License-Identifier: CC-BY-SA-2.0-UK + +Building Images for Multiple Targets Using Multiple Configurations +****************************************************************** + +You can use a single ``bitbake`` command to build multiple images or +packages for different targets where each image or package requires a +different configuration (multiple configuration builds). The builds, in +this scenario, are sometimes referred to as "multiconfigs", and this +section uses that term throughout. + +This section describes how to set up for multiple configuration builds +and how to account for cross-build dependencies between the +multiconfigs. + +Setting Up and Running a Multiple Configuration Build +===================================================== + +To accomplish a multiple configuration build, you must define each +target's configuration separately using a parallel configuration file in +the :term:`Build Directory` or configuration directory within a layer, and you +must follow a required file hierarchy. Additionally, you must enable the +multiple configuration builds in your ``local.conf`` file. + +Follow these steps to set up and execute multiple configuration builds: + +- *Create Separate Configuration Files*: You need to create a single + configuration file for each build target (each multiconfig). + The configuration definitions are implementation dependent but often + each configuration file will define the machine and the + temporary directory BitBake uses for the build. Whether the same + temporary directory (:term:`TMPDIR`) can be shared will depend on what is + similar and what is different between the configurations. Multiple MACHINE + targets can share the same (:term:`TMPDIR`) as long as the rest of the + configuration is the same, multiple :term:`DISTRO` settings would need separate + (:term:`TMPDIR`) directories. + + For example, consider a scenario with two different multiconfigs for the same + :term:`MACHINE`: "qemux86" built + for two distributions such as "poky" and "poky-lsb". In this case, + you would need to use the different :term:`TMPDIR`. + + Here is an example showing the minimal statements needed in a + configuration file for a "qemux86" target whose temporary build + directory is ``tmpmultix86``:: + + MACHINE = "qemux86" + TMPDIR = "${TOPDIR}/tmpmultix86" + + The location for these multiconfig configuration files is specific. + They must reside in the current :term:`Build Directory` in a sub-directory of + ``conf`` named ``multiconfig`` or within a layer's ``conf`` directory + under a directory named ``multiconfig``. Here is an example that defines + two configuration files for the "x86" and "arm" multiconfigs: + + .. image:: figures/multiconfig_files.png + :align: center + :width: 50% + + The usual :term:`BBPATH` search path is used to locate multiconfig files in + a similar way to other conf files. + +- *Add the BitBake Multi-configuration Variable to the Local + Configuration File*: Use the + :term:`BBMULTICONFIG` + variable in your ``conf/local.conf`` configuration file to specify + each multiconfig. Continuing with the example from the previous + figure, the :term:`BBMULTICONFIG` variable needs to enable two + multiconfigs: "x86" and "arm" by specifying each configuration file:: + + BBMULTICONFIG = "x86 arm" + + .. note:: + + A "default" configuration already exists by definition. This + configuration is named: "" (i.e. empty string) and is defined by + the variables coming from your ``local.conf`` + file. Consequently, the previous example actually adds two + additional configurations to your build: "arm" and "x86" along + with "". + +- *Launch BitBake*: Use the following BitBake command form to launch + the multiple configuration build:: + + $ bitbake [mc:multiconfigname:]target [[[mc:multiconfigname:]target] ... ] + + For the example in this section, the following command applies:: + + $ bitbake mc:x86:core-image-minimal mc:arm:core-image-sato mc::core-image-base + + The previous BitBake command builds a ``core-image-minimal`` image + that is configured through the ``x86.conf`` configuration file, a + ``core-image-sato`` image that is configured through the ``arm.conf`` + configuration file and a ``core-image-base`` that is configured + through your ``local.conf`` configuration file. + +.. note:: + + Support for multiple configuration builds in the Yocto Project &DISTRO; + (&DISTRO_NAME;) Release does not include Shared State (sstate) + optimizations. Consequently, if a build uses the same object twice + in, for example, two different :term:`TMPDIR` + directories, the build either loads from an existing sstate cache for + that build at the start or builds the object fresh. + +Enabling Multiple Configuration Build Dependencies +================================================== + +Sometimes dependencies can exist between targets (multiconfigs) in a +multiple configuration build. For example, suppose that in order to +build a ``core-image-sato`` image for an "x86" multiconfig, the root +filesystem of an "arm" multiconfig must exist. This dependency is +essentially that the +:ref:`ref-tasks-image` task in the +``core-image-sato`` recipe depends on the completion of the +:ref:`ref-tasks-rootfs` task of the +``core-image-minimal`` recipe. + +To enable dependencies in a multiple configuration build, you must +declare the dependencies in the recipe using the following statement +form:: + + task_or_package[mcdepends] = "mc:from_multiconfig:to_multiconfig:recipe_name:task_on_which_to_depend" + +To better show how to use this statement, consider the example scenario +from the first paragraph of this section. The following statement needs +to be added to the recipe that builds the ``core-image-sato`` image:: + + do_image[mcdepends] = "mc:x86:arm:core-image-minimal:do_rootfs" + +In this example, the `from_multiconfig` is "x86". The `to_multiconfig` is "arm". The +task on which the :ref:`ref-tasks-image` task in the recipe depends is the +:ref:`ref-tasks-rootfs` task from the ``core-image-minimal`` recipe associated +with the "arm" multiconfig. + +Once you set up this dependency, you can build the "x86" multiconfig +using a BitBake command as follows:: + + $ bitbake mc:x86:core-image-sato + +This command executes all the tasks needed to create the +``core-image-sato`` image for the "x86" multiconfig. Because of the +dependency, BitBake also executes through the :ref:`ref-tasks-rootfs` task for the +"arm" multiconfig build. + +Having a recipe depend on the root filesystem of another build might not +seem that useful. Consider this change to the statement in the +``core-image-sato`` recipe:: + + do_image[mcdepends] = "mc:x86:arm:core-image-minimal:do_image" + +In this case, BitBake must +create the ``core-image-minimal`` image for the "arm" build since the +"x86" build depends on it. + +Because "x86" and "arm" are enabled for multiple configuration builds +and have separate configuration files, BitBake places the artifacts for +each build in the respective temporary build directories (i.e. +:term:`TMPDIR`). + From patchwork Thu Feb 13 08:23:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 57243 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB8D4C021A0 for ; Thu, 13 Feb 2025 08:23:29 +0000 (UTC) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by mx.groups.io with SMTP id smtpd.web11.6574.1739435003559138251 for ; Thu, 13 Feb 2025 00:23:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=k+Oxg0w6; spf=pass (domain: bootlin.com, ip: 217.70.183.195, mailfrom: antonin.godard@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 28644204A8; Thu, 13 Feb 2025 08:23:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1739435002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kvMVaWTl+ElqUpjf+YiZfefmM1ZbbGqad6OV3Zlrpqo=; b=k+Oxg0w6QL5mtEWT45/MNZ0y7zBSD7IUraqCUUznC3QpQOBymCeh5HguFPQSKUzcyeVscu 1nPJw7qe+tU5T076w1m3vHskmYi6ZTicucxRDAbRoG0SHZwsl9VA68l8FDaFEjDkbiDJSz qBiFbIEAo/ONWhxcxXkeX3nP0j5dd1skkn318ipKuEskQdUr7wk1Y3j8MDWmB9gbqDUIlM m/b82KrmI+x/35bV3rf2PpJUPFWh5rKb/EwbxPzK9AyxbC8c5BO/jbTsziOraAfd4IO8rY 8RoGWsHLffERoJ6lJjOWO+tkMyGp2vEvuIgOSt95JHcCUJf1BdQbx0sWanDlEw== From: Antonin Godard Date: Thu, 13 Feb 2025 09:23:16 +0100 Subject: [PATCH v2 2/6] variables.rst: add a reference to BB_CURRENT_MC from bbdocs MIME-Version: 1.0 Message-Id: <20250213-multiconfig-doc-v2-2-f2bd35115cb7@bootlin.com> References: <20250213-multiconfig-doc-v2-0-f2bd35115cb7@bootlin.com> In-Reply-To: <20250213-multiconfig-doc-v2-0-f2bd35115cb7@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Antonin Godard X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=847; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=RYSloyBLGtr9c/1aoXZmtiBHTMSYZkiSgPmJzS8NhD0=; b=owEBbQKS/ZANAwAIAdGAQUApo6g2AcsmYgBnrav4Q1kKS2m7hZ4rRHpFXW6MtRxrRELQ7JAMH /8H2G2krNqJAjMEAAEIAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCZ62r+AAKCRDRgEFAKaOo NuuVD/9pAF+z1Wcb6RdE7a0RsMuCDFtBCsaN6es9rkK8Cut0QvJw3Yek5tLKtxj7BVjEAnL4c3R fyej/Rh3bXUx42aYxYR4wyMNUojbe4Ky+ZQA89Kj56jKhwy3vyKGRsd4F0lhJekXMVhuMLkoA25 GJK8IrSKaxTl79kfW14VTNIJbL2qgPFcnUgH2pkgTLee8f6C/Mgs+4D+rzY4hyHu5FrluBjb4cb nthLBpJQFJ1ia1nfJ+hJaQ3NvooZhk1v30g6uxy5c3gES0Dh0Wh4V8g0dN/ZPGpZXJOKwuyU25p Ns4zhon3R3yiya95FvwybBFZuqjafIUYUZrRnhv3qEgNP2I2p9iq//YJXCDKQZDM8a+Wam5suzZ VdtCGIcJejROBz8MbpOdFmvZP4pg4sXD2ClfKajDonk/FORxxFXAG4S1Rpfptgb0ErTnELE+Bgs AsbJdClHhiOLf0OYfF3tRhtywTDEn9VjBiKGfFKLwK1pgSxEkL9Qrv0pNm5eide3zxBZOZFFKug HYR8oNyDCnfTdjFzGKgKRVPtO5OedDyW88uRG1vpu6BWT7IYILkwsq/Uz4umTF4zy5U/pTxDwmg 8iD09vaWRfcSzoxRe2hqRnpsdLdfUh/ChxKSorOE+kE1TLhdIxkACLcMEBtAejbZzSyTkJVgr/I XQMTXLQv+oEuwfw== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegiedvkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeetnhhtohhnihhnucfiohgurghrugcuoegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepheeigeeuhfefgeehfffgueeiteehieelfeehjeektefgkeeuheeuleduvdelgffhnecukfhppedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehledphhgvlhhopegluddvjedrtddruddrudgnpdhmrghilhhfrhhomheprghnthhonhhinhdrghhouggrrhgusegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopeefpdhrtghpthhtohepughotghssehlihhsthhsrdihohgtthhophhrohhjvggtthdrohhrghdprhgtphhtthhopehthhhomhgrshdrphgvthgriiiiohhnihessghoohhtlhhinhdrtghomhdprhgtphhtthhopegrnhhtohhnihhnrdhgohgurghrugessghoo hhtlhhinhdrtghomh X-GND-Sasl: antonin.godard@bootlin.com List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 13 Feb 2025 08:23:29 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/6357 BB_CURRENT_MC is documented in the Bitbake user manual. Add a reference to it here. Signed-off-by: Antonin Godard Reviewed-by: Quentin Schulz --- documentation/ref-manual/variables.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index adbef69d8..a402815b6 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst @@ -390,6 +390,9 @@ system and gives an overview of their function and contents. :term:`BB_CURRENTTASK` See :term:`bitbake:BB_CURRENTTASK` in the BitBake manual. + :term:`BB_CURRENT_MC` + See :term:`bitbake:BB_CURRENT_MC` in the BitBake manual. + :term:`BB_DEFAULT_TASK` See :term:`bitbake:BB_DEFAULT_TASK` in the BitBake manual. From patchwork Thu Feb 13 08:23:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 57244 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4736C021A6 for ; Thu, 13 Feb 2025 08:23:29 +0000 (UTC) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by mx.groups.io with SMTP id smtpd.web10.6628.1739435003769287091 for ; Thu, 13 Feb 2025 00:23:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Osh6GR3I; spf=pass (domain: bootlin.com, ip: 217.70.183.195, mailfrom: antonin.godard@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 5AF10204A9; Thu, 13 Feb 2025 08:23:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1739435002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t6yL9aWywCtm6mjJMxAJU6RWzRSeuy/lAyt5VG5AFZU=; b=Osh6GR3Ix3Is4WQ7au82Yg/GiJ+MQrRCwibV6H47CxpZD8te7pjU5BRszY+bxeQfDuAnZg 83jWVPaFexnBc3KEDI2uUtztjmJBmVVG6NN77Gy//f4NwrDjgomnigMJGQDPOD2P+36qQa 8fs9y9HpF9YC2UE9RSDDbkYWpObLb16Cml3SJGrcNOWGR08UG3/xaRypdelkOitzbhoJpj KiBLiy4lSlv3wyz/tlbSR4UM6PNPhailYGuRx9mn/a0qzk4aA9Tke1siPi6k2xDcXNSV/X wI4ZU4yPDGGkiYX64TbsmOAkQQrlnRz3kvCYoLHllS1VlafVHBVSq5LP8o/0XQ== From: Antonin Godard Date: Thu, 13 Feb 2025 09:23:17 +0100 Subject: [PATCH v2 3/6] migration-5.2: fix references to BB_CURRENT_MC MIME-Version: 1.0 Message-Id: <20250213-multiconfig-doc-v2-3-f2bd35115cb7@bootlin.com> References: <20250213-multiconfig-doc-v2-0-f2bd35115cb7@bootlin.com> In-Reply-To: <20250213-multiconfig-doc-v2-0-f2bd35115cb7@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Antonin Godard X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1170; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=k5dWHSw5q05d/y9H0jcpGnWNPvRlGF8Y1Xvjq1F6z7U=; b=owEBbQKS/ZANAwAIAdGAQUApo6g2AcsmYgBnrav4LLQwRQ7OrHwFDdCqde7Ud09Am1OzTQ4Dz 6NV76rFGWWJAjMEAAEIAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCZ62r+AAKCRDRgEFAKaOo Nj4BEACDV8POc42bucFzxQ/2jJ/qAZE8gFbZJmRdEcIhaggjFlZWmj9Zp0dgbTNf8GpRGZgkBUt bfPZiXNrwypAhHtjWo8yol8z3HGMlI3k1hOnlUepWUzujDrzjjRym7ziqTvtMZN7l8gg7Um9Pub UWfKDAmrFFRK2gHJrp4KqxrILtjrFeHNg5gsGNvGbQCXZOXSpZHiH46x7wI7d8n83YwCHZVwM1N qDUmxWQouIoZeY7Xqq85FApthj6x66D1gYzJYkE5uRhs4U68DXjslkJ3qza3aVczDy2JmmuB4Gj rjoLknfCirSY4A5YzuuDw5xmCp1vhs1QZ5hIwtzgTPARY4ZBIWIdY2Sz55vLCo8FvUOfAhc5cv2 /uNe5WFd8A3RXwNujsUCn/KSrur5MoaOIBxihWB9CZ5NxAdt4PWks3egpc4YFzRAWlOhkfpOaNr 8UwE3PheEi22vi0YmvnEIjMSLQqhCsqaNRZW30jmxNnxvCvr5BkmjS/8RBfAoIar4TSAsDMXxQQ /HHYPRnlKaQoZ8jOwLCyVWkTd8WwLAq6vPdwo9Pm84xXCl93T37LaljEF4SATWpPCnxYaX8FVvi WAdPGSvsiDw+4pN1fMT0eHSGUx8HuSLaY4pyPLO8TEDxhg14H8Y/9RlrNiVqJ98gtOlwaPd+xa9 iyM3A2YA4xGY4zQ== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegiedvkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeetnhhtohhnihhnucfiohgurghrugcuoegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepheeigeeuhfefgeehfffgueeiteehieelfeehjeektefgkeeuheeuleduvdelgffhnecukfhppedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehledphhgvlhhopegluddvjedrtddruddrudgnpdhmrghilhhfrhhomheprghnthhonhhinhdrghhouggrrhgusegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopeefpdhrtghpthhtohepughotghssehlihhsthhsrdihohgtthhophhrohhjvggtthdrohhrghdprhgtphhtthhopehthhhomhgrshdrphgvthgriiiiohhnihessghoohhtlhhinhdrtghomhdprhgtphhtthhopegrnhhtohhnihhnrdhgohgurghrugessghoo hhtlhhinhdrtghomh X-GND-Sasl: antonin.godard@bootlin.com List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 13 Feb 2025 08:23:29 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/6360 Now part of the documentation. Signed-off-by: Antonin Godard Reviewed-by: Quentin Schulz --- documentation/migration-guides/migration-5.2.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/migration-guides/migration-5.2.rst b/documentation/migration-guides/migration-5.2.rst index de2ea773e..75bc4dbc6 100644 --- a/documentation/migration-guides/migration-5.2.rst +++ b/documentation/migration-guides/migration-5.2.rst @@ -97,12 +97,12 @@ systemd changes Multiconfig changes ~~~~~~~~~~~~~~~~~~~ -The value of ``BB_CURRENT_MC`` was changed from ``default`` to an empty string +The value of :term:`BB_CURRENT_MC` was changed from ``default`` to an empty string for the default multiconfig configuration to avoid needing to map the values within BitBake. This was already not happening in some cases so this fixes some obscure bugs. -Any logic based on ``BB_CURRENT_MC`` equalling to ``default`` by default should +Any logic based on :term:`BB_CURRENT_MC` equalling to ``default`` by default should be changed to be equal to an empty string. Virtual toolchain provider changes From patchwork Thu Feb 13 08:23:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 57241 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BAA57C0219D for ; Thu, 13 Feb 2025 08:23:29 +0000 (UTC) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by mx.groups.io with SMTP id smtpd.web10.6629.1739435004071112106 for ; Thu, 13 Feb 2025 00:23:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=fBAwipN9; spf=pass (domain: bootlin.com, ip: 217.70.183.195, mailfrom: antonin.godard@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 8E885204A7; Thu, 13 Feb 2025 08:23:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1739435002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9FBA/WeryChPGUWzKtZPOzMO6SSzbhwXjILYMIx26ow=; b=fBAwipN9mDvY/V5B408ce5YZ5Vl/NUUIiRyTCq5x6s4DiNQvPLKFbi91d6g9eblRa55IXc 35V9SB+fpIGYaY16+0HPKH+S+R3DMAijdJEmtRUoGOsw9uWEqYOMEPJZa2MwJjWiKzL5qV Cu2vb6JH/gKFAOoW6JGjm1ld+OgalUsgaV7DKua0/l2u5HXJ8jANJMxDwoLeyicNzV5qIM maF255MzYM2X/cCqQmABi9idMdjjiPPFgvphh53emj0xoHH4mJE5+84p2ZTs4M3w4ri/D9 9yVnKFYvIG56YTVc4THKaxtPGzB17Gd2cq675LipCnQLAhx27S0y0u3wClN8Cw== From: Antonin Godard Date: Thu, 13 Feb 2025 09:23:18 +0100 Subject: [PATCH v2 4/6] dev-manual/multiconfig: rename to use Multiconfig term MIME-Version: 1.0 Message-Id: <20250213-multiconfig-doc-v2-4-f2bd35115cb7@bootlin.com> References: <20250213-multiconfig-doc-v2-0-f2bd35115cb7@bootlin.com> In-Reply-To: <20250213-multiconfig-doc-v2-0-f2bd35115cb7@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Antonin Godard , Quentin Schulz X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1025; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=K38vQ8GdfEPPgWAtmkQvx31l5MnTeJTeaWQOhHdFnvE=; b=owEBbQKS/ZANAwAIAdGAQUApo6g2AcsmYgBnrav4mtUq1/Ua8ubgR3SsXHjJTkdN0J/paUZLi b16Fkunq3SJAjMEAAEIAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCZ62r+AAKCRDRgEFAKaOo NqGGD/wJyx6Rvqyx2u0EKsm9MIdc1cLhb3EXgMQPzSWWxv/Rq51N/CdUgEzklmdLBBvnPdD4gLT EN56YhkDKv5fXdialIPMnv18lDwFBXo00zshFXh3LNItIAMZclf3CP8Ee9nyjxppOuSnsK9pMao 4/6VsUFssnhIyHEqfeGc4EeLtle/64JCm0hZqcENzIqMMxkLNRkJiplBfIzoo8AP6kDUHj32ueW RSZEzHL1C6kGmysoqLDgpbDIsHVCWoF7fdNT2U+Nik3IETAYhNC9lq93GoAFhP/bJlnDU0YPz06 rYa24TgOAVtzRoYKfhU8QLi+ZAr8ogHrm5VeL7hErhIdGcxI+Z5p78sUwbmw1ntjxUke4djs27q gYY4lz7Ov/RPm1qdo2nkhXFGS87vrIXvzTg7iIpCxmb1PUSsBOuWAgkvspGJG2+WbuW9Q+5GzUH WCZi5g25BDJ97oT0XNbqxRnp3Jqg4u+07jvxqpIP7VFjQtaOW1oqF++xssmTDRgkdoQSJ0CI8Jf EEQJiTp8YsPEjjYXbI5TRFMvO979RFKFBxPPVRdm+K9YAMV3LebDH/YszY9RUvZBUm+tADA8IDr 3B9q6HCYM2F9NT/Lxo23PTcgUx2Owa1E3lAjMUm5bamfV1P6HKReSKcHzZwJFMS3qKyKqz6Q6hl xPIUOFpSTaQIlew== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegiedvkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeetnhhtohhnihhnucfiohgurghrugcuoegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepheeigeeuhfefgeehfffgueeiteehieelfeehjeektefgkeeuheeuleduvdelgffhnecukfhppedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehledphhgvlhhopegluddvjedrtddruddrudgnpdhmrghilhhfrhhomheprghnthhonhhinhdrghhouggrrhgusegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopeegpdhrtghpthhtohepughotghssehlihhsthhsrdihohgtthhophhrohhjvggtthdrohhrghdprhgtphhtthhopehthhhomhgrshdrphgvthgriiiiohhnihessghoohhtlhhinhdrtghomhdprhgtphhtthhopehquhgvnhhtihhnrdhstghhuhhliiestghhv ghrrhihrdguvgdprhgtphhtthhopegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomh X-GND-Sasl: antonin.godard@bootlin.com List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 13 Feb 2025 08:23:29 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/6361 Rename this section to explicitely name the multiple configuration feature "multiconfig". Reviewed-by: Quentin Schulz Signed-off-by: Antonin Godard --- documentation/dev-manual/multiconfig.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/dev-manual/multiconfig.rst b/documentation/dev-manual/multiconfig.rst index 8464f80c3..d8f6470d5 100644 --- a/documentation/dev-manual/multiconfig.rst +++ b/documentation/dev-manual/multiconfig.rst @@ -1,7 +1,7 @@ .. SPDX-License-Identifier: CC-BY-SA-2.0-UK -Building Images for Multiple Targets Using Multiple Configurations -****************************************************************** +Building Images for Multiple Targets With Multiconfig +***************************************************** You can use a single ``bitbake`` command to build multiple images or packages for different targets where each image or package requires a From patchwork Thu Feb 13 08:23:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 57245 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB679C021A7 for ; Thu, 13 Feb 2025 08:23:29 +0000 (UTC) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by mx.groups.io with SMTP id smtpd.web11.6575.1739435004374850577 for ; Thu, 13 Feb 2025 00:23:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Xr7HT4Pz; spf=pass (domain: bootlin.com, ip: 217.70.183.195, mailfrom: antonin.godard@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id C9BEF204AC; Thu, 13 Feb 2025 08:23:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1739435003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q9oVYO3x8JSpUbW9sBYbXMJ39lhMYB9Gna452ZI+POM=; b=Xr7HT4PzrpSQrDE1wnxIS19Fk/cPGoJYgjBNZUYIrrhn5fwCjULJ07op3CSZL+P9JKeOxv BYUbMySyxTGhlutMqgWgm4/yfHqraSAa4qCZP4kQskxPMceJCtbYocmrPDSdsikHII77AC FXle/7VP7FX8Whygst2X5vj0CDaGkpiFEX0a8hUGZK8bIsY3ipfG8bymLJQdNOENckmeA2 +CNAFldEJ7sIoJr9fCDw6iHqiPaRkhu8drAtZI3G1tQLqgvSh7crHRgI5J8Yra0Dm2VDQZ qAkN86nNWQwSpb8xiQi/BV9WzB3K0GYclqrVietvgSknjG8IKhgpKfcYcYCSbg== From: Antonin Godard Date: Thu, 13 Feb 2025 09:23:19 +0100 Subject: [PATCH v2 5/6] dev-manual/multiconfig: improve the current doc MIME-Version: 1.0 Message-Id: <20250213-multiconfig-doc-v2-5-f2bd35115cb7@bootlin.com> References: <20250213-multiconfig-doc-v2-0-f2bd35115cb7@bootlin.com> In-Reply-To: <20250213-multiconfig-doc-v2-0-f2bd35115cb7@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Antonin Godard , Mark Hatle X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=6010; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=jaX/3+DrCBkBwS3J8CH43LMbd6dz0iuICvO0lfqwy2k=; b=owEBbQKS/ZANAwAIAdGAQUApo6g2AcsmYgBnrav44zt9Mx0/OmPUNM25aDQxC9alE62r/uUmQ CZ8wnfyUFyJAjMEAAEIAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCZ62r+AAKCRDRgEFAKaOo NuG7EAC3Q/q8WHMWaKQkkefsjUOIaj7pGHcvwHY5aZEFeMHqyC78Ht7mQ+5Rni5Fv2RM9Fgqdq9 sDZSvoeCTfp2jDo9p/3smOXaV/qCEg5Z3Xi0qc+iwRMl3Q0FkAp4XNN3oP0pOWqB1xVFrfCFDP3 Ahty9Z40gAlHgmuVSUr1GtpDy3kGaZRYFyf5U/h8L1jhBza64ve0iUBkq3D3DBthPBwCHdCaIRY 7LBCm9HVOikdK9K9AoB59QOzP1lbWaOuXI5BjW5OdLNzaAHx5rQGr0N4tvIIjEusPgJRwLVIGWC dTLxGiMdBPyAPJOSOunlD1ARmC1zYCjCxdTv9NWwoR+Zml2AAaNwGsAenUp33yHp4wTdA0PbPa6 GPSxlRH7As4uOthH4Ss8z2htfS/vr+oV9lBGg9RAqiNskc96JlC4ehZXP/5+o9D5y0xpXnB6RbB 9qpm69jKxGHTKJUKrDuMMR9HnI65plH33aN38OWwzbY8NdDDWV9b5rRvWwc+6PIL28cAc5tmvwC Eiqw0bJUUbxXj8DvmvuSvyMFdK9sa/ZOM3gbOCjKBoZdm51RQMnHakPLxzKhsdnkrVoPJfGrgH8 ZQfdwoqVMXSfogrqbBV4gxWpeWCbT4/4ObgwFC8/w6ZPUbGOMT5/hJAH8rRGsaPcVInX7BszDQS cKYumglILbutLaQ== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegiedvkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeetnhhtohhnihhnucfiohgurghrugcuoegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepkeeuhfeihffgtdehjedvleelvdfhgeefhfdtteeuhfffhfdvieduuedvvdetteegnecuffhomhgrihhnpeihohgtthhophhrohhjvggtthdrohhrghenucfkphepvdgrtddumegtsgdugeemheehieemjegrtddtmeejtgehtgemiegruggvmeejleegkeemgedtheelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdgrtddumegtsgdugeemheehieemjegrtddtmeejtgehtgemiegruggvmeejleegkeemgedtheelpdhhvghloheplgduvdejrddtrddurddungdpmhgrihhlfhhrohhmpegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomhdpnhgspghrtghpthhtohepgedprhgtphhtthhopeguohgtsheslhhishhtshdrhihotghtohhprhhojhgvtghtrdhorhhgpdhrtghpthhtohepthhhohhmrghsrdhpvghtrgiiiihonhhisegsohhothhlihhnrdgtohhmp dhrtghpthhtohepmhgrrhhkrdhhrghtlhgvsehkvghrnhgvlhdrtghrrghshhhinhhgrdhorhhgpdhrtghpthhtoheprghnthhonhhinhdrghhouggrrhgusegsohhothhlihhnrdgtohhm X-GND-Sasl: antonin.godard@bootlin.com List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 13 Feb 2025 08:23:29 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/6362 After the suggestions from Mark Hatle on the list (https://lists.yoctoproject.org/g/docs/topic/110487932), rewrite the introduction to multiconfig with the following changes: - Move the part of overriding TMPDIR or not to a note. - Use BB_CURRENT_MC in the example. - Various additions of references & improved formatting. Suggested-by: Mark Hatle Signed-off-by: Antonin Godard Reviewed-by: Quentin Schulz --- documentation/dev-manual/multiconfig.rst | 65 +++++++++++++++++++------------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/documentation/dev-manual/multiconfig.rst b/documentation/dev-manual/multiconfig.rst index d8f6470d5..49e32b04a 100644 --- a/documentation/dev-manual/multiconfig.rst +++ b/documentation/dev-manual/multiconfig.rst @@ -17,7 +17,7 @@ Setting Up and Running a Multiple Configuration Build ===================================================== To accomplish a multiple configuration build, you must define each -target's configuration separately using a parallel configuration file in +target's configuration separately using a parallel :term:`configuration file` in the :term:`Build Directory` or configuration directory within a layer, and you must follow a required file hierarchy. Additionally, you must enable the multiple configuration builds in your ``local.conf`` file. @@ -25,31 +25,27 @@ multiple configuration builds in your ``local.conf`` file. Follow these steps to set up and execute multiple configuration builds: - *Create Separate Configuration Files*: You need to create a single - configuration file for each build target (each multiconfig). + :term:`Configuration File` for each build target (each multiconfig). The configuration definitions are implementation dependent but often - each configuration file will define the machine and the - temporary directory BitBake uses for the build. Whether the same - temporary directory (:term:`TMPDIR`) can be shared will depend on what is - similar and what is different between the configurations. Multiple MACHINE - targets can share the same (:term:`TMPDIR`) as long as the rest of the - configuration is the same, multiple :term:`DISTRO` settings would need separate - (:term:`TMPDIR`) directories. - - For example, consider a scenario with two different multiconfigs for the same - :term:`MACHINE`: "qemux86" built - for two distributions such as "poky" and "poky-lsb". In this case, - you would need to use the different :term:`TMPDIR`. + each configuration file will define the :term:`MACHINE` and the + temporary directory (:term:`TMPDIR`) BitBake uses for the build. - Here is an example showing the minimal statements needed in a - configuration file for a "qemux86" target whose temporary build - directory is ``tmpmultix86``:: + .. note:: - MACHINE = "qemux86" - TMPDIR = "${TOPDIR}/tmpmultix86" + Whether the same temporary directory (:term:`TMPDIR`) can be shared will + depend on what is similar and what is different between the + configurations. Multiple :term:`MACHINE` targets can share the same + :term:`TMPDIR` as long as the rest of the configuration is the same, + multiple :term:`DISTRO` settings would need separate :term:`TMPDIR` + directories. + + For example, consider a scenario with two different multiconfigs for the same + :term:`MACHINE`: "qemux86" built for two distributions such as "poky" and + "poky-lsb". In this case, you would need to use two different :term:`TMPDIR`. The location for these multiconfig configuration files is specific. They must reside in the current :term:`Build Directory` in a sub-directory of - ``conf`` named ``multiconfig`` or within a layer's ``conf`` directory + ``conf`` named ``multiconfig`` or within a :term:`Layer`'s ``conf`` directory under a directory named ``multiconfig``. Here is an example that defines two configuration files for the "x86" and "arm" multiconfigs: @@ -58,7 +54,19 @@ Follow these steps to set up and execute multiple configuration builds: :width: 50% The usual :term:`BBPATH` search path is used to locate multiconfig files in - a similar way to other conf files. + a similar way to other configuration files. + + Here is an example showing the minimal statements needed in a + :term:`configuration file` named ``qemux86.conf`` for a ``qemux86`` target + whose temporary build directory is ``tmp-qemux86``:: + + MACHINE = "qemux86" + TMPDIR .= "-${BB_CURRENT_MC}" + + BitBake will expand the :term:`BB_CURRENT_MC` variable to the value of the + current multiconfig in use. We append this value to :term:`TMPDIR` so that + any change on the definition of :term:`TMPDIR` will automatically affect the + value of :term:`TMPDIR` for each multiconfig. - *Add the BitBake Multi-configuration Variable to the Local Configuration File*: Use the @@ -88,11 +96,16 @@ Follow these steps to set up and execute multiple configuration builds: $ bitbake mc:x86:core-image-minimal mc:arm:core-image-sato mc::core-image-base - The previous BitBake command builds a ``core-image-minimal`` image - that is configured through the ``x86.conf`` configuration file, a - ``core-image-sato`` image that is configured through the ``arm.conf`` - configuration file and a ``core-image-base`` that is configured - through your ``local.conf`` configuration file. + The previous BitBake command builds several components: + + - A ``core-image-minimal`` image that is configured through the ``x86.conf`` + configuration file + + - A ``core-image-sato`` image that is configured through the ``arm.conf`` + configuration file + + - A ``core-image-base`` that is configured through your ``local.conf`` + configuration file .. note:: From patchwork Thu Feb 13 08:23:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 57242 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C11D1C021A5 for ; Thu, 13 Feb 2025 08:23:29 +0000 (UTC) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by mx.groups.io with SMTP id smtpd.web10.6630.1739435004616616327 for ; Thu, 13 Feb 2025 00:23:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=TAZzolwa; spf=pass (domain: bootlin.com, ip: 217.70.183.195, mailfrom: antonin.godard@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1B5A4204AE; Thu, 13 Feb 2025 08:23:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1739435003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OQwYFbA8DoCGnrMfPE9Wsx6jAg4X+nAFa9s2MsuvEAw=; b=TAZzolwajHHHTCA+sl3IehD4G1QaneJzJJQD/1TyDmDu6ZFzAscnbs6xUQPZN1CwadfxAR J1wid5fZle79MPkyO98xtZbAU6U68jj2nysN++hUYREmcwsd7+y95CsiQfaZt/8G745pvI 5rUTFxioaYWuhYRC1kPDxz7/T1Dw2VIpyShflDQDoQvjiKIPsWW4rYoPrtt25zS8ll3Rcw bN09mIkqDsM+E9icbbEyIi7wRdsMrIg04fp64ghwrID6YYxGcGSOVz1UhbegfFhpnicJRl sReXFSO2tA8FpmQK5w2pDdMHX0Q/OtPOM8xOswzQuyZjNrWtE2ypEu2iP3Sl/w== From: Antonin Godard Date: Thu, 13 Feb 2025 09:23:20 +0100 Subject: [PATCH v2 6/6] dev-manual/multiconfig: add suggested best practices and baremetal sections MIME-Version: 1.0 Message-Id: <20250213-multiconfig-doc-v2-6-f2bd35115cb7@bootlin.com> References: <20250213-multiconfig-doc-v2-0-f2bd35115cb7@bootlin.com> In-Reply-To: <20250213-multiconfig-doc-v2-0-f2bd35115cb7@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Antonin Godard , Mark Hatle X-Mailer: b4 0.15-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=7622; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=CqmhClU+/fhikUvQzwkPlsav8L8G4oY+QvwIZfR/iUA=; b=owEBbQKS/ZANAwAIAdGAQUApo6g2AcsmYgBnrav54fG5e5esNZEIHcapzHLNj5Rkzt6KLE5S4 8ehad9JmVKJAjMEAAEIAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCZ62r+QAKCRDRgEFAKaOo NmDoD/sGRx6jtdvv2V46nBTFUmBbsdvgQBDSp9wYO20Nse9BdHyk3M0vIN9C5H6AvY7bEaaeQlY AJ1BJ+1G5am9MrLdkKJ3wq2ikySCx+G9mNWLiV2REO9WQd05GBwcWtnUnVOc0BIgKGDOgC0bOIo ejQlyrVhAQx9GHWJo86FjX+7w9qaSlHqU7eN3mM+X83OkSTyJ/GENNe1TH7yM6X6VEoy3JU77hG 6SSWa+KPFTmHj3HWafd6OdCMSmd8HZfGt+tTgCaCdM+8mafbGCJ/kS6bHXLZccu9hnjEtaBakiD PynUn5kQCeNhdtXO74UUIR9HL89/yuilVOCaV2F96JVEQiqIOkLROimJ8/baAWC0A5tvPeBAuAJ ixookfFDFWfxNITS5+lzC+4S7a0ZP74E2qNEPUpgvaGVLg01jILiG7IwD+zZxTQJwKHC2cEUkxS NdVz+a/FGsL5HVEjSzIHWbUKPxWlep3S8jyT1s/DYFFAayOmlnGrK6L7pFSLZSkLli0vFrGYXVg 877SeEKPUZVfbWXHwyfW5eK8kUP4frreKrWL3r12uymT4BI5lvs16zjRALk+7sT6EZxRFQcbXXD e/ZfVed6mcfVSkGSP6j6/60DCB9775GNMecVXsKDrymmYTFEqCz8GMWHtKMXBGpkd12n6DEVFpm WCPQe0piLdJ9PuQ== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegiedvkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeetnhhtohhnihhnucfiohgurghrugcuoegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepuefhleelueehveefjeehgeeviedtieeljeeiudffhfeuveejtedvteeigfejteevnecuffhomhgrihhnpeihohgtthhophhrohhjvggtthdrohhrghdpshhouhhrtggvfigrrhgvrdhorhhgnecukfhppedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehledphhgvlhhopegluddvjedrtddruddrudgnpdhmrghilhhfrhhomheprghnthhonhhinhdrghhouggrrhgusegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopeegpdhrtghpthhtohepughotghssehlihhsthhsrdihohgtthhophhrohhjvggtthdrohhrghdprhgtphhtthhopehthhhomhgrshdrphgvthgriiiio hhnihessghoohhtlhhinhdrtghomhdprhgtphhtthhopehmrghrkhdrhhgrthhlvgeskhgvrhhnvghlrdgtrhgrshhhihhnghdrohhrghdprhgtphhtthhopegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomh X-GND-Sasl: antonin.godard@bootlin.com List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 13 Feb 2025 08:23:29 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/6363 After the suggestions from Mark Hatle on the list (https://lists.yoctoproject.org/g/docs/topic/110487932), add two sections to the multiconfig doc: - Suggested best practices: suggestion for better design of multiconfig builds. - Common use case: baremetal build. This section applies the guidelines from the first sections and apply it to a real-life example of how to use multiconfig. This one to build some baremetal firmware alongside a regular Linux build. Suggested-by: Mark Hatle Signed-off-by: Antonin Godard --- documentation/dev-manual/multiconfig.rst | 136 +++++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) diff --git a/documentation/dev-manual/multiconfig.rst b/documentation/dev-manual/multiconfig.rst index 49e32b04a..cdf06d2ca 100644 --- a/documentation/dev-manual/multiconfig.rst +++ b/documentation/dev-manual/multiconfig.rst @@ -171,3 +171,139 @@ and have separate configuration files, BitBake places the artifacts for each build in the respective temporary build directories (i.e. :term:`TMPDIR`). +Suggested best practices +======================== + +- :term:`TMPDIR` (other than the default set in bitbake.conf) is only set in + ``local.conf`` by the user. This means that we should **not** manipulate + :term:`TMPDIR` in any way within the Machine or Distro :term:`configuration + file`. + +- A multiconfig should specify a :term:`TMPDIR`, and should specify it by + appending the multiconfig name via :term:`BB_CURRENT_MC`. + +- Recipes that are used to transfer the output from a multiconfig build to + another should use ``do_task[mcdepends]`` to trigger the build of the + component, and then transfer the item to the current configuration in + :ref:`ref-tasks-install` and :ref:`ref-tasks-deploy`, assuming the value of + the deployed item based on :term:`TMPDIR`. + + The :ref:`ref-tasks-install` and :ref:`ref-tasks-deploy` tasks should look + like this:: + + do_install() { + install -m 0644 ${TMPDIR}-/tmp/deploy/images//somefile ${D}/some/path + } + + do_deploy() { + install -m 0644 ${TMPDIR}-/tmp/deploy/images//somefile ${DEPLOYDIR}/somefile + } + + In the examples above: + + - ```` is the multiconfig name as set by the multiconfig + :term:`configuration file` (see the :ref:`dev-manual/multiconfig:Setting + Up and Running a Multiple Configuration Build` section above). + + - ```` must be the :term:`MACHINE` for which ``somefile`` was built + and deployed. This value depends on whether the multiconfig + :term:`configuration file` is overriding the :term:`MACHINE` value or not. + +- Firmware recipes can set the :term:`INHIBIT_DEFAULT_DEPS` variable to ``1`` + if they don't rely on default dependencies such as the standard C library. + +Common use case: building baremetal firmware alongside a Linux build +==================================================================== + +A common use for multiconfig is to use the default configuration as the regular +Linux build, while one or more multiconfigs can be used to build special +components, such as baremetal firmware. It would also apply to a scenario where +a microcontroller, for example, is companion to a main processor where Linux is +running. This section details how one can achieve these kinds of scenarios with +a multiconfig build. + +Adding a multiconfig configuration file and recipe for a baremetal firmware +--------------------------------------------------------------------------- + +As described in :ref:`dev-manual/multiconfig:Setting Up and Running a Multiple +Configuration Build`, each multiconfig will require a separate +:term:`Configuration File`. In our case, we will make a separate temporary +directory for our baremetal firmware build configuration. + +For example, we will define a new ``conf/multiconfig/baremetal-firmware.conf`` +as follows:: + + TMPDIR .= "-${BB_CURRENT_MC}" + TCLIBC = "newlib" + +The ``baremetal-firmware.conf`` configure a separate :term:`TMPDIR` for holding +binaries compiled with the `newlib `__ toolchain +(see :term:`TCLIBC`). + +.. note:: + + Here, the default :term:`MACHINE` is not overriden by the multiconfig + configuration file. As a consequence, the architecture of the built baremetal + binaries will be the same. In other cases, where the firmware runs on a + completely different architecture, the :term:`MACHINE` may be overriden. + +We then create a recipe ``my-firmware.bb`` that defines how the baremetal +firmware is built. The recipe should contain enough information for the +:term:`OpenEmbedded build system` to properly compile the firmware with our +toolchain. The building tasks may vary depending on the nature of the firmware. +However, the recipe should define a :ref:`ref-classes-deploy` task that deploys +the output into the :term:`DEPLOYDIR` directory. We will consider in the +following that the file is named ``my-firmware.elf``. + +Building the firmware +--------------------- + +The firmware can be built with BitBake with the following command:: + + $ bitbake mc:baremetal-firmware:my-firmware + +However, we would prefer for ``my-firmware`` to be automatically built when +triggering a normal Linux build. + +Using an ``mcdepend``, a recipe belonging to the Linux build can trigger the +build of ``my-firmware``. For example, let's consider that our Linux build needs +to assemble a "special" firmware that uses the output of our ``my-firmware`` +recipe - let's call it ``my-parent-firmware.bb``. Then, we should specify this +dependency in ``my-parent-firmware.bb`` with:: + + do_compile[mcdepends] = "mc::baremetal-firmware:my-firmware:do_deploy" + +The above will ensure that when the :ref:`ref-tasks-compile` task of +``my-parent-firmware`` is triggered, the :ref:`ref-tasks-deploy` task of +``my-firmware`` will already have run successfully. + +Using the output of ``my-firmware`` +----------------------------------- + +After we have deployed ``my-firmware`` by using ``mcdepends``, we need to use +the output in some way. We can make a series of assumptions, based on the +default Yocto Project variables in order to get the binary for packaging. + +First, we can set the following in ``my-parent-firmware.bb``:: + + FIRMWARE_FILE ??= "${TMPDIR}-baremetal-firmware/deploy/images//my-firmware.elf" + FIRMWARE_FILE[vardepsexclude] += "TMPDIR" + +The first assignment stores the value of the path to the firmware built and +deployed by the ``my-firmware.bb`` recipe. The second assignment excludes the +:term:`TMPDIR` variable from being part of ``FIRMWARE_FILE``'s dependencies - +meaning that changing the value of :term:`TMPDIR` (for example, changing the +host on which the firmware is built) will not invalidate the :ref:`shared state +cache `. + +Additionally, ```` should be replaced by the :term:`MACHINE` for which +we are building in the baremetal-firmware context. + +We can then add a :ref:`ref-tasks-install` task to ``my-parent-firmware``:: + + do_install() { + install -Dm 0644 ${FIRMWARE_FILE} ${D}/lib/firmware/my-firmware.elf + } + +Doing the above will allow the firmware binary to be transferred and packaged +into the Linux context and rootfs.