2017-05-05 3 views
0

私はyoctoにかなり新しく、autotoolsとsystemdから継承したレシピで苦労しています。Bitbake Autotools and Systemd

Systemdはディストリビューションに正しく設定されていますが、他のレシピはそれをそのまま使用しますが、autotoolsから継承しません。ここで

はレシピのための私のソースコードである:ここで

DESCRIPTION = "Single Channel gateway" 

LICENSE = "GPLv2" 
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" 

DEPENDS = "wiringpi" 
SRCREV = "c3cf15f6f3db46ec554de873326d253ee0508ea4" 

SRC_URI = "git://github.com/ArnaudPec/single_chan_pkt_fwd.git;protocol=git;branch=master \ 
      file://sgw.service" 

S = "${WORKDIR}/git/" 

inherit autotools systemd 

PARALLEL_MAKE = "" 

SYSTEMD_PACKAGES = "${PN}" 
SYSTEMD_SERVICE_${PN} = " sgw.service" 

FILES_${PN} += " ${systemd_system_unitdir}/sgw.service" 

do_install() { 
    install -d ${D}${systemd_system_unitdir} 
    install -m 0644 ${WORKDIR}/sgw.service ${D}${systemd_system_unitdir} 
} 

は私のサービスファイルです:

[Unit] 
Description=Single Channel Gateway LoRaWAN service 
After=multi-user.target 

[Service] 
Type=oneshot 
ExecStart=/usr/bin/sgw 
RemainAfterExit=yes 

[Install] 
WantedBy=multi-user.target 

do_packageは、その出力で失敗します。あなたの助けを

ERROR: sgw-1.0-r0 do_package: SYSTEMD_SERVICE_sgw value sgw.service does not exist 
ERROR: sgw-1.0-r0 do_package: Function failed: systemd_populate_packages 

感謝を。

答えて

2

@ Fl0v0:Fidoは${systemd_system_unitdir}をサポートしていません。それはジェスロで紹介されています。

@helix_:autotoolsのデフォルトのインストール機能を上書きします。 do_installの代わりにを使用してください。また、閉会賞の前にスペースを削除する必要があります。

do_install_append() { 
    install -d ${D}${systemd_unitdir}/system/ 
    install -m 0644 ${WORKDIR}/sgw.service/ ${D}${systemd_unitdir}/system/ 
} 
+0

解決済み!どうもありがとう –

関連する問題