[OE-core] [PATCH] kernel-devsrc: fix missing generated files from the packet

zhou li li.zhou at windriver.com
Tue Feb 25 08:17:42 UTC 2020


On 2/18/20 9:36 PM, Bruce Ashfield wrote:
> On Mon, Feb 17, 2020 at 10:58 PM zhou li <li.zhou at windriver.com> wrote:
>>
>> On 2/18/20 10:12 AM, Bruce Ashfield wrote:
>>> On Mon, Feb 17, 2020 at 9:07 PM Li Zhou <li.zhou at windriver.com> wrote:
>>>> The file arch/arm/include/generated/asm/unistd-nr.h is needed by some
>>>> external kernel module. Error occurs when building the module with
>>>> the SDK.
>>>>
>>>> Add arch/${ARCH}/include/generated dir and files under it to
>>>> kernel-devsrc package to solve this issue.
>>>>
>>>> Signed-off-by: Li Zhou <li.zhou at windriver.com>
>>>> ---
>>>>    meta/recipes-kernel/linux/kernel-devsrc.bb | 6 ++++++
>>>>    1 file changed, 6 insertions(+)
>>>>
>>>> diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
>>>> index b6f2dbc..8621fe1 100644
>>>> --- a/meta/recipes-kernel/linux/kernel-devsrc.bb
>>>> +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
>>>> @@ -108,6 +108,12 @@ do_install() {
>>>>           fi
>>>>
>>>>           cp -a include $kerneldir/build/include
>>>> +
>>>> +       if [ -d arch/${ARCH}/include/generated ]; then
>>>> +           mkdir -p $kerneldir/build/arch/${ARCH}/include
>>>> +           cp -r arch/${ARCH}/include/generated $kerneldir/build/arch/${ARCH}/include
>>>> +       fi
>>> This is just papering over the real problem.
>>>
>>> Anything that is generated, should be regenerated when the headers are
>>> used/prepared.
>>>
>>> What is missing and/or why isn't that happening with this ?
>>>
>>> Bruce
>>
>> In some old version yocto, the file
>> arch/arm/include/generated/asm/unistd-nr.h can be directly used from our
>> sdk. So now it isn't permitted any more? And we should figure out how to
> Anything in the generated subdirectories of the kernel build should be
> regenerated when we do the make prepare/scripts/modules_prepare steps.
> If it isn't being regenerated, then we are missing something in devsrc
> that can regenerate them (either a step in the preparation, a
> Makefile, a script ..).
>
> If we start pulling bits and pieces out of generated, we'll end up
> constantly having to take more and more, when the right thing (by the
> way our minimal devsrc is designed) is to have it regenerated.
>
> It's valid to use it, but we shouldn't need to copy it if it can be
> generated. If it can't be generated, we should document why with a
> comment in the code and in the commit message of the change.


Hi, Bruce:

        Thank you for your reply. I try and find that <make archprepare> 
can generate the header file mentioned.

Then do you mean that the user should run <make archprepare> to generate 
the header files needed first, and then make their own code using those 
header files?

Thanks a lot.


>
> Bruce
>
>
>> generate it again when developing the external kernel modules? Thank you.
>>
>>
>>>> +
>>>>        )
>>>>
>>>>        # now grab the chunks from the source tree that we need
>>>> --
>>>> 1.9.1
>>>>
>>>> --
>>>> _______________________________________________
>>>> Openembedded-core mailing list
>>>> Openembedded-core at lists.openembedded.org
>>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>>
>> --
>> Best Regards!
>> Zhou Li
>> Phone number: 86-10-84778511
>>
>
-- 
Best Regards!
Zhou Li
Phone number: 86-10-84778511



More information about the Openembedded-core mailing list