Yocto 将本地 tarball 路径添加到配方问题

问题描述 投票:0回答:1

我在为 BeagleBone Black 构建 yocto 发行版时遇到这样的问题。我正在尝试从位于以下位置的本地文件夹添加 Ninvaders 游戏(基于角色的空间游戏,用于在终端上运行以练习 yocto。)

file:///home/user/Downloads/ninvaders-0.1.1.tar.gz
我添加了一个文件夹并在食谱扩展上给出了食谱:(我知道将其放置在这里没有意义,但出于教育目的)

ninvaders.inc

DESCRIPTION = "ncurses-based clone of space invaders" SRC_URI = "${file:///home/user/Downloads/${BP}.tar.gz" LICENSE = ""
和
ninvaders_0.1.1.bb

require ninvaders.inc
但是当我尝试跑步时

bitbake ninvaders
它给了我这个错误:

Loading cache: 100% |####################################################################################| Time: 0:00:00 Loaded 1362 entries from dependency cache. ERROR: ExpansionError during parsing /home/user/yocto-labs/poky/meta/recipes-extended/ninvaders/ninvaders_0.1.1.bb:00:00 Traceback (most recent call last): File "Var <do_fetch[file-checksums]>", line 1, in <module> File "/home/user/yocto-labs/poky/bitbake/lib/bb/fetch2/__init__.py", line 1224, in get_checksum_file_list(d=<bb.data_smart.DataSmart object at 0x7fc53dc5ae90>): """ > fetch = Fetch([], d, cache = False, localonly = True) File "/home/user/yocto-labs/poky/bitbake/lib/bb/fetch2/__init__.py", line 1682, in Fetch.__init__(urls=['${file:///home/user/Downloads/ninvaders-0.1.1.tar.gz'], d=<bb.data_smart.DataSmart object at 0x7fc53dc5ae90>, cache=False, localonly=True, connection_cache=None): try: > self.ud[url] = FetchData(url, d, localonly) except NonLocalMethod: File "/home/user/yocto-labs/poky/bitbake/lib/bb/fetch2/__init__.py", line 1309, in FetchData.__init__(url='${file:///home/user/Downloads/ninvaders-0.1.1.tar.gz', d=<bb.data_smart.DataSmart object at 0x7fc53dc5ae90>, localonly=True): if not self.method: > raise NoMethodError(url) bb.data_smart.ExpansionError: Failure expanding variable do_fetch[file-checksums], expression was ${@bb.fetch.get_checksum_file_list(d)} ${@get_lic_checksum_file_list(d)} which triggered exception NoMethodError: Could not find a fetcher which supports the URL: '${file:///home/user/Downloads/ninvaders-0.1.1.tar.gz' The variable dependency chain for the failure is: do_fetch[file-checksums] ERROR: Parsing halted due to errors, see error messages above Summary: There were 2 ERROR messages, returning a non-zero exit code. I cannot find any solution to this case. Could you help me? thank you.
    
embedded-linux yocto bitbake yocto-recipe
1个回答
0
投票
错误消息清楚地表明您的食谱有什么问题:

Could not find a fetcher which supports the URL: '${file:///home/user/Downloads/ninvaders-0.1.1.tar.gz'
请参阅获取器的文档:

https://docs.yoctoproject.org/bitbake/2.6/bitbake-user-manual/bitbake-user-manual-fetching.html#local-file-fetcher-file

源 URI 必须采用以下格式:

SRC_URI = "file:///home/user/Downloads/${BP}.tar.gz"


但你指定了

SRC_URI = "${file:///home/user/Downloads/${BP}.tar.gz"


    

© www.soinside.com 2019 - 2024. All rights reserved.