Re: Best practice for files copied directly into sysroot?


Bryan Evenson
 

Michael,

-----Original Message-----
From: yocto-bounces@... [mailto:yocto-
bounces@...] On Behalf Of Michael Habibi
Sent: Tuesday, December 01, 2015 10:26 AM
To: yocto@...
Subject: [yocto] Best practice for files copied directly into sysroot?

I am working on potentially migrating our distribution to Yocto (will be a long,
long process). We have an area of our filesystem where any file placed will go
directly into the rootfs of the target. This works well with our product, as we
have certain binaries and scripts that need to be copied directly, and there's
no other real step involved (no compilation, etc). Is there a best practice or
existing class that handles this? I saw mention of a binary/ directory but I
wasn't sure if that was for this or something else.

Thanks,
Michael
I'm glad I decided to answer your question because I think I found an easier way to do it than I have been doing this in the past. If you want to be able to update the files on your system at a later date, you will want to make your own recipe which installs the binaries and scripts onto the rootfs. In general you create a recipe which does not have do_configure or do_compile tasks. There is a class that does this already called "bin_package" that does this for you. See the "Packaging Externally Produced Binaries" section of the manual here: http://www.yoctoproject.org/docs/2.0/mega-manual/mega-manual.html#new-recipe-testing-examples. So if you include the line "inherit bin_package" and follow the instructions in that section of the manual, it should install all the files to the rootfs that are included in the recipe.

Regards,
Bryan

Join {yocto@lists.yoctoproject.org to automatically receive all group messages.