如何使用包组将外部配方集成到 yocto 图像中? [英] How to integrate external recipes into yocto image using packagegroup?

查看:34
本文介绍了如何使用包组将外部配方集成到 yocto 图像中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是来自 STM 的 yocto 发行版:https://wiki.st.com/stm32mpu-ecosystem-v1/wiki/STM32MP1_Distribution_Package

I am using a yocto distribution from STM: https://wiki.st.com/stm32mpu-ecosystem-v1/wiki/STM32MP1_Distribution_Package

目录结构如下

openstlinux-20-02-19  OpenSTLinux distribution
├── layers 
│    ├── meta-openembedded                Collection of layers for the OpenEmbedded-Core universe (OpenEmbedded standard)
│    ├── meta-qt5                         QT5 layer for OpenEmbedded (standard)
│    ├── meta-st
│    │   ├── meta-st-openstlinux          STMicroelectronics layer that contains the frameworks and images settings for the OpenSTLinux distribution
│    │   ├── meta-st-stm32mp              STMicroelectronics layer that contains the description of the BSP for the STM32 MPU devices
│    │   │   ├── recipes-bsp
│    │   │   │   ├── alsa                 Recipes for ALSA control configuration
│    │   │   │   ├── drivers              Recipes for Vivante GCNANO GPU kernel drivers
│    │   │   │   ├── trusted-firmware-a   Recipes for TF-A
│    │   │   │   └── u-boot               Recipes for U-Boot
│    │   │   ├── recipes-extended
│    │   │   │   ├── linux-examples       Recipes for Linux examples for STM32 MPU devices
│    │   │   │   ├── m4coredump           Recipes for script to manage coredump of cortexM4
│    │   │   │   └── m4projects           Recipes for firmware examples for Cortex M4
│    │   │   ├── recipes-graphics
│    │   │   │   ├── gcnano-userland      Recipes for Vivante libraries OpenGL ES, OpenVG and EGL (multi backend)
│    │   │   │   └── [...]
│    │   │   ├── recipes-kernel
│    │   │   │   ├── linux                Recipes for Linux kernel
│    │   │   │   └── linux-firmware       Recipes for Linux firmwares (example, Bluetooth firmware)
│    │   │   ├── recipes-security
│    │   │   │   └── optee                Recipes for OPTEE
│    │   │   ├── recipes-st
│    │   │   │   └── images               Recipes for the bootfs and userfs partitions binaries
│    │   │   └── [...]
│    │   ├── meta-st-stm32mp-addons       STMicroelectronics layer that helps managing the STM32CubeMX integration
│    │   └── scripts
│    │       ├── envsetup.sh              Environment setup script for Distribution Package
│    │       └── [...]
│    ├── meta-timesys                     Timesys layer for OpenEmbedded (standard)
│    └── openembedded-core                Core metadata for current versions of OpenEmbedded (standard)

我从 openembeddedlayers 克隆了一个层,并将其添加到构建目录中的 bblayers 层文件中...现在,我想做的是制作一个 packagegroup.bb 文件,并将该层和所有其他层的配方添加到该包组文件中,以便在我对图像进行位烘焙时将其添加到我的图像中.

I have cloned a layer from openembeddedlayers and added it into bblayers layers file in the build directory... Now, what i would like to do is to make a packagegroup.bb file and add the recipes from that layers and all the other layers into that packagegroup file so that it get added into my image when i bitbake the image.

我的包组文件看起来像这样

My packagegroup file look like this

SUMMARY = "packagegroup containing packages  
client"LICENSE = "MIT"
inherit packagegroup
RDEPENDS_${PN} = "\
nano \
tmux \  
python3-pyserial \  
python3-paho-mqtt \  
python3-pymodbus \  
sqlite3 \  
python-pysqlite \  
python3-sqlite3 \  
"

现在,我应该把这个文件放在哪里,我应该把它添加到我的项目中的什么位置?我是 yocto 的新手,无法理解这一点.

Now, where should i put this file and also where should i add it in my project? i am quite new in yocto and not able to understand this.

推荐答案

Packagegroups 只是用于所有意图和目的的 bitbake 配方.因此,您可以简单地创建一个相对于您的图像目录的新目录,并将其放在那里.从历史上看,我已经这样做了

Packagegroups are just bitbake recipes for all intents and purposes. Therefore, you can simply create a new directory relative to your image directory, and put it there. Historically, I've done this

<path to>/recipes-images/images
<path to>/recipes-images/packagegroups

然后只需将您的包组文件放在 packagegroups 目录中.只要你的图层和元目录配置正确,就会被找到.

Then just put your packagegroup file in the packagegroups directory. As long as your layers and meta directory are configured correctly, they will be found.

编辑我应该提一下,您也可以将包组文件也放在与图像相同的目录中.如果您只有一两个,这可能有意义.

EDIT I should mention you can also just put a packagegroup file in the same directory as your images as well. If you only have one or two, this may make sense.

你没有自己的元层,这意味着你要么跳过包组并将每个配方添加到你的 local.conf 中,要么创建你自己的元层.local.conf 选项会更快/更容易.

You don't have your own meta layer, which means you either skip packagegroups and add each recipe to your local.conf, or create your own meta layer. The local.conf option would be much faster/easier.

这篇关于如何使用包组将外部配方集成到 yocto 图像中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆