【问题标题】:Extacting tar.gz source code downloaded with wget yocto in specified directory解压使用 wget yocto 下载的 tar.gz 源代码到指定目录
【发布时间】:2021-09-09 11:54:40
【问题描述】:

当我们使用 git 时,我希望在我的 yocto bb 文件中提取一个 tar.gz 到指定文件夹(如 destsuffix)中的选项。

我尝试了以下语法,但它不起作用:

SRC_URI += "http://nwl.cc/pub/cryptodev-linux/cryptodev-linux-1.9.tar.gz;name=cryptodev;subpath=${S}/drivers/cryptodev"

我已经尝试使用 destsuffix,但它也不起作用:

SRC_URI += "http://nwl.cc/pub/cryptodev-linux/cryptodev-linux-1.9.tar.gz;name=cryptodev;destsuffix=${S}/drivers/cryptodev"

如何在指定目录提取源代码?

【问题讨论】:

    标签: kernel yocto


    【解决方案1】:

    查看解压文档here,您必须改用subdir

    我为此创建了一个简单的配方来测试它,它运行良好:

    SUMMARY = "Example recipe to unpack to custom distination"
    LICENSE = "MIT"
    SRC_URI = "file://file1.tar.xz;subdir=${S}/dir1/dir2/dir3/"
    S = "${WORKDIR}"
    

    请注意,我的工作目录中不存在 dir1/dir2/dir3,因此 Yoto 创建了它们并将 file1 提取到 ${S}/dir1/dir2/dir3

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-11-07
      • 1970-01-01
      • 2019-06-14
      • 2019-05-30
      • 2012-12-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多