Yocto 将自己的标头和库文件添加到 sdk

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

我想将

.h
.lib
文件添加到我自己创建的 SDK 配方中。 我使用 CMake 来构建我的库,使用 SDK 我可以构建它。 我的食谱名称是
served
。 (我想添加
served
https://github.com/meltwater/served 作为我自己的食谱)。 在我的
served_0.1.bb
文件中,我添加了以下内容:

BBCLASSEXTEND = "native nativesdk" 
RDEPENDS_${PN} += "nativesdk-served"

layer.conf
中我添加了:

TOOLCHAIN_TARGET_TASK_append = " served "

当我开始创建我的 SDK 时

bitbake core-image-base -c populate_sdk

错误:core-image-base-1.0-r0 do_populate_sdk:无法调用 dnf。命令'/home/yocto/videoMon/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info - y -c /home/yocto/videoMon/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/sdk/image/opt/poky/3.2.4/sysroots/cortexa72-poky- linux/etc/dnf/dnf.conf --setopt=reposdir=/home/yocto/videoMon/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/sdk/image/opt/ poky/3.2.4/sysroots/cortexa72-poky-linux/etc/yum.repos.d --installroot=/home/yocto/videoMon/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/ 1.0-r0/sdk/image/opt/poky/3.2.4/sysroots/cortexa72-poky-linux --setopt=logdir=/home/yocto/videoMon/build/tmp/work/raspberrypi4_64-poky-linux/core- image-base/1.0-r0/temp --repofrompath=oe-repo,/home/yocto/videoMon/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/oe-sdk- repo --nogpgcheck install packagegroup-base-extended packagegroup-core-boot packagegroup-core-standalone-sdk-target psplash-raspberrypi run-postinstsserved target-sdk-provides-dummy'返回1: DNF版本:4.2.23 缓存目录:/home/yocto/videoMon/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/sdk/image/opt/poky/3.2.4/sysroots/cortexa72-poky-linux /var/缓存/dnf 从 /home/yocto/videoMon/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/oe-sdk-repo 添加了 oe-repo 存储库 用户代理:回退到“libdnf”:无法检测操作系统或基础架构 回购:使用缓存:oe-repo oe-repo:使用 UTC 时间 2021 年 6 月 6 日星期日下午 03:50:26 的元数据。 上次元数据过期检查:UTC 时间 2021 年 6 月 6 日星期日下午 03:50:26 0:00:01 前。 --> 启动依赖解析 --> 依赖解析完成 错误: 问题:请求冲突

  • 没有提供served-1.0+git0+2eb36b83fa-r0.cortexa72所需的nativesdk-served(尝试将'--skip-broken'添加到 跳过可卸载的软件包)

错误:失败日志文件存储在: /home/yocto/videoMon/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/temp/log.do_populate_sdk.27092 错误:任务 (/home/yocto/videoMon/meta/recipes-core/images/core-image-base.bb:do_populate_sdk) 失败,退出代码为“1”

有人有想法吗?

最佳

sdk yocto bitbake yocto-recipe
1个回答
0
投票

假设您有一个

served
的配方,可以编译无错误。

将服务

.h
lib
文件添加到 sdk 的步骤是将以下行添加到 local.conf

TOOLCHAIN_TARGET_TASK_append = " served "

然后运行命令

bitbake core-image-base -c populate_sdk

您提供的配方中的以下几行会导致错误,并且 SDK 生成不需要这些行。请删除它们并尝试重新构建您的图像。

BBCLASSEXTEND = "native nativesdk" 
RDEPENDS_${PN} += "nativesdk-served"
© www.soinside.com 2019 - 2024. All rights reserved.