簡體   English   中英

yocto 配方中定義的應用程序/二進制文件的位置在哪里?

[英]Where's the location of the app/binary defined in a yocto recipe?

我有一個以下配方,它運行一個所述服務,該服務反過來在啟動時運行一個應用程序,但我試圖了解應用程序的位置在哪里定義,最終在 sysfs 映像中。

目前, appSource二進制文件(在Makefile中定義)存儲在/usr/bin中,但我不確定目標位置( /usr/bin )的定義位置。

以下命令導致

$ bitbake -e appSource | grep ^FILES_${PN}

FILES_appSource="/usr/bin/* /usr/sbin/* /usr/libexec/* /usr/lib/lib*.so.*             /etc /com /var             /bin/* /sbin/*             /lib/*.so.*             /lib/udev /usr/lib/udev             /lib/udev /usr/lib/udev

這是食譜

inherit autotools-brokensep pkgconfig

DESCRIPTION = "A sample recipe"
LICENSE = "CLOSED"

DEPENDS = "glib-2.0"

FILESPATH =+ "${THISDIR}:"
SRC_URI = "file://appSource"
S = "${WORKDIR}/appSource""

FILES_${PN} += "${systemd_unitdir}/*"

INIT_MANAGER = "systemd"

do_install_append() {   
   if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
      install -d ${D}/etc/initscripts
      install -d ${D}${systemd_unitdir}/system
      install -m 0644 ${WORKDIR}/appService/appService.service ${D}${systemd_unitdir}/system/appService.service
      install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/
      ln -sf ${systemd_unitdir}/system/appService.service  ${D}${systemd_unitdir}/system/multi-user.target.wants/appService.service
  fi
}

這是我發現的:

您正在inherit具有以下內容的autotools-brokensep

# Autotools class for recipes where separate build dir doesn't work
# Ideally we should fix software so it does work. Standard autotools supports
# this.
inherit autotools
B = "${S}"

因此,它inherit了具有do_install內容的autotools

autotools_do_install() {
    oe_runmake 'DESTDIR=${D}' install
    # Info dir listing isn't interesting at this point so remove it if it exists.
    if [ -e "${D}${infodir}/dir" ]; then
        rm -f ${D}${infodir}/dir
    fi
}

因此,它將Makefileinstall目標運行到${D}中,即${WORKDIR}/image

因此,我假設您的Makefile具有將二進制文件復制到/usr/bininstall目標。

對於FILES變量內容,這是在bitbake.conf中定義的:

FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \ ...

提供您的Makefile以確認我的假設,或者我對該主題進行進一步研究。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM