Update yocto-check-layer documentation
cover Update yocto-check-layer documentation
---
Antonin Godard (2):
dev-manual/layers.rst: yocto-check-layer: mention the --machines argument test-manual/yocto-project-compatible.rst: fix a typo
documentation/dev-manual/layers.rst | 9 +++++++++ documentation/test-manual/yocto-project-compatible.rst | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-)
---
base-commit: e77139b5c616e6e5ad436eb91416fd804389425f
change-id: 20250919-update-compatible-doc-651debba8dfa
Best regards,
Signature · 1 line
Antonin Godard <[email protected]>
PATCH 1/2 dev-manual/layers.rst: yocto-check-layer: mention the --machines argument
The yocto-check-layer script should be run with the --machines arguments to test the different machines present in a BSP layer. Mention it in the documentation.
[YOCTO #15974]
--- documentation/dev-manual/layers.rst | 9 +++++++++ 1 file changed, 9 insertions(+)
documentation/dev-manual/layers.rst +9 -0
@@ -376,6 +376,15 @@ directory:: Be sure to provide the actual directory for your layer as part of the command. +For :term:`BSP <Board Support Package (BSP)>` layers, the ``--machines`` +argument should be passed as part of the command:: + + $ source oe-init-build-env + $ yocto-check-layer your_layer_directory --machines <machine1> <machine2> ... + +These machines are the ones present in your BSP layer, in the ``conf/machine/`` +directory. + Entering the command causes the script to determine the type of layer and then to execute a set of specific tests against the layer. The following list overviews the test:
Signature · 1 line
2.51.0
Re: [docs] [PATCH 1/2] dev-manual/layers.rst: yocto-check-layer: mention the --machines argument
Hi Antonin,
Quoted 17 lines · Antonin Godard via lists.yoctoproject.org
The yocto-check-layer script should be run with the --machines arguments to test the different machines present in a BSP layer. Mention it in the documentation.
[YOCTO #15974]
Cc Mark Hatle <[email protected]>Signed-off-by Antonin Godard <[email protected]>--- documentation/dev-manual/layers.rst | 9 +++++++++ 1 file changed, 9 insertions(+)documentation/dev-manual/layers.rst +0
-0
documentation/dev-manual/layers.rst directory:: · line 384
Quoted 9 lines
documentation/dev-manual/layers.rst +6
-0@@ -376,6 +376,15 @@ directory:: Be sure to provide the actual directory for your layer as part of the command. +For :term:`BSP <Board Support Package (BSP)>` layers, the ``--machines`` +argument should be passed as part of the command:: + + $ source oe-init-build-env + $ yocto-check-layer your_layer_directory --machines <machine1> <machine2> ... +
Considering the help text of the script, we should probably rather have the machines before the layer directory? I assume you may have tried and discovered that it doesn't work by simply swapping both, likely due to https://github.com/python/cpython/issues/53584?
The answer to that is "--", as in:
yocto-check-layer --machines <machine1> <machine2> ... -- your_layer_directory
I always wondered what my BSP layer would return to match this and I just tried from within a kas setup.
First thing... it seems it doesn't detect layer dependencies from bblayers.conf, so I have to make them explicit them from the command line via --dependency (which is fine but a bit odd if they already are in bblayers.conf?). Once that is done, BitBake complains because the layer is included twice (?????). So I instead sourced the script from within the kas container to another location, with thus an empty bblayers.conf and then it started.
I ended up calling
yocto-check-layer --machines jaguar puma-haikou ringneck-haikou tiger-haikou --dependency ../meta-openembedded/meta-python/ ../meta-rockchip/ ../meta-arm/meta-arm ../meta-arm/meta-arm-toolchain/ ../meta-openembedded/meta-oe/ -- ../meta-cherry-es/meta-bsp/
which is what's required to setup a BSP build for me.
The issue is that it seems to test more than just my layer?
[...]
INFO: Setting up for meta-python(LayerType.SOFTWARE), /work/meta-openembedded/meta-python
INFO: Adding layer meta-oe
INFO: Getting initial bitbake variables ...
INFO: Getting initial signatures ...
INFO: Adding layer meta-python
INFO: Starting to analyze: meta-python
INFO: Distro: poky
[...]
INFO: Setting up for meta-oe(LayerType.SOFTWARE), /work/meta-openembedded/meta-oe
INFO: Getting initial bitbake variables ...
INFO: Getting initial signatures ...
INFO: Adding layer meta-oe
INFO: Starting to analyze: meta-oe
INFO: Distro: poky
[...]
INFO: Setting up for meta-rockchip(LayerType.BSP), /work/meta-rockchip
INFO: Adding layer meta-arm
INFO: Adding layer meta-arm-toolchain
INFO: Getting initial bitbake variables ...
INFO: Getting initial signatures ...
INFO: Adding layer meta-rockchip
INFO: Starting to analyze: meta-rockchip
INFO: Distro: poky
[...]
etc....
Which is very surprising to me, why would we want to run the check against those layers? They are dependencies after all and of course since my machine only exists in my BSP layer, the test for my machine won't pass for meta-python without my layer for example.
So I'm not sure what is supposed to happen here but I'm not sure what actually matters as output to this script :/
I would recommend to add a few words maybe on the --dependency argument and that it should be run from a clean build directory (at least it seems like to me) to work?
What do you think? Can be added in a follow-up patch if wanted, so for the current content:
Thanks!
Quentin
Re: [docs] [PATCH 1/2] dev-manual/layers.rst: yocto-check-layer: mention the --machines argument
Hi,
Quoted 35 lines · Quentin Schulz via lists.yoctoproject.org
Hi Antonin,
Quoted 17 lines · Antonin Godard via lists.yoctoproject.org
The yocto-check-layer script should be run with the --machines arguments to test the different machines present in a BSP layer. Mention it in the documentation.
[YOCTO #15974]
Cc Mark Hatle <[email protected]>Signed-off-by Antonin Godard <[email protected]>--- documentation/dev-manual/layers.rst | 9 +++++++++ 1 file changed, 9 insertions(+)documentation/dev-manual/layers.rst +0
-0documentation/dev-manual/layers.rst directory:: · line 384
Quoted 9 lines
documentation/dev-manual/layers.rst +6
-0@@ -376,6 +376,15 @@ directory:: Be sure to provide the actual directory for your layer as part of the command. +For :term:`BSP <Board Support Package (BSP)>` layers, the ``--machines`` +argument should be passed as part of the command:: + + $ source oe-init-build-env + $ yocto-check-layer your_layer_directory --machines <machine1> <machine2> ... +Considering the help text of the script, we should probably rather have the machines before the layer directory? I assume you may have tried and discovered that it doesn't work by simply swapping both, likely due to
https://github.com/python/cpython/issues/53584?
Quoted 4 lines
The answer to that is "--", as in:
yocto-check-layer --machines <machine1> <machine2> ... --
your_layer_directory
I agree, I also prefer separating with --, the command looks cleaner. I'll send a v2 with that.
Quoted 10 lines
I always wondered what my BSP layer would return to match this and I just tried from within a kas setup.
First thing... it seems it doesn't detect layer dependencies from bblayers.conf, so I have to make them explicit them from the command line via --dependency (which is fine but a bit odd if they already are in bblayers.conf?). Once that is done, BitBake complains because the layer is included twice (?????). So I instead sourced the script from within the kas container to another location, with thus an empty bblayers.conf and then it started.
On master I get:
INFO: meta-yocto-bsp already in .../build/conf/bblayers.conf. To capture initial signatures, layer under test should not present in BBLAYERS. Please remove meta-yocto-bsp from BBLAYERS.
I had to remove meta-yocto-bsp in the end. There's also a yocto-check-layer-wrapper script to start from a clean build env FWIW.
So maybe a more recent version of the script would've warned you?
Quoted 40 lines
I ended up calling
yocto-check-layer --machines jaguar puma-haikou ringneck-haikou tiger-haikou --dependency ../meta-openembedded/meta-python/ ../meta-rockchip/ ../meta-arm/meta-arm ../meta-arm/meta-arm-toolchain/ ../meta-openembedded/meta-oe/ -- ../meta-cherry-es/meta-bsp/
which is what's required to setup a BSP build for me.
The issue is that it seems to test more than just my layer?
[...]
INFO: Setting up for meta-python(LayerType.SOFTWARE), /work/meta-openembedded/meta-python
INFO: Adding layer meta-oe
INFO: Getting initial bitbake variables ...
INFO: Getting initial signatures ...
INFO: Adding layer meta-python
INFO: Starting to analyze: meta-python
INFO: Distro: poky
[...]
INFO: Setting up for meta-oe(LayerType.SOFTWARE), /work/meta-openembedded/meta-oe
INFO: Getting initial bitbake variables ...
INFO: Getting initial signatures ...
INFO: Adding layer meta-oe
INFO: Starting to analyze: meta-oe
INFO: Distro: poky
[...]
INFO: Setting up for meta-rockchip(LayerType.BSP), /work/meta-rockchip
INFO: Adding layer meta-arm
INFO: Adding layer meta-arm-toolchain
INFO: Getting initial bitbake variables ...
INFO: Getting initial signatures ...
INFO: Adding layer meta-rockchip
INFO: Starting to analyze: meta-rockchip
INFO: Distro: poky
[...]
etc....
Quoted 4 lines
Which is very surprising to me, why would we want to run the check against those layers? They are dependencies after all and of course since my machine only exists in my BSP layer, the test for my machine won't pass for meta-python without my layer for example.
Maybe it means that a layer can only compatible if its dependencies are also compatible? I think it's a fair assumption.
Quoted 6 lines
So I'm not sure what is supposed to happen here but I'm not sure what actually matters as output to this script :/
I would recommend to add a few words maybe on the --dependency argument and that it should be run from a clean build directory (at least it seems like to me) to work?
Yes, I think that can be part of the v2 as well, thanks - I was testing on meta-yocto-bsp which didn't have any dependency.
Quoted 4 lines
What do you think? Can be added in a follow-up patch if wanted, so for the current content:
Reviewed-by Quentin Schulz <[email protected]>
I'll remove it for the v2, but thanks!
Antonin
Signature · 3 lines
Antonin Godard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 2/2 test-manual/yocto-project-compatible.rst: fix a typo
In reply to Antonin GodardFix a typo in yocto-project-compatible.rst.
--- documentation/test-manual/yocto-project-compatible.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
documentation/test-manual/yocto-project-compatible.rst +1 -1
@@ -38,7 +38,7 @@ Benefits and flexible: it gives users the ultimate power to change pretty much any aspect of the system but as with most things, power comes with responsibility. The Yocto Project would like to see people able to mix and match BSPs with -distro configs or software stacks and be able to merge succesfully. +distro configs or software stacks and be able to merge successfully. Over time, the project identified characteristics in layers that allow them to operate well together. "anti-patterns" were also found, preventing layers from working well together.
Signature · 1 line
2.51.0
Re: [docs] [PATCH 2/2] test-manual/yocto-project-compatible.rst: fix a typo
Hi Antonin,
Quoted 3 lines · Antonin Godard via lists.yoctoproject.org
Fix a typo in
yocto-project-compatible.rst.Signed-off-by Antonin Godard <[email protected]>
Thanks!
Quentin