你好
我正在玩 Yocto、Raspberry Pi 和我编写的一些代码。现在我希望 Yocto 正在构建包含我编写的程序的图像。我想知道如何设置 fetcher 以从本地 git repro 中获取。
我的设置很简单。代码在目录中:
/home/user/git/myTest
我将该目录链接到我的 Yocto 元层的食谱目录中。
/home/user/poky/meta-test/myApp/myTest
因为是本地git repro,所以有“.git”文件夹。
/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:
SUMMARY = "test"
SECTION = "app"
LICENSE = "CLOSED"
inherit cmake
SRCREV = "${AUTOREV}"
SRC_URI = "git://.git"
S = "${WORKDIR}/git"
我确实检查了 Yocto/Bitbake 文档。但是我没有找到如何做的例子。 有什么想法吗?
最佳答案
bitbake
中的 GIT Fetcher supports different protocols但具有相当奇特和非标准的语法。在你的情况下,它应该是这样的
SRC_URI = "git:///home/user/git/myTest/;protocol=file"
关于git - 如何设置 Yocto 配方以从本地 git 源构建?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49535881/