【问题标题】:adding patch and another git source does not work in yocto添加补丁和另一个 git 源在 yocto 中不起作用
【发布时间】:2021-08-28 10:45:04
【问题描述】:

我试图从另一个项目中添加另一个 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 的相同想法

【问题讨论】:

    标签: linux git kernel yocto patch


    【解决方案1】:

    我阅读了您的帖子并查看了 cross-localedef-native_%.bb。你的问题就在这里:

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

    如果您的 git repo 确实托管在 server 上,并且该名称通过 DNS 解析,并且大概在 repo 中还有类似 produc/kernel-modules/ 的路径,那么您的 fetch 将起作用,并且你的构建应该继续,很好。在 cross-localedef-native 配方中,有来自 github.com 和 sourceware.org 的 repo URI,它们确实可以解析,所以那里一切正常。

    填写您的实际 git repo 服务器名称(github.com、git.yoctoproject.org 等),确保您确实拥有 ssh 访问权限,因为您指定了它,这样您就可以了。

    【讨论】:

      猜你喜欢
      • 2017-05-07
      • 2015-05-21
      • 2021-11-26
      • 2011-06-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-14
      相关资源
      最近更新 更多