如何安装了Yocto文件/目录,但在任何软件包问题中未发货

发布于 2025-01-29 17:05:09 字数 2397 浏览 4 评论 0原文

我正在使用自定义食谱在rootf中安装软件包。我的食谱如下:

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

DESCRIPTION = "VPU libraries provided by fsl"
SUMMARY = "Copy mksd.sh script to image deployment area"
LICENSE = "CLOSED"

SRC_URI = " \
         file://smf_vpn_config.ovpn \
         file://ifplugd.action \
         file://get_mac.sh \
         file://gen_mac.sh \
         file://IP_SETTINGS.sh \
         file://network_config.sh \
         file://update_network.sh \
         file://check_lte_connection.sh \
         file://check_vpn_connection.sh \
         file://get_ip_address_of_interface.sh \
          "

do_install() {
install -d ${D}/etc/openvpn_config/
install -m 755 ${WORKDIR}/smf_vpn_config.ovpn ${D}/etc/openvpn_config/

install -d ${D}/etc/ifplugd/
install -m 755 ${WORKDIR}/ifplugd.action ${D}/etc/ifplugd/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/get_mac.sh ${D}/usr/bin/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/gen_mac.sh ${D}/usr/bin/

# Install network configuration files
install -d ${D}$/opt/smf/config/net/
install -m 666 ${WORKDIR}/IP_SETTINGS.sh ${D}//opt/smf/config/net/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/network_config.sh ${D}/usr/bin/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/update_network.sh ${D}/usr/bin/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/check_lte_connection.sh ${D}/usr/bin/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/check_vpn_connection.sh ${D}/usr/bin/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/get_ip_address_of_interface.sh ${D}/usr/bin/
}

FILES_${PN} += " \
/etc/openvpn_config/smf_vpn_config.ovpn \
/etc/ifplugd/ifplugd.action \
/usr/bin/get_mac.sh \
/usr/bin/gen_mac.sh \
/opt/* \
"

当我尝试构建此食谱时,我会

ERROR: extra-files-1.0-r0 do_package: QA Issue: extra-files: Files/directories were 
installed but not shipped in any package:
/opt
/opt/smf
/opt/smf/config
/opt/smf/config/net
/opt/smf/config/net/IP_SETTINGS.sh
Please set FILES such that these items are packaged. Alternatively if they are unneeded, 
avoid installing them or delete them within do_install.
extra-files: 5 installed and not shipped files. [installed-vs-shipped]
ERROR: extra-files-1.0-r0 do_package: Fatal QA errors were found, failing task.

在其他论坛帖子上遇到以下错误,我确实观察到,要指向当前目录,应该使用元/conf/conf/bitbake.conf中给出的变量。但是那里没有提及 /选择目录。

另外,我在柯克斯通分公司 提前致谢

I am using a custom recipe to install packages in my rootfs. My recipe is as follows:

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

DESCRIPTION = "VPU libraries provided by fsl"
SUMMARY = "Copy mksd.sh script to image deployment area"
LICENSE = "CLOSED"

SRC_URI = " \
         file://smf_vpn_config.ovpn \
         file://ifplugd.action \
         file://get_mac.sh \
         file://gen_mac.sh \
         file://IP_SETTINGS.sh \
         file://network_config.sh \
         file://update_network.sh \
         file://check_lte_connection.sh \
         file://check_vpn_connection.sh \
         file://get_ip_address_of_interface.sh \
          "

do_install() {
install -d ${D}/etc/openvpn_config/
install -m 755 ${WORKDIR}/smf_vpn_config.ovpn ${D}/etc/openvpn_config/

install -d ${D}/etc/ifplugd/
install -m 755 ${WORKDIR}/ifplugd.action ${D}/etc/ifplugd/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/get_mac.sh ${D}/usr/bin/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/gen_mac.sh ${D}/usr/bin/

# Install network configuration files
install -d ${D}$/opt/smf/config/net/
install -m 666 ${WORKDIR}/IP_SETTINGS.sh ${D}//opt/smf/config/net/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/network_config.sh ${D}/usr/bin/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/update_network.sh ${D}/usr/bin/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/check_lte_connection.sh ${D}/usr/bin/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/check_vpn_connection.sh ${D}/usr/bin/

install -d ${D}/usr/bin/
install -m 755 ${WORKDIR}/get_ip_address_of_interface.sh ${D}/usr/bin/
}

FILES_${PN} += " \
/etc/openvpn_config/smf_vpn_config.ovpn \
/etc/ifplugd/ifplugd.action \
/usr/bin/get_mac.sh \
/usr/bin/gen_mac.sh \
/opt/* \
"

When I try to build this recipe, I get the following error

ERROR: extra-files-1.0-r0 do_package: QA Issue: extra-files: Files/directories were 
installed but not shipped in any package:
/opt
/opt/smf
/opt/smf/config
/opt/smf/config/net
/opt/smf/config/net/IP_SETTINGS.sh
Please set FILES such that these items are packaged. Alternatively if they are unneeded, 
avoid installing them or delete them within do_install.
extra-files: 5 installed and not shipped files. [installed-vs-shipped]
ERROR: extra-files-1.0-r0 do_package: Fatal QA errors were found, failing task.

Looking at other forum post, I did observed that to point towards current directory one should use variables given in meta/conf/bitbake.conf. But there is nothing mentioned there for /opt directory.

Also, I am on the kirkstone branch
Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

看轻我的陪伴 2025-02-05 17:05:09

我发现了实际上导致错误的原因。在Yocto的Kirkstone分支中,下划线已切换为结肠覆盖。因此,我将文件_ $ {pn}更改为文件:$ {pn},它起作用。

I found out what was actually causing the error. In kirkstone branch of yocto the underscore has been switched to colon for overrides. So I change FILES_${PN} to FILES:${PN} and it worked.

蓝礼 2025-02-05 17:05:09

您可以使用base_prefix变量,希望这会有所帮助:

FILES_${PN} += " \
    ${sysconfdir}/openvpn_config/smf_vpn_config.ovpn \
    ${sysconfdir}/ifplugd/ifplugd.action \
    ${bindir}/get_mac.sh \
    ${bindir}/gen_mac.sh \
    ${base_prefix}/opt/* \
"

You can use the base_prefix variable, hope this helps:

FILES_${PN} += " \
    ${sysconfdir}/openvpn_config/smf_vpn_config.ovpn \
    ${sysconfdir}/ifplugd/ifplugd.action \
    ${bindir}/get_mac.sh \
    ${bindir}/gen_mac.sh \
    ${base_prefix}/opt/* \
"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文