如何在yocto中使用动态图层?

问题描述 投票:0回答:1

我是 Yocto 的新手。我正在使用 Yocto scrapegap 版本并克隆了 poky。我想添加对 bcc 和 bpftrace 的支持,因此尝试添加 meta-clang 层。

该图层为我显示了

$ bitbake-layers show-layers
NOTE: Starting bitbake server...
layer                 path                                                                    priority
========================================================================================================
core                  /mnt/secondary/poky/meta                                                5
yocto                 /mnt/secondary/poky/meta-poky                                           5
yoctobsp              /mnt/secondary/poky/meta-yocto-bsp                                      5
openembedded-layer    /mnt/secondary/poky/meta-openembedded/meta-oe                           5
clang-layer           /mnt/secondary/poky/meta-clang

这就是我的 poky 目录结构的样子(meta-clang 克隆在 poky 中):

$ ls
bitbake        LICENSE.GPL-2.0-only  meta-clang         meta-yocto-bsp      README.poky.md
build          LICENSE.MIT           meta-openembedded  oe-init-build-env   README.qemu.md
contrib        MAINTAINERS.md        meta-poky          README.hardware.md  scripts
documentation  MEMORIAM              meta-selftest      README.md           SECURITY.md
LICENSE        meta                  meta-skeleton      README.OE-Core.md

但问题是我没有看到

bcc
食谱,但
bpftrace
食谱看起来很好。

$ bitbake-layers show-recipes | grep bpftrace
bpftrace:
$ bitbake-layers show-recipes | grep bcc
$

meta-clang
的来源中我看到两种食谱都存在。为什么看不到
bcc
?我该如何修复它?

meta-clang/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.29.1.bb
meta-clang/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.20.1.bb

构建按预期失败了:

$ bitbake core-image-minimal
Loading cache: 100% |                                                                     | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |####################################################################| Time: 0:00:30
Parsing of 1888 .bb files complete (0 cached, 1888 parsed). 3246 targets, 116 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'bcc' (but /mnt/secondary/poky/meta-clang/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.20.1.bb DEPENDS on or otherwise requires it). Close matches:
  bc
  byacc
NOTE: Runtime target 'bpftrace' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['bpftrace', 'bcc']
ERROR: Required build target 'core-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-minimal', 'bpftrace', 'bcc']

Summary: There were 2 ERROR messages, returning a non-zero exit code.
yocto bitbake bpf bcc bpftrace
1个回答
0
投票

请注意,meta-clang 中的

bcc
配方位于
dynamic-layer
meta-python
下,这意味着只有将
meta-python
添加到
BBLAYERS
中才会被激活,查看
bitbake-layers show-layers
的输出上面我看到你的项目没有将元Python添加到层列表中。所以请添加它。您可以直接编辑
conf/bblayers.conf
文件并手动添加或使用
bitbake-layers add-layer
参见 https://docs.yoctoproject.org/dev/dev-manual/layers.html#adding-a-layer-using-the-bitbake -图层脚本

© www.soinside.com 2019 - 2024. All rights reserved.