如何在arago项目构建中编写自己的配方包 [英] How to write own package for recipe in arago project build

查看:217
本文介绍了如何在arago项目构建中编写自己的配方包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在arago项目构建中编写自己的配方包?我几乎不知道它可以是bitbake文件.但是我怎么写,不知道.我在互联网上进行了搜索,但没有找到任何好的开始的资源.有人可以提供我链接或示例开始吗?

How can i write own package for recipe in arago project build? I know little bit that it can be bitbake files. But how can i write, no idea. I searched on internet, but failed to find any good source to start. can someone provide me link or example to start?

致谢
Linux学习者.

Regards
Linux Learner.

推荐答案

使用Bitbake使用Yocto创建自己的食谱:

将Yocto Project用于嵌入式系统.它的文档和支持很棒.您可以开始 Yocto项目.

Use Yocto Project for Embedded systems. It's documentation and support is awesome. You can get started Yocto Project.

建立自己的食谱(首次建立需要花费大量时间)

Build your own recipe(for the first time build takes quiet good amount of time)

获得Yocto项目:

按照给出的 Gumstix-YoctoProject-Repo 的分步过程进行操作,直到bitbake gumstix-console-image

Follow step-by-step procedure given Gumstix-YoctoProject-Repo till bitbake gumstix-console-image

现在,您的计算机上有了yocto项目.开始编写自己的食谱.我将向您展示如何创建世界问候食谱.

Now you got yocto project on your machine. Start writing your own recipes. I will show you how to create a hello world recipe.

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

1) goto /yocto/poky/<create a folder as meta-robot>
2) goto /yocto/poky/meta-robot/<create a folder as /recipes-robot> and <another folder /conf>
3) goto /yocto/poky/meta-robot/recipes-robot/<create another folder /hello>
4) goto /yocto/poky/meta-robot/recipes-robot/hello/<create a file as 'hello_2.7.bb'>
5) Paste this in your 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 

6)转到/yocto/poky/meta-robot/conf/<create a file as layer.conf>
7)将此粘贴到您的layer.conf文件

6) goto /yocto/poky/meta-robot/conf/<create a file as layer.conf>
7) paste this in your layer.conf file

# 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"

8)打开/yocto/build/conf/bblayers.conf文件
9)在bblayers文件
中添加您的配方文件夹路径 例如:/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

8) Open /yocto/build/conf/bblayers.conf file
9) Add your recipe folder path in bblayers file
ex: /home/xyz/yocto/poky/meta-robot \
10) open /yocto/poky/meta-gumstix-extras/recipes-images/gumstix/gumstix-console-image.bb file and under TOOLS_INSTALL add your recipe name i.e.hello \
11) Open your terminal type $ cd /yocto
12) $ source ./poky/oe-init-build-env
13) type bitbake gumstix-console-image

就是这样.带有您自己的包装的图像将在一段时间后准备就绪.

That's it. Your image with your own package will be ready in some time.

您可以在/yocto/build/tmp/deploy/images/

一切顺利.

这篇关于如何在arago项目构建中编写自己的配方包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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