[yocto] Creating a recipe to create /usr/local
Chris Tapp
opensource at keylevel.com
Thu Nov 27 13:00:02 PST 2014
On 27 Nov 2014, at 07:09, Chan Kit Yu <yuchankit at gmail.com> wrote:
> Hi all,
>
> I'm not sure if emailing this is the most appropriate way and I
> apologize in advance if that's not.
>
> I have some scripts that require /usr/local to exist in Yocto and
> therefore I need to a recipe to create /usr/local directory. I tried
> to accomplish this with a simple recipe but that proved futile.
>
> Although bitbaking that particular recipe was fine, trying to include
> that package in local.conf resulted errors and those errors are
> gibberish (it listed all the packages inside the image that I was
> trying to comple) . Here's my simple stupid recipe:
>
> SUMMARY= "...."
> LICENSE = "something...."
> ...
> ...
> INSANE_SKIP_${PN} = "installed-vs-shipped"
>
> do_install(){
> mkdir -p ${D}/usr/local
> }
You need to use 'install' rather than mkdir
> Is there a better way (or preferably the canonical way) to do this?
Yes, there are some definitions you can use. In your case it would be:
# Install the 'local' directory to make sure it exists
install -d ${D}${prefix}/local
# Install a file to this location
install -f ${WORKDIR}/myfile ${D}${prefix}/local
The available definitions are shown at the top of meta/conf/bitbake.conf in your Poky installation.
--
Chris Tapp
opensource at keylevel.com
www.keylevel.com
----
You can tell you're getting older when your car insurance gets real cheap!
More information about the yocto
mailing list