[yocto] What is the simplest, or better yet, canonical way to add a shell script to core-image-minimal?

Patrick Doyle wpdster at gmail.com
Tue Jun 24 06:02:25 PDT 2014


Hello Gaurang, Ross, and Nicolas,
Thank you for your suggestions.  I ended up implementing Ross's
suggestion (before I got even got his suggestion) because it was the
only answer I could come with on my own where all the pieces made
sense.  I originally asked the question out of a (most likely
misguided) sense that creating a recipe simply to install a shell
script was too heavyweight.  I thought there might be a simpler way to
do that than writing a recipe like:

<code>
DESCRIPTION = "My specific shell script[s] that get installed in the rootfs."
LICENSE = "CLOSED"

SRC_URI = "file://my_script.sh"

do_install () {
    install -d ${D}${bindir}
    install -m 755 ${WORKDIR}/my_script.sh ${D}${bindir}
}
</code>

… and then adding  custom-scripts recipe to CORE_IMAGE_EXTRA_INSTALL.

Once I finished writing the recipe, I realized it was much simpler
than I thought it would be.  Thanks for providing the infrastructure
that made that so easy.

--wpd




On Tue, Jun 24, 2014 at 5:50 AM, Burton, Ross <ross.burton at intel.com> wrote:
> On 23 June 2014 16:56, Patrick Doyle <wpdster at gmail.com> wrote:
>> Should I create a core-image-minimal.bbappend file with a SRC_URI
>> pointing to my script and a do_install rule to install it?
>
> Create a new recipe for the script and then add it to the image.
>
> The documentation is useful:
> http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#extendpoky
>
> Ross



More information about the yocto mailing list