From patchwork Sun Sep 11 17:26:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 12565 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 BF464C54EE9 for ; Sun, 11 Sep 2022 17:26:26 +0000 (UTC) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.groups.io with SMTP id smtpd.web10.662.1662917186036678379 for ; Sun, 11 Sep 2022 10:26:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=npZP9jpq; spf=pass (domain: gmail.com, ip: 209.85.128.49, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f49.google.com with SMTP id az6so5611688wmb.4 for ; Sun, 11 Sep 2022 10:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=lHhu6F2Nexs+lofwQF8LxpRLU0SzsGjp6LoB1cK+Z70=; b=npZP9jpqSTTVCmhQHcY2jVb1Ix9MTNwLqjkYeQIYhN9ydDJp7T/rI8vW5V5L8rVj6a Yk29beObNdmP1MkhvW9uZdz8wVfK/KsefqIsqVaAQLm8UZKlX3IYXpKAHtuprV5J9Iyb BBeKgyfcP/fHzx8rJP3cAyUPxfP5oK6t7Z2J1I9i7EjaaxLBfylzYMt/WQRn3UAZGw0P 18mutCGkPguW8B2Pj79FJgfsHpPuf5mKmkDps0QxCct9rIA3kuVKlHgBBD4uUkzJS8nJ aSliCAVWEe4g6j8JX+xpWiD0dsLF4I4thtT31aKTn+qwoFM60BWXZ/8AUgRE4sA7x3hT ohmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=lHhu6F2Nexs+lofwQF8LxpRLU0SzsGjp6LoB1cK+Z70=; b=4JUP1SiAq8nTQ0I0wv6AoL006G1pWhMoQuXDhr9PHursdiB8o6zFILklZxngO2D6fA SvQMT/lxknODu30pTMdtute+CPmIkOVPVNr+jDlZv+GKxd3div+LY8yYtvFY2y1iMvl7 En8qX5P7zQDjxMuydkvMhlJPxPmIo5YgfzIDG9ibzNbx6AZlcDlrjk9p8b8p+Nw8qSmt +NDa2EalmAALr/brQdlO0D8Gt8dVsV3PM2n2//78paNIgUDcFzhmxzNYgxhv2XvcuRzB lVGt5JgbfdlgtrTqAPPLhbzLxdNUqwFL61C8orOOz9arOXHOSd+Ij7XyKPgxvPSHI5LD p4Xw== X-Gm-Message-State: ACgBeo19Tmf7tES6qLmXknxb8akt4DeV6ABn3NLIYBsihTwbwvPXDyAp +y3Uqv4hANnJWtNPBXjST5uoLMdapao= X-Google-Smtp-Source: AA6agR4FKz5HPqanfH9v4THMDOzrrQKX9QWs/tP5JyeGVJkvMoSIbOvh8u97UxvAQ12Pl4HlysLK+w== X-Received: by 2002:a05:600c:5248:b0:3b3:24cb:fde with SMTP id fc8-20020a05600c524800b003b324cb0fdemr11334780wmb.80.1662917184138; Sun, 11 Sep 2022 10:26:24 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id g5-20020a5d4885000000b00228de58ae2bsm5280395wrq.12.2022.09.11.10.26.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Sep 2022 10:26:22 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: docs@lists.yoctoproject.org Cc: Alexander Kanavin Subject: [PATCH 1/5] ref-manual: correct the location of default configuration template Date: Sun, 11 Sep 2022 19:26:04 +0200 Message-Id: <20220911172608.2542076-1-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 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 ; Sun, 11 Sep 2022 17:26:26 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/3147 Signed-off-by: Alexander Kanavin Reviewed-by: Michael Opdenacker --- documentation/ref-manual/structure.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/documentation/ref-manual/structure.rst b/documentation/ref-manual/structure.rst index bdcffc194..6c6f52e79 100644 --- a/documentation/ref-manual/structure.rst +++ b/documentation/ref-manual/structure.rst @@ -189,7 +189,7 @@ Directory named ``mybuilds/`` that is outside of the :term:`Source Directory`:: $ source oe-init-build-env ~/mybuilds The OpenEmbedded build system uses the template configuration files, which -are found by default in the ``meta-poky/conf/`` directory in the Source +are found by default in the ``meta-poky/conf/templates/default`` directory in the Source Directory. See the ":ref:`dev-manual/common-tasks:creating a custom template configuration directory`" section in the Yocto Project Development Tasks Manual for more @@ -261,15 +261,15 @@ OpenEmbedded build system creates it from ``local.conf.sample`` when you :ref:`structure-core-script`. The source ``local.conf.sample`` file used depends on the -:term:`TEMPLATECONF` script variable, which defaults to ``meta-poky/conf/`` +:term:`TEMPLATECONF` script variable, which defaults to ``meta-poky/conf/templates/default`` when you are building from the Yocto Project development environment, -and to ``meta/conf/`` when you are building from the OpenEmbedded-Core +and to ``meta/conf/templates/default`` when you are building from the OpenEmbedded-Core environment. Because the script variable points to the source of the ``local.conf.sample`` file, this implies that you can configure your build environment from any layer by setting the variable in the top-level build environment setup script as follows:: - TEMPLATECONF=your_layer/conf + TEMPLATECONF=your_layer/conf/templates/your_template_name Once the build process gets the sample file, it uses ``sed`` to substitute final @@ -281,7 +281,7 @@ file, it uses ``sed`` to substitute final You can see how the :term:`TEMPLATECONF` variable is used by looking at the ``scripts/oe-setup-builddir`` script in the :term:`Source Directory`. You can find the Yocto Project version of the ``local.conf.sample`` file in - the ``meta-poky/conf`` directory. + the ``meta-poky/conf/templates/default`` directory. .. _structure-build-conf-bblayers.conf: @@ -301,14 +301,14 @@ you ``source`` the top-level build environment setup script (i.e. As with the ``local.conf`` file, the source ``bblayers.conf.sample`` file used depends on the :term:`TEMPLATECONF` script variable, which -defaults to ``meta-poky/conf/`` when you are building from the Yocto -Project development environment, and to ``meta/conf/`` when you are +defaults to ``meta-poky/conf/templates/default`` when you are building from the Yocto +Project development environment, and to ``meta/conf/templates/default`` when you are building from the OpenEmbedded-Core environment. Because the script variable points to the source of the ``bblayers.conf.sample`` file, this implies that you can base your build from any layer by setting the variable in the top-level build environment setup script as follows:: - TEMPLATECONF=your_layer/conf + TEMPLATECONF=your_layer/conf/templates/your_template_name Once the build process gets the sample file, it uses ``sed`` to substitute final ``${``\ :term:`OEROOT`\ ``}`` values for all ``##OEROOT##`` values. @@ -317,7 +317,7 @@ Once the build process gets the sample file, it uses ``sed`` to substitute final You can see how the :term:`TEMPLATECONF` variable is defined by the ``scripts/oe-setup-builddir`` script in the :term:`Source Directory`. You can find the Yocto Project - version of the ``bblayers.conf.sample`` file in the ``meta-poky/conf/`` + version of the ``bblayers.conf.sample`` file in the ``meta-poky/conf/templates/default`` directory. .. _structure-build-conf-sanity_info: From patchwork Sun Sep 11 17:26:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 12568 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 B0393C6FA8B for ; Sun, 11 Sep 2022 17:26:36 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.groups.io with SMTP id smtpd.web08.730.1662917186590391790 for ; Sun, 11 Sep 2022 10:26:27 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MhEwrO7N; spf=pass (domain: gmail.com, ip: 209.85.221.42, mailfrom: alex.kanavin@gmail.com) Received: by mail-wr1-f42.google.com with SMTP id d2so11878734wrn.1 for ; Sun, 11 Sep 2022 10:26:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=xo4Ydk0mIxW4leGUM3+K68nwjZ1Dcyf4PtO8Dcda5s8=; b=MhEwrO7Nob+EbtJuU6eF4jZ91MT8VzZ+NisqzsN+cIUjC3Ku3n8IRlfX70xGIHtaGM pYsGqG8kqzJ7csuSugo+X8hLvkncpXmeinz9Sx9KpvmbyXtRetuGhAn1BGguap6NkShR UOjTqXL0gIusMQLOtR6D9C67Ji92NIJ+e+5d2uWZRU05AQl4YmbICzwzJY3uT/b1qeMm aqX27M5NVAPSQAJFovb9hMBEP1pQMG+E4TW/C6ynpj44cnyHi1iaYq/4cVHS92RuRW5A n4ywIarP1onKd8SZ8ZdIHigWA0j9s7Zt0hSH2oaxCkEJpikAz94nSOGwfjkF10l27m2j hglg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=xo4Ydk0mIxW4leGUM3+K68nwjZ1Dcyf4PtO8Dcda5s8=; b=nguyDg7ktGamWcU8VnbOlbsAFq91KhOpQ3t4Ojc95FTvMVyCXZFz7Hye5JofAgm+e2 oGNkwSqUIPL0H9WjJVVAq6heYh9mmgkLdKPm/DG+mGljq9fiME1ZqAU3hy8SMb5hHFqU D2gKEzp0OkviCctO0WDiHcDBz8iwIJD8Ttz40jhId0YWiXZW/K8ybr98KbwOJMdKObmB a3DKQF2fDOd3dsbPhVvR4qC4HJagCyGTLd2iShEIcrp6K524+9CjeiY2k6aDYZOLyu+a /h+sSsR0HF6NeZJ0/LLD5z0Pup5NOn6D8BXMVeC0EszshleODYyw9TQAt7Nfw4pDifMq YhiA== X-Gm-Message-State: ACgBeo1Ny3KtwADb2pZmzgaYkGO0P0oBA/6IE8whDwZYBr1y+LghOp6B s2OSpiz4UscqrlokFOK4IzIgQcjE0n4= X-Google-Smtp-Source: AA6agR4r2/6IZ4n4EbRgJwfkBGVxeu69Qu/snWcSVDp2uPHmO1TDnJHTlA6MZLSkhsHbOyR76MyaxA== X-Received: by 2002:a5d:684f:0:b0:228:d83f:5e3c with SMTP id o15-20020a5d684f000000b00228d83f5e3cmr13005637wrw.318.1662917184913; Sun, 11 Sep 2022 10:26:24 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id g5-20020a5d4885000000b00228de58ae2bsm5280395wrq.12.2022.09.11.10.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Sep 2022 10:26:24 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: docs@lists.yoctoproject.org Cc: Alexander Kanavin Subject: [PATCH 2/5] common-tasks.rst: drop the output of 'bitbake-layers --help' Date: Sun, 11 Sep 2022 19:26:05 +0200 Message-Id: <20220911172608.2542076-2-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220911172608.2542076-1-alex@linutronix.de> References: <20220911172608.2542076-1-alex@linutronix.de> MIME-Version: 1.0 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 ; Sun, 11 Sep 2022 17:26:36 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/3148 This is really not needed as the sub-commands are described in greater detail just below, and is prone to become outdated. Signed-off-by: Alexander Kanavin Reviewed-by: Michael Opdenacker --- documentation/dev-manual/common-tasks.rst | 33 ----------------------- 1 file changed, 33 deletions(-) diff --git a/documentation/dev-manual/common-tasks.rst b/documentation/dev-manual/common-tasks.rst index bdc528b72..c2afec946 100644 --- a/documentation/dev-manual/common-tasks.rst +++ b/documentation/dev-manual/common-tasks.rst @@ -653,39 +653,6 @@ For help on the BitBake layer management tool, use the following command:: $ bitbake-layers --help - NOTE: Starting bitbake server... - usage: bitbake-layers [-d] [-q] [-F] [--color COLOR] [-h] ... - - BitBake layers utility - - optional arguments: - -d, --debug Enable debug output - -q, --quiet Print only errors - -F, --force Force add without recipe parse verification - --color COLOR Colorize output (where COLOR is auto, always, never) - -h, --help show this help message and exit - - subcommands: - - layerindex-fetch Fetches a layer from a layer index along with its - dependent layers, and adds them to conf/bblayers.conf. - layerindex-show-depends - Find layer dependencies from layer index. - add-layer Add one or more layers to bblayers.conf. - remove-layer Remove one or more layers from bblayers.conf. - flatten flatten layer configuration into a separate output - directory. - show-layers show current configured layers. - show-overlayed list overlayed recipes (where the same recipe exists - in another layer) - show-recipes list available recipes, showing the layer they are - provided by - show-appends list bbappend files and recipe files they apply to - show-cross-depends Show dependencies between recipes that cross layer - boundaries. - create-layer Create a basic layer - - Use bitbake-layers --help to get help on a specific command The following list describes the available commands: From patchwork Sun Sep 11 17:26:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 12566 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 A7936C6FA83 for ; Sun, 11 Sep 2022 17:26:36 +0000 (UTC) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mx.groups.io with SMTP id smtpd.web11.714.1662917187243934684 for ; Sun, 11 Sep 2022 10:26:27 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YgzPKAZh; spf=pass (domain: gmail.com, ip: 209.85.128.53, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f53.google.com with SMTP id o5so1534510wms.1 for ; Sun, 11 Sep 2022 10:26:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=uS2DgCFAj1RqRAIc0X5m3/7IrwX7V6ml5+QGx+Ny4Ms=; b=YgzPKAZhQvw1TrZCdRC3l8X1tcYtpdLcWiG3V80mDzaoj+0JmRdJcQLHOObf57B1KW tOrTJGBv3g8YKTqLsTlqAT5tki622mScmrE3zCM5LjFNQ5VLbCyjJ95PawAjOApApOB9 triINQDeVC7PS7pG70LvjTxRdp1Xh6ZurG7EDv0oXLvqd0Vo34wTJ8VQVI41UtnA5gGG q6nnZbZCTUGt4pXdJ9Qk342ULYbcNP7f09qg3c6QGjqsMAVifHy6olYgDLDTwx3lcYul V5pA++tnuPZSsBcd8tQwbE45srZVsmbagxntfxo7JFa10Ikoxnw71ppzZ2TtfDSt9TJg FFsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=uS2DgCFAj1RqRAIc0X5m3/7IrwX7V6ml5+QGx+Ny4Ms=; b=0Z7hhaNKjGfJi5kooGZr3oprYOzxr7ZjP/CSxnjACfiiAlxYBQSY+bKJBcVeyU+sCb g27PedKcbIz4kR7LQhIvY/YWByk2AfdFXDYaNfySsghW/SoQVA3Fp2mlQMZrCKhvaSNP arPehQwESRJrukkR4yZ7TWzF27yYOeCY5RNf0D4idjnDkp3Ej8Bjz0gmIaVMBdV7yDBp dSso4AxnbdTX8pI3H8V2vRp51S6e6KxSDA8qCcw/yWQVdi0PHouYw3Y1tiAkyX9ooJBn rPAab/dFBL1bita0TbsnQFKPfrZaIWIS7Zb2f5/e7TMnX+7ObMyZwdKh32k4bIPH1Yxh bpgA== X-Gm-Message-State: ACgBeo1cKNQgWN7snKlvezowe1jNF1nHkG2iB8z/KIZ/jpJw918ldh+B /qZLySWhQZlzo6Y4CokUTl5ZZe0S4fk= X-Google-Smtp-Source: AA6agR6mPLZ3By2w3eP6XfEo4nQxqSVTTMbiXZ03X02+L5KF2jvsFxywGdvkLzHPjU0B0rIQyHzCWw== X-Received: by 2002:a05:600c:4fcb:b0:3a5:f2cc:2f19 with SMTP id o11-20020a05600c4fcb00b003a5f2cc2f19mr11173780wmq.142.1662917185780; Sun, 11 Sep 2022 10:26:25 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id g5-20020a5d4885000000b00228de58ae2bsm5280395wrq.12.2022.09.11.10.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Sep 2022 10:26:25 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: docs@lists.yoctoproject.org Cc: Alexander Kanavin Subject: [PATCH 3/5] common-tasks.rst: describe the newly added layer setup and template config commands Date: Sun, 11 Sep 2022 19:26:06 +0200 Message-Id: <20220911172608.2542076-3-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220911172608.2542076-1-alex@linutronix.de> References: <20220911172608.2542076-1-alex@linutronix.de> MIME-Version: 1.0 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 ; Sun, 11 Sep 2022 17:26:36 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/3149 Signed-off-by: Alexander Kanavin --- documentation/dev-manual/common-tasks.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/documentation/dev-manual/common-tasks.rst b/documentation/dev-manual/common-tasks.rst index c2afec946..4d19bd921 100644 --- a/documentation/dev-manual/common-tasks.rst +++ b/documentation/dev-manual/common-tasks.rst @@ -728,6 +728,17 @@ The following list describes the available commands: - ``create-layer``: Creates a basic layer. +- ``save-build-conf``: Saves the currently active build configuration + (conf/local.conf, conf/bblayers.conf) as a template into a layer. + This template can later be used for setting up builds via TEMPLATECONF. + For information about saving and usinc configuration templates, see + ":ref:`dev-manual/common-tasks:creating a custom template configuration directory`". + +- ``create-layers-setup``: Writes out a configuration file and/or a script that + can replicate the directory structure and revisions of the layers in a current build. + For more information, see ":ref:`dev-manual/common-tasks:saving and restoring the layers setup`". + + Creating a General Layer Using the ``bitbake-layers`` Script ------------------------------------------------------------ From patchwork Sun Sep 11 17:26:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 12567 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 A6C51C54EE9 for ; Sun, 11 Sep 2022 17:26:36 +0000 (UTC) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mx.groups.io with SMTP id smtpd.web09.722.1662917187986051495 for ; Sun, 11 Sep 2022 10:26:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FIE9S86U; spf=pass (domain: gmail.com, ip: 209.85.128.50, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f50.google.com with SMTP id d5so5616896wms.5 for ; Sun, 11 Sep 2022 10:26:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=BKf8WJWTW2eGiGBQT/4nceg38wpkB0OmEsNXVlWVWsI=; b=FIE9S86UfwqWQHbr0/ms3QqH3jAbV7qVfQGOolbbkG1wymeWLg4zENCYAe8CZRoMBo WonAkrUmrpuEvKicSYsmEyrHkIJmGg+cJL5cBWSXBCGJ34oI/l5DkJ4bUK0Mn/4dohjB j/S3LrFVLZHiyKRH4EW8ccHAq/b/W79GeD/nu1vd+MhAVtu47AH4KtUaUiW28GCj6Szp /xEJyl8A4bUQuGRQD3DVG1eOST+wnUM22xuzvQmtt1XZw5EK/InO65nnKtphEkINXeTu G5W6JNPMxPlj3Eia+YCsPnFNGW5vQhkepieDLafxAHiJTJhUWFZHBCZ4c9CPW96CRChE FhVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=BKf8WJWTW2eGiGBQT/4nceg38wpkB0OmEsNXVlWVWsI=; b=GAYPV4K/uX2UjK57Q0Umnml0p8A57ADCA01dOe+MB+a7r/ViNOCp4lJnLyigieWtBi 0UEZ9x4wwdWM26d5JFFvscDowrT9ea5iq3UJrESwN4/6ktZgCulChDN1eyZM27N23rZs lds9QH8VpFPIwNsnaph+rKE/anfEIaZPs/zkJSGg8iFbO9qRAEFt6bTaJVqG1KccHFUR pBykuNVPRgO3InfHGonislQIKanSn6DgcVryIV/FcIGxiuiMdwWXyD9/EPojl3jBeOJA nf/sZnc2LR45+9/ZtKU2/YejAeqNhevgnTNyAY8esW2TbANYRbuBwo/xPnzlJZOMTc41 oCgw== X-Gm-Message-State: ACgBeo15I6I89OiYDiFqNyN18KFAAI826BK9A3SxWz/1Jpis3XhXFNhb RQQAhQCR2fmr2YGx0VPX/WHaGYUvqJU= X-Google-Smtp-Source: AA6agR5eg/sbJUcqwcMwEdsKZ70Rd4kgGIFEK4DcoXM2pmIIaVqXw+ki6Ul6Ue3V8oW+5SlEhTN5yQ== X-Received: by 2002:a05:600c:34d3:b0:3a5:fea5:1be8 with SMTP id d19-20020a05600c34d300b003a5fea51be8mr11264992wmq.106.1662917186514; Sun, 11 Sep 2022 10:26:26 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id g5-20020a5d4885000000b00228de58ae2bsm5280395wrq.12.2022.09.11.10.26.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Sep 2022 10:26:26 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: docs@lists.yoctoproject.org Cc: Alexander Kanavin Subject: [PATCH 4/5] common-tasks.rst: describe the layer setup tooling Date: Sun, 11 Sep 2022 19:26:07 +0200 Message-Id: <20220911172608.2542076-4-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220911172608.2542076-1-alex@linutronix.de> References: <20220911172608.2542076-1-alex@linutronix.de> MIME-Version: 1.0 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 ; Sun, 11 Sep 2022 17:26:36 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/3150 Signed-off-by: Alexander Kanavin --- documentation/dev-manual/common-tasks.rst | 54 +++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/documentation/dev-manual/common-tasks.rst b/documentation/dev-manual/common-tasks.rst index 4d19bd921..6c2df9aa6 100644 --- a/documentation/dev-manual/common-tasks.rst +++ b/documentation/dev-manual/common-tasks.rst @@ -858,6 +858,60 @@ enables the build system to locate the layer during the build. During a build, the OpenEmbedded build system looks in the layers from the top of the list down to the bottom in that order. +Saving and restoring the layers setup +------------------------------------- + +Once you have a working build with the correct set of layers, it is beneficial +to capture the layer setup - what they are, which repositories they come from +and which SCM revisions they're at - into a configuration file, so that this +setup can be easily replicated later, perhaps on a different machine. Here's +how to do this: + + $ bitbake-layers create-layers-setup /srv/work/alex/meta-alex/ + NOTE: Starting bitbake server... + NOTE: Created /srv/work/alex/meta-alex/setup-layers.json + NOTE: Created /srv/work/alex/meta-alex/setup-layers + +The tool needs a single argument which tells where to place the output, consisting +of a json formatted layer configuration, and a 'setup-layers' script that can use that configuration +to restore the layers in a different location, or on a different host machine. The argument +can point to a custom layer (which is then deemed a 'bootstrap' layer that needs to be +checked out first), or into a completely independent location. + +The replication of the layers is performed by running the setup-layer script provided +above: + +1. Clone the bootstrap layer or some other repository to obtain +the json config and the setup script that can use it. + +2. Run the script directly with no options: +(note: this will work to update an existing checkout as well) + + alex@Zen2:/srv/work/alex/my-build$ meta-alex/setup-layers + Note: not checking out source meta-alex, use --force-bootstraplayer-checkout to override. + + Setting up source meta-intel, revision 15.0-hardknott-3.3-310-g0a96edae, branch master + Running 'git init -q /srv/work/alex/my-build/meta-intel' + Running 'git remote remove origin > /dev/null 2>&1; git remote add origin git://git.yoctoproject.org/meta-intel' in /srv/work/alex/my-build/meta-intel + Running 'git fetch -q origin || true' in /srv/work/alex/my-build/meta-intel + Running 'git checkout -q 0a96edae609a3f48befac36af82cf1eed6786b4a' in /srv/work/alex/my-build/meta-intel + + Setting up source poky, revision 4.1_M1-372-g55483d28f2, branch akanavin/setup-layers + Running 'git init -q /srv/work/alex/my-build/poky' + Running 'git remote remove origin > /dev/null 2>&1; git remote add origin git://git.yoctoproject.org/poky' in /srv/work/alex/my-build/poky + Running 'git fetch -q origin || true' in /srv/work/alex/my-build/poky + Running 'git remote remove poky-contrib > /dev/null 2>&1; git remote add poky-contrib ssh://git@push.yoctoproject.org/poky-contrib' in /srv/work/alex/my-build/poky + Running 'git fetch -q poky-contrib || true' in /srv/work/alex/my-build/poky + Running 'git checkout -q 11db0390b02acac1324e0f827beb0e2e3d0d1d63' in /srv/work/alex/my-build/poky + +.. note:: + The script is self-suffucient and requires only python3 + and git on the host machne where it will run. + +.. note:: + Both the 'create-layers-setup' and the 'setup-layers' provided several additional options + that customize their behavior - you are welcome to study them via '--help' command line parameter. + Customizing Images ================== From patchwork Sun Sep 11 17:26:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 12569 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 B02C6ECAAD3 for ; Sun, 11 Sep 2022 17:26:36 +0000 (UTC) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.groups.io with SMTP id smtpd.web08.732.1662917188936843468 for ; Sun, 11 Sep 2022 10:26:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jFk0Y2cc; spf=pass (domain: gmail.com, ip: 209.85.128.46, mailfrom: alex.kanavin@gmail.com) Received: by mail-wm1-f46.google.com with SMTP id c2-20020a1c3502000000b003b2973dafb7so9346204wma.2 for ; Sun, 11 Sep 2022 10:26:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=4q9cr1ormIySkZtVrHc60trTjmu6fnVqn+AjPBNSSgg=; b=jFk0Y2ccqccNxaY9X4jC6tX9kx4zpwpmsM7G0Qr+r4rlSCxZKA7ZcrUQdur5SXG5lI Q2wjef2gs9pRmKmqTeY/MqvNQvbovyOdSPSHbIA8wCya2FtV6zFSekGskEe0gl4bnqQZ XBNMSwgjS7t6kr175Vxxu31jkN9Eb3Zd/8CQ0aqF+NRqnOkhHlRkg/jZpMKjgEszoGI8 IaVQlE805kQXVkB6ubYsGtVxR2M59APkAMQlh0FYxvi4e7KoZQ5KqmZqS4H3XlQbC0IU 6ErQksyUDm1ufBOKUIIdSZd6cCcs2MuRquZwbW94S05S9WEmlIkiYd9BwICFz0h0PNNI rZYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=4q9cr1ormIySkZtVrHc60trTjmu6fnVqn+AjPBNSSgg=; b=sVGArxU4/SsZPapE6Ceo8/N29NmIsSdO9Rmg84Cb7MRTByuWKJz1o00iULoBTVXzY1 APUFPagzdPLHtOpByITc2Q31ndySTqcYPBx6WNOK+oszCKBBH7/cTmA5hN7hRQPyiabY oIxBr2a1FVFmST7IgeF0lHylUNzYI377//VHKdsLWgR1SoEMnE5xoC7itoa4BGsnIndc sBoYQjidyFA/9fLh2+0np6FaOzKUx5Ohs/XEDtjoQGea5BTVSzQSsxBL23hZwgS8W5KP uvaUeLKxwaCKQKQsRAUBu7zPVs/7PuexXnaloXtSd0aiRe1UmtVVqOk8VJxkCKyHCuxQ /sLw== X-Gm-Message-State: ACgBeo2w+svgjk+dvhFyUFrRkIofAH6bYWJt2XwwZyW5EbHwbReYFRsx +SpYv4q4ek5rpe8INamjPiQQuX6+c6Q= X-Google-Smtp-Source: AA6agR5lJz+sJ+1cQfWzqoAeGioNEBhoCjMvYnlWyPHk8bvExjV0wgL5q0wRsgeFJccKLVhauFIOXA== X-Received: by 2002:a05:600c:358f:b0:3b4:8602:7c43 with SMTP id p15-20020a05600c358f00b003b486027c43mr1323564wmq.60.1662917187199; Sun, 11 Sep 2022 10:26:27 -0700 (PDT) Received: from Zen2.lab.linutronix.de. (drugstore.linutronix.de. [80.153.143.164]) by smtp.gmail.com with ESMTPSA id g5-20020a5d4885000000b00228de58ae2bsm5280395wrq.12.2022.09.11.10.26.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Sep 2022 10:26:26 -0700 (PDT) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: docs@lists.yoctoproject.org Cc: Alexander Kanavin Subject: [PATCH 5/5] common-tasks.rst: rewrite the section about configuration templates Date: Sun, 11 Sep 2022 19:26:08 +0200 Message-Id: <20220911172608.2542076-5-alex@linutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220911172608.2542076-1-alex@linutronix.de> References: <20220911172608.2542076-1-alex@linutronix.de> MIME-Version: 1.0 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 ; Sun, 11 Sep 2022 17:26:36 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/3151 This now includes a description about how to create a template with the newly added tooling, and drops the description of .templateconf as a way to point to a custom template (which is not correct: .templateconf is used only to point to a default template in poky or core when TEMPLATECONF is not specified). Signed-off-by: Alexander Kanavin --- documentation/dev-manual/common-tasks.rst | 92 +++++++++-------------- 1 file changed, 36 insertions(+), 56 deletions(-) diff --git a/documentation/dev-manual/common-tasks.rst b/documentation/dev-manual/common-tasks.rst index 6c2df9aa6..eab5648fd 100644 --- a/documentation/dev-manual/common-tasks.rst +++ b/documentation/dev-manual/common-tasks.rst @@ -6463,71 +6463,51 @@ Creating a Custom Template Configuration Directory ================================================== If you are producing your own customized version of the build system for -use by other users, you might want to customize the message shown by the -setup script or you might want to change the template configuration -files (i.e. ``local.conf`` and ``bblayers.conf``) that are created in a -new build directory. +use by other users, you might want to provide a custom build configuration +that includes all the necessary settings and layers (i.e. ``local.conf`` and +``bblayers.conf`` that are created in a new build directory) and a custom +message that is shown when setting up the build. This can be done by +creating one or more template configuration directories in your +custom distribution layer. -The OpenEmbedded build system uses the environment variable -:term:`TEMPLATECONF` to locate the directory from which it gathers -configuration information that ultimately ends up in the -:term:`Build Directory` ``conf`` directory. -By default, :term:`TEMPLATECONF` is set as follows in the ``poky`` -repository:: +This can be done by using ``bitbake-layers save-build-conf``: - TEMPLATECONF=${TEMPLATECONF:-meta-poky/conf} - -This is the -directory used by the build system to find templates from which to build -some key configuration files. If you look at this directory, you will -see the ``bblayers.conf.sample``, ``local.conf.sample``, and -``conf-notes.txt`` files. The build system uses these files to form the -respective ``bblayers.conf`` file, ``local.conf`` file, and display the -list of BitBake targets when running the setup script. - -To override these default configuration files with configurations you -want used within every new Build Directory, simply set the -:term:`TEMPLATECONF` variable to your directory. The :term:`TEMPLATECONF` -variable is set in the ``.templateconf`` file, which is in the top-level -:term:`Source Directory` folder -(e.g. ``poky``). Edit the ``.templateconf`` so that it can locate your -directory. + $ bitbake-layers save-build-conf ../../meta-alex/ test-1 + NOTE: Starting bitbake server... + NOTE: Configuration template placed into /srv/work/alex/meta-alex/conf/templates/test-1 + Please review the files in there, and particularly provide a configuration description in /srv/work/alex/meta-alex/conf/templates/test-1/conf-notes.txt + You can try out the configuration with + TEMPLATECONF=/srv/work/alex/meta-alex/conf/templates/test-1 . /srv/work/alex/poky/oe-init-build-env build-try-test-1 -Best practices dictate that you should keep your template configuration -directory in your custom distribution layer. For example, suppose you -have a layer named ``meta-mylayer`` located in your home directory and -you want your template configuration directory named ``myconf``. -Changing the ``.templateconf`` as follows causes the OpenEmbedded build -system to look in your directory and base its configuration files on the -``*.sample`` configuration files it finds. The final configuration files -(i.e. ``local.conf`` and ``bblayers.conf`` ultimately still end up in -your Build Directory, but they are based on your ``*.sample`` files. -:: +The above command takes the config files from the currently active build directory under ``conf\``, +replaces site-specific paths in bblayers.conf with ##OECORE##-relative paths, and copies +the config files into a specified layer under a specified template name. - TEMPLATECONF=${TEMPLATECONF:-meta-mylayer/myconf} +To use those saved templates as a starting point for a build, users should point +to one of them with :term:`TEMPLATECONF` environment variable: -Aside from the ``*.sample`` configuration files, the ``conf-notes.txt`` -also resides in the default ``meta-poky/conf`` directory. The script -that sets up the build environment (i.e. -:ref:`structure-core-script`) uses this file to -display BitBake targets as part of the script output. Customizing this -``conf-notes.txt`` file is a good way to make sure your list of custom -targets appears as part of the script's output. + TEMPLATECONF=/srv/work/alex/meta-alex/conf/templates/test-1 . /srv/work/alex/poky/oe-init-build-env build-try-test-1 -Here is the default list of targets displayed as a result of running -either of the setup scripts:: +The OpenEmbedded build system uses the environment variable +:term:`TEMPLATECONF` to locate the directory from which it gathers +configuration information that ultimately ends up in the +:term:`Build Directory` ``conf`` directory. - You can now run 'bitbake ' +If :term:`TEMPLATECONF` is not set, the default value is obtained +from ```.templateconf`` file that is read from the same directory as +`oe-init-build-env` script. For ``poky`` reference distribution this +would be:: - Common targets are: - core-image-minimal - core-image-sato - meta-toolchain - meta-ide-support + TEMPLATECONF=${TEMPLATECONF:-meta-poky/conf/templates/default} -Changing the listed common targets is as easy as editing your version of -``conf-notes.txt`` in your custom template configuration directory and -making sure you have :term:`TEMPLATECONF` set to your directory. +If you look at a configuration template directory, you will +see the ``bblayers.conf.sample``, ``local.conf.sample``, and +``conf-notes.txt`` files. The build system uses these files to form the +respective ``bblayers.conf`` file, ``local.conf`` file, and show +users a note about the build they're setting up +when running the ``oe-init-build-env`` setup script. These can be +edited further if needed to improve or change the build configurations +available to the users. Conserving Disk Space =====================