From patchwork Mon Feb 17 14:50: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: 57470 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 7C3AAC021AD for ; Mon, 17 Feb 2025 14:50:40 +0000 (UTC) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by mx.groups.io with SMTP id smtpd.web11.53105.1739803835855282323 for ; Mon, 17 Feb 2025 06:50:36 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=UlH1A7Ul; spf=pass (domain: bootlin.com, ip: 217.70.183.197, mailfrom: antonin.godard@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3264E432E9; Mon, 17 Feb 2025 14:50:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1739803834; 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=z+HH1v+XW6XcXdZmmZeV3zAIVn9Qxz0xAQPu95GCcX0=; b=UlH1A7Ulw/MsOWcP+iNhxThKdBMX4qWwwYhDZ5Y3rmwpGR+mwai9EYNEIbpBJrckTts1Sz NGaLv3b9eW4BhA5AVm0R1ddb6QupGtr2sLCsFKw5W5tWSdVgsd1juXLBfIRul9aoreohHG Pr68fAbpsyIdNxshHEiLaP4fz0zLec7yi1tsv4lXHYHZVCxIMneXGFCSfMd3RxSQTMQ1vk hnaDp5ddoK1jTBsr87PWI76wlFDFm00MSRXgCd7uZ+oSadhN44DdbceTLtQR7uIt3BNrov ++/VA/MM3Yz4vnaCH0k/XawSGfY59cyAVT3HnFl4UHl6qNjbinlVokYRi2xWnQ== From: Antonin Godard Date: Mon, 17 Feb 2025 15:50:20 +0100 Subject: [PATCH v3 1/6] dev-manual: move multiconfig documentation to its own document MIME-Version: 1.0 Message-Id: <20250217-multiconfig-doc-v3-1-027a9fb282c3@bootlin.com> References: <20250217-multiconfig-doc-v3-0-027a9fb282c3@bootlin.com> In-Reply-To: <20250217-multiconfig-doc-v3-0-027a9fb282c3@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Quentin Schulz X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=16603; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=pAAif/eg+h+XFLGJGi4gjyADjWaU5B49L2SjoYND8fk=; b=owEBbQKS/ZANAwAIAdGAQUApo6g2AcsmYgBns0y51N1GbS2KM7EGQ9TQCYWEQAyEtgqDtj6+t +qGMjhvJ5CJAjMEAAEIAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCZ7NMuQAKCRDRgEFAKaOo NhnKEACjmq2pOV5wzfuvRSVq77BH9BPzEIXhBBGqb1UBkjq93eFMxY9ruZMPtGaRbswyu/qufTx C2cOlbWkCduWQbnx2tq2ogc2CU4S5/EOl7Y65WFObNU6YkoauLTSNC+9FRLdA/Mkldu5qqnBr7B gDLdDJXzUTb+GV+CDuT+bQIQsJ5q+S/SmSU6oORdQHiKdPa6+TGmZG2Cdmo/YYr0fDJKInskBuc 2H2EacmUF/SBxyQ9Spd8D3pOAa2A7lDpmTEq7neYtCZmAdjz0qo5MvviZIZSy10KyEASurxr1sZ i7Ihad0/E+7PXGEzg6omH5ummoIREE5byPJ6F6ZHze5SzlsKYWzWGalyo9xRCSGVkIey0JgTJTQ R0YNjB5hiL9cS3uTz0LvhqasrFtTDt/0xJqfp87QYVhvznh8RgEtgVN8LY7ID7PpfVXUhYlE1n6 M2/sD7ppY6hbpmExbUFcBTsSAUS/9Lmo53hLyN9i3bnMyMz30MS4uhQH9XBR5tSULq/XzQt6+wZ KmbK1EBZQ0rELWCt8CJNz9Te/eL9klkl+FqXv4Us2N87jkMctjEliKvB8mQrWruWk3fQU5OrXfJ Sz3LPuPqpyrkx/nDRX2Linjjr/gsjJPq2dpe48VFZoGKPgwDM3zdqR0Y+NPPmqgE17YB/3ESVDr TbunLh+XFigqcEg== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdehkeeikecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeetnhhtohhnihhnucfiohgurghrugcuoegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepheeigeeuhfefgeehfffgueeiteehieelfeehjeektefgkeeuheeuleduvdelgffhnecukfhppedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehledphhgvlhhopegluddvjedrtddruddrudgnpdhmrghilhhfrhhomheprghnthhonhhinhdrghhouggrrhgusegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopeefpdhrtghpthhtohepqhhuvghnthhinhdrshgthhhulhiisegthhgvrhhrhidruggvpdhrtghpthhtohepughotghssehlihhsthhsrdihohgtthhophhrohhjvggtthdrohhrghdprhgtphhtthhopehthhhomhgrshdrphgvthgriiiiohhnihessghoohhtl hhinhdrtghomh 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 ; Mon, 17 Feb 2025 14:50:40 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/6396 In preparation of more section and examples to multiconfig, move the section about it in building.rst into its own document. Reviewed-by: Quentin Schulz Signed-off-by: Antonin Godard --- 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 4770a5a184fa63edfeaf60bb3b1aabd8eddc1ee7..807c665f68dce61440cb8116b82714df71c41193 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 760108f60510d3fe3e9dcdbdc43f8e1bfd5327d2..63736e0abf20398d9cf24ae86d92dedeafabb48e 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 0000000000000000000000000000000000000000..8464f80c3cb8191fbcf23928828a2d6a369e12a8 --- /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 Mon Feb 17 14:50:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 57471 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 97C25C021AF for ; Mon, 17 Feb 2025 14:50:40 +0000 (UTC) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by mx.groups.io with SMTP id smtpd.web10.53280.1739803835849569310 for ; Mon, 17 Feb 2025 06:50:36 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=oYH3iDtp; spf=pass (domain: bootlin.com, ip: 217.70.183.197, mailfrom: antonin.godard@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 6EECC4430C; Mon, 17 Feb 2025 14:50:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1739803834; 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=j3YNaWto5bLhsMcltGhBD7qLzSz+BUYJzE7BHm4d1Iw=; b=oYH3iDtp2/b8SYgcmZ9rS3XtgARKs3no/1/sirlvYo3UUlVgK5KxzOv2aI32stCbUZ+hcc A9+RQ8GPxbgIGpq/FwjsIHbvw4MMBvACPM3VAmvWP9BV1B5YrMkWXjDGIi4yVhqu0tdUbu TgfRwhivdXs69xYw3A5nb4XHUKVt8URjR1CxshjKEi8b1dwQRxWxzMDLCoJIRX2NdXrMNb 7Aa+17lbQv9wA5cZmONCyIeqk3X09w1EGM4GLfoKJUKrth+//GrU0Zey5ucu4mChLTp2Vi 13tnCqTMEsRXUToBiEiy6uHrsn9cyqgOHpUGpPfoU6188OzDH/rHFFa4o8TLzg== From: Antonin Godard Date: Mon, 17 Feb 2025 15:50:21 +0100 Subject: [PATCH v3 2/6] variables.rst: add a reference to BB_CURRENT_MC from bbdocs MIME-Version: 1.0 Message-Id: <20250217-multiconfig-doc-v3-2-027a9fb282c3@bootlin.com> References: <20250217-multiconfig-doc-v3-0-027a9fb282c3@bootlin.com> In-Reply-To: <20250217-multiconfig-doc-v3-0-027a9fb282c3@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Quentin Schulz X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=965; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=FeqIn7kOwyf0DifXAfDMj6mUTLA65y4dbK6NE7+GkeE=; b=owEBbQKS/ZANAwAIAdGAQUApo6g2AcsmYgBns0y5Dd7MH5zq337jtnqjxxzn74tz7gd48Rvm3 ++0UIhgwP2JAjMEAAEIAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCZ7NMuQAKCRDRgEFAKaOo NlX4D/9cyEnT9YKkvCKS2VTLH8jDfR3g7xFIPKemOAAtVleHV7Mz4VbNu00nMGB4svGJXoM/YcI 2y14ov/x4XURkru4XcKf+I7gODvdfR+uaq+bF1eXilkkPGu8KkjsywcGWhxsE4ikzGPwCkilKwh tKAPpau6Q+mgkBk26zm6QmcB9HoAJ5VdzjCw05cAJRrb/8HmTySbs34WpjjNAyl/KTDrHuKYEkZ 2eU3Lg3KxUCMpb+HFS0F5NoNX+4dPsc5fUjVkhd33D3r6aYJzVpnZ0huVA6+09rr/saQwdXOds2 peQqUi++1yppOnITHJyo1CFhtd/bcB4peMZhIVKdXWG2HiqzqNDHVPv0hmkMX02zDURLNP/4ckH qarCYsyNeKGAijKURmew64B5kcPAYdWFnpVMM61cznU0Wzz44KT87aBVBRV1il6gN9EJROyWfv8 0mKkl+0hnoVXci/sgTCJtGAp10xGEyMAbYhi2nhe3FM4Zz/HE8abHvszW8n7yKNrnVZsb13vRzk u23BOWpuRUtjIfQu1fi1LaWiy5hKYt5BVGCfF5gQN3WY1XnSY2xgZ4ozNjyPn/61k870A1ZKJ8U deVl8ug17pUVQ9xhRUq4HbuakUiEhQmAncxYdjn94MK+U3XK3GCCTWdyCp5wupX57KdfXksIw/M eC5myRzDOmyAriw== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdehkeeikecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeetnhhtohhnihhnucfiohgurghrugcuoegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepheeigeeuhfefgeehfffgueeiteehieelfeehjeektefgkeeuheeuleduvdelgffhnecukfhppedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehledphhgvlhhopegluddvjedrtddruddrudgnpdhmrghilhhfrhhomheprghnthhonhhinhdrghhouggrrhgusegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopeefpdhrtghpthhtohepqhhuvghnthhinhdrshgthhhulhiisegthhgvrhhrhidruggvpdhrtghpthhtohepughotghssehlihhsthhsrdihohgtthhophhrohhjvggtthdrohhrghdprhgtphhtthhopehthhhomhgrshdrphgvthgriiiiohhnihessghoohhtl hhinhdrtghomh 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 ; Mon, 17 Feb 2025 14:50:40 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/6395 BB_CURRENT_MC is documented in the Bitbake user manual. Add a reference to it here. Reviewed-by: Quentin Schulz Signed-off-by: Antonin Godard --- 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 adbef69d8f39d33be87c5db6688a807156540410..a402815b678c2d4eb77d4e81411d2088257eb1ce 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 Mon Feb 17 14:50:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 57469 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 8D2DDC021AE for ; Mon, 17 Feb 2025 14:50:40 +0000 (UTC) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by mx.groups.io with SMTP id smtpd.web10.53281.1739803836075425259 for ; Mon, 17 Feb 2025 06:50:36 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=nBNa62FC; spf=pass (domain: bootlin.com, ip: 217.70.183.197, mailfrom: antonin.godard@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id A283944310; Mon, 17 Feb 2025 14:50:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1739803834; 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=dHFuO01BdIY6SlWTUeIicxo4lkg0RFO/jg9lpgRFMW0=; b=nBNa62FCU5bFMzdgORK/YOUeaUSihvgjSu0i7y/AZDUUxoSZdPk5lTfQ56wUmDrNtWtnCu pHDB1WQHAOKEDHEY1PuHVnWM1jX+bg4CTQ0p2Pkj+K9hnTdwsQqoX9ppnsprb+gh3AYtwh wcUT+YYgxYyg9PqBG9hcuqZ2tltkE82gIHIHPmc54AORV5UFTvi5ywknwH2JQ24m1g2zBe fRqvwMxaR5WkatMAq5lV9FHctWmeHEqcALrWWE4C0kWNfMGBfJgxPAg08MpAnzKHQeAkzO Z7aXS1YS81SsB2YAmkd58SzWho7I+WPKCidxV3s/rlaL/0Q8ukoTxFyt9tGUZA== From: Antonin Godard Date: Mon, 17 Feb 2025 15:50:22 +0100 Subject: [PATCH v3 3/6] migration-5.2: fix references to BB_CURRENT_MC MIME-Version: 1.0 Message-Id: <20250217-multiconfig-doc-v3-3-027a9fb282c3@bootlin.com> References: <20250217-multiconfig-doc-v3-0-027a9fb282c3@bootlin.com> In-Reply-To: <20250217-multiconfig-doc-v3-0-027a9fb282c3@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Quentin Schulz X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1288; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=ctfhHovwmVTy1vyqPgSQBMjVEIGw5D2LWPD8dlYRTRQ=; b=owEBbQKS/ZANAwAIAdGAQUApo6g2AcsmYgBns0y5QRFHhXAqXPVdyE0JIE6yQUXFpz0BjWX5m erMctwe8faJAjMEAAEIAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCZ7NMuQAKCRDRgEFAKaOo Ng1fD/4rYCX7Y9LTAxPr165LUzkfTXRiRi5Q/33OQTz/INwHXOUmZw7nx2R376rsh261mhW5CDQ KMW4wMKYQshdMHKXXB5w0qUZxVNNnzxY07/8h3GL99ng6hR6sIK/lSM9j0OQfOoez6HXv9xaRyk uA5q1/6ubVecNfwnhIzAfV+JXhmUerCfMxlhAxtABaozqoQApr4w/W5TNfF44ODqpio5mgqHxf4 7Qwl3jTek+ZNXyK600xJC+tpp0/FJvFOaiwDfa3g9CyyjeglFWDyH6vl+0FlDlo3XVK1KSUynUY hJCfOhYw0WTgsaHF6myQ3Ethm4SAxjr9R+0kl+7mhvW0DWpHC1unR5UPupdz3fLpVzbi1q/DznC ptIOQMq6zyy3PsRCKeNwBNOjKRVbxtJXhTMLzjs4tYX5PRNHzqLRK7J2VGOSVC1Qx2kjolqenX8 7TLV5jXwf5MMVLP9V/CGcWjDSHybhc5CaPTeBsztyVQfwYdV34SrDG0t90x4i7I7r63BRqH2++6 nCx+gNNxFCpfm0e6q9OhYJR00fORuBMvteFmyKHYCARTdNpeEqExVbD3rOU26GPis2b5werGLXg eYczUkpKjxI4i6j/ANzgx6sT/cOM3IOKbCqNqBKxiF7YLWxRjOxN/fJZt5MvycFcdWXt4qBoVip BuaV3C2NrGFhpEw== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdehkeeikecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeetnhhtohhnihhnucfiohgurghrugcuoegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepheeigeeuhfefgeehfffgueeiteehieelfeehjeektefgkeeuheeuleduvdelgffhnecukfhppedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehledphhgvlhhopegluddvjedrtddruddrudgnpdhmrghilhhfrhhomheprghnthhonhhinhdrghhouggrrhgusegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopeefpdhrtghpthhtohepqhhuvghnthhinhdrshgthhhulhiisegthhgvrhhrhidruggvpdhrtghpthhtohepughotghssehlihhsthhsrdihohgtthhophhrohhjvggtthdrohhrghdprhgtphhtthhopehthhhomhgrshdrphgvthgriiiiohhnihessghoohhtl hhinhdrtghomh 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 ; Mon, 17 Feb 2025 14:50:40 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/6397 Now part of the documentation. Reviewed-by: Quentin Schulz Signed-off-by: Antonin Godard --- 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 de2ea773e55c972c2314d932a8c572e484c61eb9..75bc4dbc6f8bb51f2f3f6e17abcc6ac4d930ef95 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 Mon Feb 17 14:50:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 57467 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 970E5C021B0 for ; Mon, 17 Feb 2025 14:50:40 +0000 (UTC) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by mx.groups.io with SMTP id smtpd.web10.53282.1739803836343952539 for ; Mon, 17 Feb 2025 06:50:36 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=crSzFnkY; spf=pass (domain: bootlin.com, ip: 217.70.183.197, mailfrom: antonin.godard@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id D6AE94430F; Mon, 17 Feb 2025 14:50:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1739803835; 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=RGajlzjPDMaTYsj/CLTd+SlY8SM7iFzlGzGsy4EJuQI=; b=crSzFnkYAQ+sEd2zxAKNwx+a4fEk+swn3/GUTy/iFs+09SM+ekZq6RI/5d7ngZvgoqXtG4 OpwDYgIrGhjlMaEdlbdm7b7yojFU1plX4ML26niDGUeqSv+47Sys24fflfMX8AJld+enJE fc4cIpksOv7HXcITNvrMnkFq4hkZbu2uqwvf42cAUtO6xJ55EbH/DAFAdSZgnwtK5ypS7d kRJIl2Itm/y9i2UHyQxCCNW1BvgapMqH1w1Gm88AmhNaks8SzVza4PDgHzzWtLJoM47IbQ 7XXnpKgqRD6LuXhBZ6jkpp54BRCWanK9n3m7DNNANcc/490zFaihrYAGlKOr/Q== From: Antonin Godard Date: Mon, 17 Feb 2025 15:50:23 +0100 Subject: [PATCH v3 4/6] dev-manual/multiconfig: rename to use Multiconfig term MIME-Version: 1.0 Message-Id: <20250217-multiconfig-doc-v3-4-027a9fb282c3@bootlin.com> References: <20250217-multiconfig-doc-v3-0-027a9fb282c3@bootlin.com> In-Reply-To: <20250217-multiconfig-doc-v3-0-027a9fb282c3@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Quentin Schulz X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1087; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=3tXuOnkNMJVDFjFLnzdqPAJTdqcRTcR8Io4W4Qy8Yis=; b=owEBbQKS/ZANAwAIAdGAQUApo6g2AcsmYgBns0y5nWSshNP3BYZWuNDg7UVvcps93AElnduLt n3aHKP6NEeJAjMEAAEIAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCZ7NMuQAKCRDRgEFAKaOo NqlWD/9n5G2RUIyk7eVhCkvEeLGQax2GbrttM/YxZeCoTfL5TZKz7F7sko4aitEacvZIJxh+eGh QWxcAEhjfTG0MkNhWYhcwQnkby9d0eGAKYwV6w19CbKByoJbTpLpG2lF98RYezXTJcvmBMxzJjq l0HRlYLhUGV4hw/z2QyWHvlseG+H0ngeEFhOwjg6++kHiiZMFT/ACgDK2kb6OfbW0TKqeF0EzB8 Hthgq3LMq0FnZvZIn5Zn/+Pv833dvDdrHKDHQ2kJsZLoQG4u75+t9nUEfEYxSsF4EItldz6qww0 8hwg8rXE7ql4YydmSZh1BTQ5yuPSbWhVzTU65uxNd3MRXen+1uMNKzW2LgulgTFfGNXJ9RJelDR qPv+TwKUT+QqdS5XHyaRj4TUA8XIDZvzvd/YKLiDWoy4jJNd+lMAaAxPVI+fhmZppu//0rSumXX wcnnbCwpjhdkKpCJLbcRCt1ipmBYYR5d38SJTkMI8mjL5cuKzcefs1FMoDG3ApmduLM/PyeriLQ ucKMzHZv/wvxuBpo1ROwj7tGrrBMvzxjdynI+bLa8NBIVQynYlruNHZTF3XlDN6le3T6f8q89wR N6ByzA21xzAcR0HBRFpS+alTLSriHkV1yTmCUpQ7bagYuJ9gamKpGxT7CMRpwDloTggRt7d3EgH R09489+KBZ6UfAw== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdehkeeikecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeetnhhtohhnihhnucfiohgurghrugcuoegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepheeigeeuhfefgeehfffgueeiteehieelfeehjeektefgkeeuheeuleduvdelgffhnecukfhppedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehledphhgvlhhopegluddvjedrtddruddrudgnpdhmrghilhhfrhhomheprghnthhonhhinhdrghhouggrrhgusegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopeefpdhrtghpthhtohepqhhuvghnthhinhdrshgthhhulhiisegthhgvrhhrhidruggvpdhrtghpthhtohepughotghssehlihhsthhsrdihohgtthhophhrohhjvggtthdrohhrghdprhgtphhtthhopehthhhomhgrshdrphgvthgriiiiohhnihessghoohhtl hhinhdrtghomh 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 ; Mon, 17 Feb 2025 14:50:40 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/6398 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 8464f80c3cb8191fbcf23928828a2d6a369e12a8..d8f6470d516be9b57084228f33bceb69a9341388 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 Mon Feb 17 14:50:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 57466 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 7AAC2C021AA for ; Mon, 17 Feb 2025 14:50:40 +0000 (UTC) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by mx.groups.io with SMTP id smtpd.web10.53283.1739803836564532927 for ; Mon, 17 Feb 2025 06:50:36 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=M5XgaMRp; spf=pass (domain: bootlin.com, ip: 217.70.183.197, mailfrom: antonin.godard@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 19DBB44311; Mon, 17 Feb 2025 14:50:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1739803835; 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=Y0MkJXghTSwK80lFEvo/Oocqrr0BPU9bxoa4ITG7YIM=; b=M5XgaMRpY6X/9YhJiUbWSIJpy7ys6+r7NnJkJhm+lJKjqo9p5vMeT8VNeenqb3pGvUElHe LXYpEsQIuMoSxcNQ1096AxNxnHZBsvmfRc/H4SBgBeTh7IVz9+XRhxl5cE3OSV21yaNYvH zlj3y6T6QrVpgAZMv03wMogQF9KzbBaviQ3dMEEySJLXKZkq5uWwR9QC0j7p544V5x6H4c 81G5LFtD9AHUKRxjkOwy3OI64GsJyeG+Yc4Jao8vAHBM6ee06n2cTOZaHgnyJ5SoOfgh+V aZ+tWVWOlb219IFPgIRIwiUUJO64OXCULaNb9h/xE4Ac+MgHwac12W8vAaD9aw== From: Antonin Godard Date: Mon, 17 Feb 2025 15:50:24 +0100 Subject: [PATCH v3 5/6] dev-manual/multiconfig: improve the current doc MIME-Version: 1.0 Message-Id: <20250217-multiconfig-doc-v3-5-027a9fb282c3@bootlin.com> References: <20250217-multiconfig-doc-v3-0-027a9fb282c3@bootlin.com> In-Reply-To: <20250217-multiconfig-doc-v3-0-027a9fb282c3@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Quentin Schulz X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=6254; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=2atPgGxk/WhFf06EIyeAyjOP0iL4pYb/3CfaKwqajjE=; b=owEBbQKS/ZANAwAIAdGAQUApo6g2AcsmYgBns0y5hFelM78i+NaDhKaESjNk9n/DoX/esdkgx MQa3PZIj1yJAjMEAAEIAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCZ7NMuQAKCRDRgEFAKaOo NgoTEACEVVRymDXYCbMRSHUXVe19O+CVBGm13TRixGlQQ8XnE/gEL+Wh1dczroV1RZKfggzPK8H hjE7X0PgIF75i/9acZX3ocX3VRzAGMFUGUCDSBhp5mAtayuVBHYDI927hsQGmcyWwzCyqKnL+cB fjLxbIJ4os1Frd7KSTi0TlYWTZrFi9sjGsh5Bh2xlXlVx9hwu8rtF6+wh/jcwnXiuXdWcK2At2q fGo/nQ41D4qkyrV6/QabS1PNLISDObGEE8+HiOrqGM9mFj7atIZBOcygm1LnOHoLiDU/gIqhYKN KQdZKCWOocmaZr+2Y4gcg0eDc4fynJVcrsDABd0q99WLQLrUA26eYayXHDheqi4Y4kPxTBXVM9F 5QLq44r3+xh6lg/4W7QSoEfOtydZuBRpJVzdESjbAQ0O1yNTrAmnxx65MG5yHGx8AIgrxmft45I VuYqRuuk+9ky2vc07FO/COAdjnQVIkjifhs1swm7RJOHcieHJVyhVIazX3fRYEzDuH+f1QUzQV3 GtIgyE21wFShj9HWoYnt1/4Tox+kExYbJByqINenyvRd+xWmF+rpRE2AhYEmRwSbvFhFF90UVDY y9nAzliKHF7N4V9gqYd7ov6dnwK0pakZMU5zIoMDkyxmrvU/m8IpEBnTz/KslbkK5Wwr0tmNp+u pD/s2IfmLZ1m9gQ== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdehkeeikecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeetnhhtohhnihhnucfiohgurghrugcuoegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepkeeuhfeihffgtdehjedvleelvdfhgeefhfdtteeuhfffhfdvieduuedvvdetteegnecuffhomhgrihhnpeihohgtthhophhrohhjvggtthdrohhrghenucfkphepvdgrtddumegtsgdugeemheehieemjegrtddtmeejtgehtgemiegruggvmeejleegkeemgedtheelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdgrtddumegtsgdugeemheehieemjegrtddtmeejtgehtgemiegruggvmeejleegkeemgedtheelpdhhvghloheplgduvdejrddtrddurddungdpmhgrihhlfhhrohhmpegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomhdpnhgspghrtghpthhtohepfedprhgtphhtthhopehquhgvnhhtihhnrdhstghhuhhliiestghhvghrrhihrdguvgdprhgtphhtthhopeguohgtsheslhhishhtshdrhihotghtohhprhhojhgvtghtrdhorhhgpdhrtghpt hhtohepthhhohhmrghsrdhpvghtrgiiiihonhhisegsohhothhlihhnrdgtohhm 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 ; Mon, 17 Feb 2025 14:50:40 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/6399 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 Reviewed-by: Quentin Schulz Signed-off-by: Antonin Godard --- documentation/dev-manual/multiconfig.rst | 68 ++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 26 deletions(-) diff --git a/documentation/dev-manual/multiconfig.rst b/documentation/dev-manual/multiconfig.rst index d8f6470d516be9b57084228f33bceb69a9341388..8371cf0e464bbd09f80a2ba0fbe700a911774fa9 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,30 @@ 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`. + + In the general case, using separate :term:`TMPDIR` for the different + multiconfigs is strongly recommended. 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 +57,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 +99,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 Mon Feb 17 14:50:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonin Godard X-Patchwork-Id: 57468 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 89996C021AB for ; Mon, 17 Feb 2025 14:50:40 +0000 (UTC) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by mx.groups.io with SMTP id smtpd.web10.53284.1739803836764961718 for ; Mon, 17 Feb 2025 06:50:37 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=LeoR+kfG; spf=pass (domain: bootlin.com, ip: 217.70.183.197, mailfrom: antonin.godard@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 514FC44312; Mon, 17 Feb 2025 14:50:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1739803835; 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=DpG3iFhTVowhVxpYPf5AKMKI/854ODe4Hb3sElrTQg4=; b=LeoR+kfGA2PWnLDS0XReI4E2ZEis9nSFO6q/Q/vw1EN8mjVjq5j5XS6MKwZFlu2hvl7X9Z 5Z4QKCW02w85A+7+sS5MtUUVMOLAI53qPbmtI0Zn+SpCxwPMDXxzu5NGHPvsbg4ZnyttDR 2hnNrh5juQPq+WS8n66zVHhs1g9z0u/dWnzEUy4g/uhHPBDtsVPy79YTVDVLAh8P2zsObG 2VXt4TNMBOMIMPo42yG7yqUvHO+HJhg4I84ZZrrLC/gW9dt8JjbXvW8Mg7sM3SMvqZ7zFx B7g91cagjdPlh1q3yGRb4kMc0lnoRaLySd3HQIZx7CoADaNZhiPGoAtK/xUYCA== From: Antonin Godard Date: Mon, 17 Feb 2025 15:50:25 +0100 Subject: [PATCH v3 6/6] dev-manual/multiconfig: add suggested best practices and baremetal sections MIME-Version: 1.0 Message-Id: <20250217-multiconfig-doc-v3-6-027a9fb282c3@bootlin.com> References: <20250217-multiconfig-doc-v3-0-027a9fb282c3@bootlin.com> In-Reply-To: <20250217-multiconfig-doc-v3-0-027a9fb282c3@bootlin.com> To: docs@lists.yoctoproject.org Cc: Thomas Petazzoni , Quentin Schulz X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=7690; i=antonin.godard@bootlin.com; h=from:subject:message-id; bh=b8ulFqEaS2FWYXCrbi+TE5GQBuFhWt0MDCYzrTn8mbM=; b=owEBbQKS/ZANAwAIAdGAQUApo6g2AcsmYgBns0y5BdG8AM8NePY8lGbA1FEWambS1/+BL0Rm0 Rw5wytdbuiJAjMEAAEIAB0WIQSGSHJRiN1AG7mg0//RgEFAKaOoNgUCZ7NMuQAKCRDRgEFAKaOo NvyCEACtN7Yc55AujicTXTgw20RCkMVVVSrSM18IHyy8yvmy0Pg1C0w0WZv89/7UxDCOqn99kcP yRBx5WTS12VCoUOCW2pMy0tmSCpQfxpiBAtPIZIcGZiaJZ3zj/sYC330IamP2DDduYT/MLs8uBs I7U5bBTnrgK6XVnWMm6Ksf0TIYp3JoPQzxm5itCsl1XVNjAnfaYizf/igVUErTuHgnUT/6i/nnR fd6bqfL70AfwQtUScCf/aGyXRqFVg0bpNiiXvjtU6qCleBSEX205U1yO6E0Tb+3GDBThLYo7iVx VesNQi1jgG5h1Fxq4e5+Hv+Yn6+gFyZp6OXyPGvbTBKua7bHOqeIFvgVuIUDwIwGigR6Q25juJk ca9FgmUw6u+rVcb7ulOnE+p9CiY3z/Erf5IvPpU58kbqST9nCJSyUU03KHD6hPEjjfrZeKgVYg8 TyfipeGnuIerEU5u3k2mZzuNEEWmAt/3GLNbd9uE6R88v3NOVVGP7/xCKPhvjsqGK9nuf/gqe8V xYxSWUKSec5p+/lcYgqnR4kDR0d5nbuLJl7Zg7iq2Tsrp7vP0XKFIpYw6eY7guYZPO2dRFSW1fy RG/a9PbLlHzWq5cMwvq/QRiurSTEB+STKyrzntSvRIVHET4lPY63ganlp7bbSXzlVSFFVAs+v7I s3s05wUk5rT61dA== X-Developer-Key: i=antonin.godard@bootlin.com; a=openpgp; fpr=8648725188DD401BB9A0D3FFD180414029A3A836 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdehkeeikecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhmpeetnhhtohhnihhnucfiohgurghrugcuoegrnhhtohhnihhnrdhgohgurghrugessghoohhtlhhinhdrtghomheqnecuggftrfgrthhtvghrnhepuefhleelueehveefjeehgeeviedtieeljeeiudffhfeuveejtedvteeigfejteevnecuffhomhgrihhnpeihohgtthhophhrohhjvggtthdrohhrghdpshhouhhrtggvfigrrhgvrdhorhhgnecukfhppedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtudemtggsudegmeehheeimeejrgdttdemjegthegtmeeirgguvgemjeelgeekmeegtdehledphhgvlhhopegluddvjedrtddruddrudgnpdhmrghilhhfrhhomheprghnthhonhhinhdrghhouggrrhgusegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopeefpdhrtghpthhtohepqhhuvghnthhinhdrshgthhhulhiisegthhgvrhhrhidruggvpdhrtghpthhtohepughotghssehlihhsthhsrdihohgtthhop hhrohhjvggtthdrohhrghdprhgtphhtthhopehthhhomhgrshdrphgvthgriiiiohhnihessghoohhtlhhinhdrtghomh 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 ; Mon, 17 Feb 2025 14:50:40 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/6400 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 Reviewed-by: Quentin Schulz --- 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 8371cf0e464bbd09f80a2ba0fbe700a911774fa9..71fe542efbbd074a737a7dc6db301de1ac087f20 100644 --- a/documentation/dev-manual/multiconfig.rst +++ b/documentation/dev-manual/multiconfig.rst @@ -174,3 +174,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 with :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 example 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 may differ from the current :term:`MACHINE` if + the multiconfig :term:`configuration file` overrides it. + +- 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 case 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 addition, we will define a separate +:term:`TMPDIR` 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`` file configures a separate :term:`TMPDIR` for +holding binaries compiled with the `newlib `__ +toolchain (see :term:`TCLIBC`). + +.. note:: + + Here, the default :term:`MACHINE` is not overridden 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` must be overridden. + +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 a ``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 ``my-firmware`` recipe has deployed ``my-firmware.elf``, 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.