从 yocto 配方创建 simlink
Creating simlink from yocto recipe
我正在从 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
}
除了复制原始文件之外,我怎样才能为每个文件生成符号 link filename.so?
谢谢。
试试这个:
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}
}
我正在从 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
}
除了复制原始文件之外,我怎样才能为每个文件生成符号 link filename.so?
谢谢。
试试这个:
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}
}