Emb*_*mer 2 linux cross-compiling embedded-linux openembedded bitbake
如何在arago项目构建中编写自己的配方包?我知道它可以是bitbake文件.但我怎么写,不知道.我在互联网上搜索,但没有找到任何好的来源开始.有人可以提供链接或示例开始吗?
关心
Linux学习者.
使用Bitbake使用Yocto创建自己的食谱:
使用Yocto Project for Embedded systems.它的文档和支持非常棒.你可以开始使用Yocto Project.
建立自己的食谱(第一次构建需要安静的时间)
获得Yocto项目:
给出Gumstix-YoctoProject-Repo直到的逐步程序bitbake gumstix-console-image
现在你在你的机器上安装了yocto项目.开始编写自己的食谱.我将向您展示如何创建一个hello world配方.
1)转到/yocto/poky/<create a folder as meta-robot>
2)转到/yocto/poky/meta-robot/<create a folder as /recipes-robot> and <another folder /conf>
3)转到/yocto/poky/meta-robot/recipes-robot/<create another folder /hello>
4)转到/yocto/poky/meta-robot/recipes-robot/hello/<create a file as 'hello_2.7.bb'>
5)粘贴在你的hello_2.7.bb
DESCRIPTION = "GNU Helloworld application"
SECTION = "examples"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
PR = "r0"
SRC_URI[md5sum] = "fc01b05c7f943d3c42124942a2a9bb3a"
SRC_URI[sha256sum] = "fd593b5bcf6d1bb6d7d1bb7eefdccdc0010cf2c4985ccb445ef490f768b927c0"
SRC_URI = "ftp://ftp.gnu.org/gnu/hello/hello-2.7.tar.gz"
inherit autotools gettext
Run Code Online (Sandbox Code Playgroud)
6)转到/yocto/poky/meta-robot/conf/<create a file as layer.conf>
7)将其粘贴到您的layer.conf文件中
# We have a conf directory, append to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have a recipes directory, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "meta-robot"
BBFILE_PATTERN_meta-robot := "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-robot = "7"
Run Code Online (Sandbox Code Playgroud)
8)打开/yocto/build/conf/bblayers.conf文件
9)在bblayers文件
ex:/home/xyz/yocto/poky/meta-robot \
10)打开/yocto/poky/meta-gumstix-extras/recipes-images/gumstix/gumstix-console-image.bb文件中添加你的食谱文件夹路径,然后TOOLS_INSTALL添加你的食谱名称,即hello \
11)打开您的终端类型$ cd /yocto
12)$ source ./poky/oe-init-build-env
13)类型bitbake gumstix-console-image
而已.使用您自己的包装的图像将在一段时间内准备就绪.
你可以找到你的形象 /yocto/build/tmp/deploy/images/
祝一切顺利.
| 归档时间: |
|
| 查看次数: |
5308 次 |
| 最近记录: |