[yocto] Creating a recipe to create /usr/local

Chan Kit Yu yuchankit at gmail.com
Thu Nov 27 17:55:45 PST 2014


I would also like to add that bitbaking that recipe alone was fine but
bitbaking my image to include that package failed.

On Fri, Nov 28, 2014 at 9:43 AM, Chan Kit Yu <yuchankit at gmail.com> wrote:
> Hi Chris,
>
> Thank you very much :-)
> But it was no good. I still get the same error even with the "install" use.
>
> Here I attach the full recipe just in case I did wrong somewhere:
>
> SUMMARY = "Create /usr/local"
> SECTION = "meta-networking"
> LICENSE = "MIT"
> LIC_FILES_CHKSUM =
> "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
> #INSANE_SKIP_${PN} = "installed-vs-shipped"
>
> do_install(){
>         install -d  ${D}${prefix}/local/
> }
>
> Chan Kit
>
>
>
> On Fri, Nov 28, 2014 at 5:00 AM, Chris Tapp <opensource at keylevel.com> wrote:
>>
>> 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