I think you might have already found an answer, but I don't think it's wise to override the do_install method. Plus, you should also populate your "${D}" folder, which is "${WORKDIR}/image"; instead of ${IMAGE_ROOTFS}, which is "${WORKDIR}/rootfs". AFAIK, the way you're doing, the contents of D will override what your do_intall put in IMAGE_ROOTFS during do_rootfs phase.
This should work: create a bbappend recipe: ppp_2.4.%.bbappend (change to the ppp version of your yocto build) SRC_URI += "\ file://ppp \ file://chat-connect \ file://chat-disconnect \ " do_install_*append* () { install -d ${D}${sysconfdir}/ppp/peers install -m 0755 ${S}/<provider>-ppp ${D}${sysconfdir}/ppp/peers/ install -m 0755 ${S}/<provider>-chat-connect ${D}${sysconfdir}/ ppp/peers/ install -m 0755 ${S}/<provider>-chat-disconnect ${D}${sysconfdir}/ ppp/peers/ } # Mark the files which are part of this package FILES_${PN} += "${sysconfdir}/ppp/ \ ${sysconfdir}/ppp/peers/ \ ${sysconfdir}/ppp/peers/provider>-ppp \ ${sysconfdir}/ppp/peers/provider>-chat-connect \ ${sysconfdir}/ppp/peers/ provider>-chat-disconnect\ " Regards, Miguel Aveiro | Software Engineer +44 1799 533200 telensa.com <http://www.telensa.com/> | @telensa <http://www.twitter.com/telensa> | Linkedin <http://www.linkedin.com/company/telensa> On 25 November 2016 at 11:26, Thomas A. F. Thorne MEng AUS MIET < thomas.tho...@net2edge.com> wrote: > 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 > system. > 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" > LICENSE = "MIT" > LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5= > 0835ade698e0bcf8506ecda2f7b4f302" > 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}" > > #D = "${DEPLOYDIR}" > > 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 ${IMAGE_ROOTFS}${sysconfdir}/ > ppp/peers/ > install -m 0755 ${S}/<provider>-chat-connect > ${IMAGE_ROOTFS}${sysconfdir}/ppp/peers/ > install -m 0755 ${S}/<provider>-chat-disconnect > ${IMAGE_ROOTFS}${sysconfdir}/ppp/peers/ > } > > # 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. > Regards, > > -- > Thomas A. F. Thorne MEng. AUS MIET > *Software Engineer* > > *NET2EDGE* > > Tel: +44 3450 130 030 <+443450130030> > Email: thomas.tho...@net2edge.com > Web: 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. > > -- > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > >
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto