首页 > 解决方案 > 添加补丁和另一个 git 源在 yocto 中不起作用

问题描述

我试图从另一个项目中添加另一个 git 源代码和一个补丁,如bbappend文件中的 follwoing(仅供参考,bb我有第一个 git repo,我在其中获得了我的内核源代码并且它可以工作):

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRCREV_my_modules = "${AUTOREV}"
SRC_URI += "git://server/produc/kernel-modules;protocol=ssh;branch=master;name=my_modules;destsuffix=${S}/my_modules"
SRC_URI += "file://drivers_makefile.patch"

问题是当我尝试构建如下:

bitbake -c cleanall linux
bitbake linux

更改未考虑在内,没有从 git 获取源,并且未应用补丁

当我尝试在 git URI 或补丁名称中出错时,bitbake 检测到问题并显示错误,即使是 git URI (

ssh: Could not resolve hostname server: Name or service not known
fatal: Could not read from remote repository.

) 甚至在补丁文件名中。

仅供参考,当我尝试在 do_compile_append() 中向新源添加一些符号链接时,它可以工作并创建符号链接,但当然链接是针对不存在的源代码完成的。

我看不出有什么问题?你能帮我找到解决方案吗?

注意:我遵循了 meta/recipes-core/glibc/cross-localedef-native_2.22.bb 的相同想法

标签: linuxgitkernelyoctopatch

解决方案


I read your post and also took a look at cross-localedef-native_%.bb. Your problem is right here:

SRC_URI += "git://server/produc/kernel-modules;protocol=ssh;branch=master;name=my_modules;destsuffix=${S}/my_modules"

If your git repo were indeed hosted at server and that name resolved via DNS, and presumably there was also a path like produc/kernel-modules/ in the repo, your fetch would work, and your build should continue, just fine. In the cross-localedef-native recipe there are repo URIs from github.com and sourceware.org, which do indeed resolve, so everything works well there.

Fill in your actual git repo server name (github.com, git.yoctoproject.org, whatever), make sure you really have ssh access since you're specifying that, and you'll be good.


推荐阅读