【问题标题】:Adding new recipe in yocto在 yocto 中添加新食谱
【发布时间】:2018-10-24 07:19:04
【问题描述】:

我是 Yocto 和 Embedded 的新手,想要这样的东西,

$ git clone https://github.com/babelouest/orcania.git
$ git clone https://github.com/babelouest/yder.git
$ git clone https://github.com/babelouest/ulfius.git
$ cd orcania/
$ make && sudo make install
$ cd ../yder/
$ make && sudo make install
$ cd ../ulfius/
$ make && sudo make install

请帮助创建层和配方。

谢谢。

【问题讨论】:

    标签: yocto bitbake


    【解决方案1】:

    我已经创建了配方和层配置来编译所有提到的软件。

    注意:默认情况下禁用对 systemd 的依赖。如果您需要在带有 systemd 的系统中运行,您可以启用它们并添加支持。

    conf/layer.conf:

    # We have a conf and classes directory, add to BBPATH
    BBPATH .= ":${LAYERDIR}"
    
    # We have a recipes-* directories, add to BBFILES
    BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
        ${LAYERDIR}/recipes-*/*/*.bbappend"
    
    BBFILE_COLLECTIONS += "babelouest"
    BBFILE_PATTERN_babelouest = "^${LAYERDIR}/"
    BBFILE_PRIORITY_babelouest = "6"
    
    # Set a variable to get to the top of the meta-layer location
    HAB_BASE := '${LAYERDIR}'
    

    recipes-babelouest/orcania/orcania_git.bb:

    DESCRIPTION = "Potluck with different functions for different purposes that can be shared among C programs"
    HOMEPAGE = "https://github.com/babelouest/orcania"
    LICENSE = "LGPL-2.1"
    LIC_FILES_CHKSUM = "file://LICENSE;md5=fc178bcd425090939a8b634d1d6a9594"
    
    inherit cmake pkgconfig
    SRC_URI = "git://github.com/babelouest/orcania"
    SRCREV = "${AUTOREV}"
    S = "${WORKDIR}/git"
    
    DEPENDS = "jansson"
    RDEPENDS_${PN} = "jansson"
    

    食谱-babelouest/yder/yder_git.bb:

    DESCRIPTION = "Logging library for C applications"
    HOMEPAGE = "https://github.com/babelouest/yder"
    LICENSE = "LGPL-2.1"
    LIC_FILES_CHKSUM = "file://LICENSE;md5=40d2542b8c43a3ec2b7f5da31a697b88"
    
    inherit cmake pkgconfig
    SRC_URI = "git://github.com/babelouest/yder"
    SRCREV = "${AUTOREV}"
    S = "${WORKDIR}/git"
    
    DEPENDS = "jansson orcania"
    RDEPENDS_${PN} = "jansson orcania"
    EXTRA_OECMAKE += "-DWITH_JOURNALD=off"
    

    食谱-babelouest/ulfius/ulfius_git.bb:

    DESCRIPTION = "Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language. Can stream large amount of data, integrate JSON data with Jansson, and create websocket services"
    HOMEPAGE = "https://babelouest.github.io/ulfius/"
    LICENSE = "LGPL-2.1"
    LIC_FILES_CHKSUM = "file://LICENSE;md5=40d2542b8c43a3ec2b7f5da31a697b88"
    
    inherit cmake pkgconfig
    SRC_URI = "git://github.com/babelouest/ulfius"
    SRCREV = "${AUTOREV}"
    S = "${WORKDIR}/git"
    
    DEPENDS = "gnutls jansson libmicrohttpd"
    RDEPENDS_${PN} = "gnutls jansson libmicrohttpd"
    EXTRA_OECMAKE += "-DWITH_JOURNALD=off"
    

    这一层依赖于下面的层,

    1. meta-openembedded/meta-oe
    2. poky/元

    您可以将它们包含在 bblayer.conf 中,或者将此层命名为 meta-babelouest 并包含。所有文件都添加到我的 github gist here

    【讨论】:

    • 认真的吗?了解一些有关 yocto 的基础知识。在这里,您有三个 bitbake 配方,因此您可以使用 bitbake ulfius yder orcania 编译它们。 babelouest 只是图层名称。您可以将其命名为任何名称。
    • 嗨 Parthiban,感谢您的回复,我添加了它们并尝试使用命令“bitbake babelouest”进行编译,但出现错误“错误:Nothing PROVIDES 'babelouest'”,--> 我创建了 meta-babelouest目录,|_ conf/layer.conf |_recipes_babelouest |_orcania/orcania_git.bb | |_yder/yder_git.bb | |_ulfius/ulfius_git.bb
    • @ShishirKumarSingh:不知道你为什么删除了之前的评论。已经回答了!
    猜你喜欢
    • 1970-01-01
    • 2021-10-23
    • 1970-01-01
    • 2021-05-18
    • 2021-04-16
    • 2019-12-05
    • 2018-07-17
    • 2020-11-23
    • 1970-01-01
    相关资源
    最近更新 更多