【问题标题】:Creating simlink from yocto recipe [closed]从 yocto 配方创建 simlink [关闭]
【发布时间】:2021-07-04 17:42:56
【问题描述】:

我正在以 name.so.version 的形式从存储库下载库

SRC_URI_x86-64 = "fetch location"

do_install() {
    install -d ${D}${libdir}

    
    for file in ${WORKDIR}/location/lib*;do
        install -m 0644 $file ${D}${libdir}
    done
}

除了处理原始文件之外,我还能如何为每个文件生成符号链接 filename.so?

谢谢。

【问题讨论】:

标签: linux yocto


【解决方案1】:

试试这个:

do_install() {
    install -d ${D}${libdir}

    # Install all libraries into the image folder
    for file in ${WORKDIR}/location/lib*; do
        install -m 0644 $file ${D}${libdir}
    done

    # Change directory to the image folder
    cd ${D}${libdir}
    for libfile in lib*; do
        # Strip the version
        stripped_libversion=$(echo $libfile | sed 's/\.so.*/.so/')
        ln -sf $libfile $stripped_libversion
    done

    # Go back to working directory ${S} or ${WORKDIR}
    cd ${S}
}

【讨论】:

    猜你喜欢
    • 2020-11-28
    • 2018-09-06
    • 2020-06-08
    • 2020-08-17
    • 1970-01-01
    • 2018-09-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多