[yocto-builds] startup script for raspberry pi3 b+

Ramji Wagmode wagmode.ramji at gmail.com
Wed Feb 6 21:10:32 PST 2019


Hi,
 I am generated .sdimg and copy to the sdcard run in raspberry pi3B+ but
the autorun script is not working fine..
my fie is in dir:sources/poky/meta/recipes-core/dl-mgr/
In *dl-mgr* I have *dl-mgr_0.1.bb <http://dl-mgr_0.1.bb>* and one *dl-mgr*
folder in that folder *dl-mgr.sh* and *dl-mgr.service *
dl-mgr.service contains:
**[Unit]
Description=Test service
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
WorkingDirectory=/usr/sbin
ExecStart=/usr/sbin/dl-mgr.sh start

[Install]
WantedBy=multi-user.target**

dl-mgr_0.1.bb file contains:
**LICENSE="CLOSED"
SRC_URI = "file://dl-mgr.sh \
           file://dl-mgr.service \
      "
inherit systemd
SYSTEMD_SERVICE_${PN} = "dl-mgr.service"
FILES_${PN} = " ${systemd_unitdir}/system/dl-mgr.service
${sbindir}/dl-mgr/sh"
do_install() {
        install -d ${D}/${sbindir}
        install -m 0755 dl-mgr.sh ${D}/${sbindir}
        install -d ${D}${systemd_unitdir}/system
        install -c -m 0644 ${WORKDIR}/dl-mgr.service
${D}${systemd_unitdir}/system
}**
and finally dl-mgr.sh contains:
**#!/bin/sh
echo "***********************WEL-COME**********************************"
echo " "
echo "!!!!!!!!!!!!!!!!!!!!!!!THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo " "**

I added recipe into image and finally executing like this

*bitbake rpi-basic-image*
*-*if I restart/power on my raspberrypi script should automatically.

Thanks and regards
ram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto-builds/attachments/20190207/9e8c330a/attachment.html>


More information about the yocto-builds mailing list