[yocto] Error during adding a new recipe.

Andre McCurdy armccurdy at gmail.com
Mon Jul 25 14:50:36 PDT 2016


On Fri, Jul 22, 2016 at 6:52 AM, Khem Raj <raj.khem at gmail.com> wrote:
> On Fri, Jul 22, 2016 at 12:09 AM, Andre McCurdy <armccurdy at gmail.com> wrote:
>> On Thu, Jul 21, 2016 at 8:20 PM, Khem Raj <raj.khem at gmail.com> wrote:
>>>
>>>> On Jul 21, 2016, at 6:45 PM, Paul Eggleton <paul.eggleton at linux.intel.com> wrote:
>>>>
>>>> On Thu, 21 Jul 2016 18:35:25 Khem Raj wrote:
>>>>> On Thu, Jul 21, 2016 at 6:32 PM, Paul Eggleton
>>>>>
>>>>> <paul.eggleton at linux.intel.com> wrote:
>>>>>> On Thu, 21 Jul 2016 18:22:32 Khem Raj wrote:
>>>>>>>> On Jul 21, 2016, at 5:20 PM, Vijayakumar Badiger
>>>>>>>> <vijayakumarmb at gmail.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> The sync driver is already ported in the kernel.  I just need to get
>>>>>>>> this
>>>>>>>> compilation error fixed. I tried adding below change to kernel bb file
>>>>>>>> but still I get that same error.
>>>>>>>>
>>>>>>>> PACKAGES =+ "kernel-headers"
>>>>>>>> FILES_kernel-headers = "${KDIR}/usr/include”
>>>>>>>
>>>>>>> there is a different recipe for headers linux-libc-headers that also
>>>>>>> needs
>>>>>>> to be patched and then hopefully kernel build system is exporting this
>>>>>>> header for userspace automatically and you will be set.
>>>>>>
>>>>>> I thought we weren't supposed to be encouraging modifying
>>>>>> linux-libc-headers - especially as this isn't for the libc - it's for
>>>>>> other userspace code...?
>>>>>
>>>>> Yes thats correct thats why
>>>>> I am not asking for submitting this patch upstream.
>>>>
>>>> Sure, but this question comes up a lot. We ought to be telling people the
>>>> correct mechanism for introducing extra headers such as this if it isn't to
>>>> modify linux-libc-headers.
>>>
>>> Thats possible for external kernel modules. This is a kernel patch. There is no other elegant way
>>> of solving this. They could write another recipe just to stage this header. but thats equally ugly.
>>
>> A new recipe isn't needed. You can add something like the following to
>> the existing kernel recipe:
>>
>>   sysroot_stage_all_append () {
>>     mkdir -p ${SYSROOT_DESTDIR}/${includedir}/linux
>>     install -m644 ${S}/include/linux/sync.h
>> ${SYSROOT_DESTDIR}/${includedir}/linux/
>>   }
>
> I wonder if this will this work with sstate

This version won't. It should be possible to fix that, but it starts
to turn into a more extensive change.

As Paul mentions, it might be better to support this kind of thing
officially (via kernel.bbclass) since allowing a machine specific
kernel to install custom header files into sysroot for use by user
space recipes is a relatively common situation.

>>
>> and then add a dependency on the kernel to the recipe which needs the headers.
>>
>>
>>>>
>>>> Cheers,
>>>> Paul
>>>>
>>>> --
>>>>
>>>> Paul Eggleton
>>>> Intel Open Source Technology Centre
>>>
>>>
>>> --
>>> _______________________________________________
>>> yocto mailing list
>>> yocto at yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/yocto
>>>



More information about the yocto mailing list