[yocto] [meta-raspberrypi] Recipe To Add 3 Script Files To /etc/ppp/peers/<provider-name>

Thomas A. F. Thorne MEng AUS MIET Thomas.Thorne at Net2Edge.com
Fri Nov 25 03:26:30 PST 2016

I want to add 3 script files /ppp/peers/<provider-name>.  I am targeting
a Raspberry Pi 3 but I would have though that adding non-compiled files
to the root file-system was a fairly generic thing to do. 

Is there an example of how to do this somewhere?  Either a How To write
up or an existing recipie that takes a set of text files and places them
onto the target's rootfs. 

I must be missing something because I cannot get the file files onto the

I tried using do_deploy, but that puts files into my
../tmp/deploy/images/raspberrypi3/etc/ppp/ which would be helpful for
scripts to aid in image deployment.  It is not what I want though as the
scripts need to be on the target. 

Running a do_install() with or without a blank do_compile() has not
resulted in things getting onto the target either.  Unless there is
something about using ${sysconfdir} or ${IMAGE_ROOTFS} or ${S} or ${D}
or ${DEPLOYDIR} or ${WORKDIR} which is particular to the Pi.  I'd
provide an example of my script but having changed it so many times in
the last two days there is not much worth of sharing just one iteration. 

Anything that resembles the following with;
 ${IMAGE_ROOTFS} possibly substituted for ${D} or missing
 do_install replaced with do_deploy. 
There are probably other permutations that I have tried. 

# Copy the ppp script files for <vendor> chips to the target filesystem
# These files are based on the details provided in

SUMMARY = "PPP Scripts for ..."
SECTION = "net"
DESCRIPTION = "A set of Linux PPP scripts blar blar"

RDEPENDS_${PN} = "ppp"

SRC_URI += "file://<provider>-ppp"
SRC_URI += "file://<provider>-chat-connect"
SRC_URI += "file://<provider>-chat-disconnect"

S = "${WORKDIR}"

#PACKAGES =+ "${PN} ${PN}-staticdev"

#DEPLOYDIR = "${WORKDIR}/deploy-${PN}"


inherit allarch

# Install script on target's root file-system
do_install () {
    # Install init script and default settings
    #install -d ${IMAGE_ROOTFS}${sysconfdir}
    #install -d ${IMAGE_ROOTFS}${sysconfdir}/ppp/
    install -d ${IMAGE_ROOTFS}${sysconfdir}/ppp/peers/
    install -m 0755 ${S}/<provider>-ppp
    install -m 0755 ${S}/<provider>-chat-connect
    install -m 0755 ${S}/<provider>-chat-disconnect

# Mark the files which are part of this package
FILES_${PN} += "${sysconfdir}/ppp/"
FILES_${PN} += "${sysconfdir}/ppp/peers/"
FILES_${PN} += "${sysconfdir}/ppp/peers/<provider>-ppp"
FILES_${PN} += "${sysconfdir}/ppp/peers/<provider>-chat-connect"
FILES_${PN} += "${sysconfdir}/ppp/peers/<provider>-chat-disconnect"

I can find a lot of helloworld.c and automate examples.  There must be
some basic ones for adding scripts somewhere?  My googlefu is very weak,
I blame a lingering cold. 

Any help will be very gratefully received. 

Thomas A. F. Thorne MEng. AUS MIET
*Software Engineer*


Tel: +44 3450 130 030 <tel:+443450130030>
Email: Thomas.Thorne at Net2Edge.com <mailto:Thomas.Thorne at Net2Edge.com>
Web: http://www.Net2Edge.com/ <http://www.Net2Edge.com>

Net2Edge Limited is a company registered in England & Wales (Company No.
2438435, VAT No. GB 537553821) Passfield Oak, Liphook, Hampshire, GU30
7RL. This email transmission is confidential and intended solely for the
person or organisation to whom it is addressed. If you are not the
intended recipient, you must not copy, distribute or disseminate the
information, or take any action in reliance of it. Any views expressed
in this message are those of the individual sender, except where the
sender specifically states them to be the views of any organisation or
employer. If you have received this message in error, do not open any
attachment but please notify the sender (above) and delete this message
from your system. Please rely on your own virus check. Although all
outbound mail is checked for viruses, no responsibility is taken by the
sender for any damage rising out of any bug or virus infection.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20161125/b90c71e4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20161125/b90c71e4/attachment.pgp>

More information about the yocto mailing list