如何设置Yocto食谱以从本地git来源构建? [英] How to setup an Yocto recipe to build from a local git source?

查看:724
本文介绍了如何设置Yocto食谱以从本地git来源构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hej

我在玩Yocto,Raspberry Pi和我编写的一些代码.现在,我希望Yocto正在构建包含我编写的程序的图像.我想知道如何设置提取器以从本地git repro提取.

I am playing a bit around with Yocto, a Raspberry Pi and some code I wrote. Now I want that Yocto is building an image including the program I wrote. I like to know how to setup the fetcher to fetch from a local git repro.

我的设置很简单.代码在目录中:

My setup is simple. The code is in the directory:

/home/user/git/myTest

我将目录链接到Yocto元层的食谱目录中.

I linked the directory into my recipe directory of my Yocto meta-layer.

/home/user/poky/meta-test/myApp/myTest

由于它是本地git repro,因此存在".git"文件夹.

Because it is a local git repro, there is the ".git" folder.

/home/user/git/myTest/.git

文件更多:

/home/user/git/myTest/CMakeLists.txt
/home/user/git/myTest/src/main.cpp
/home/user/git/myTest/src/...

我想知道如何设置食谱以使用git fetcher:

I like to know how to setup my recipe to use the git fetcher:

SUMMARY = "test"
SECTION = "app"
LICENSE = "CLOSED"

inherit cmake

SRCREV = "${AUTOREV}"

SRC_URI = "git://.git"

S = "${WORKDIR}/git"

我确实检查了Yocto/Bitbake文档.但是我没有找到一个如何做到这一点的例子. 有什么想法吗?

I did check the Yocto/Bitbake documentation. But I did not find an example how to do it. Any ideas?

推荐答案

bitbake中的GIT提取程序

GIT Fetcher in bitbake supports different protocols but with rather peculiar and non-standard syntax. In your case it should be something like

SRC_URI = "git:///home/user/git/myTest/;protocol=file"

这篇关于如何设置Yocto食谱以从本地git来源构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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