All of lore.kernel.org
 help / color / mirror / Atom feed
* kernel module development problem with SDK
@ 2017-09-13 13:07 György Kövesdi
  2017-09-13 13:39 ` Bruce Ashfield
  0 siblings, 1 reply; 3+ messages in thread
From: György Kövesdi @ 2017-09-13 13:07 UTC (permalink / raw)
  To: poky

Hi,

I have poky at git hash 5686f4e1fe5229705b8c7d35895aa03827796d13 and I 
build for ARMv7.

I wanted to build my kernel module using the SDK generated this way:

     bitbake <my-image> -c populate_sdk

and the recipe kernel-devsrc is added to my sdk.

I found that the recipe meta/recipes-kernel/linux/kernel-devsrc.bb puts 
everything in the kernel source tree, except the following executables:

     scripts/recordmcount
     scripts/basic/fixdep
     scripts/mod/modpost

These would be essential for module development.

In the recipe kernel-devsrc.bb the following line

     oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean 
_mrproper_scripts

removes everything, including the executables mentioned above.
IMHO it would be enough to run:

     oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean

In this case the module development works properly with the resulting SDK.
Is the 'mrproper' really necessary? IMHO the 'clean' is enough there, 
because 'mrproper' removes too much.

Regards
Gyorgy Kovesdi




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: kernel module development problem with SDK
  2017-09-13 13:07 kernel module development problem with SDK György Kövesdi
@ 2017-09-13 13:39 ` Bruce Ashfield
  2017-09-14  6:40   ` György Kövesdi
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Ashfield @ 2017-09-13 13:39 UTC (permalink / raw)
  To: György Kövesdi, poky

On 09/13/2017 09:07 AM, György Kövesdi wrote:
> Hi,
> 
> I have poky at git hash 5686f4e1fe5229705b8c7d35895aa03827796d13 and I 
> build for ARMv7.
> 
> I wanted to build my kernel module using the SDK generated this way:
> 
>      bitbake <my-image> -c populate_sdk
> 
> and the recipe kernel-devsrc is added to my sdk.
> 
> I found that the recipe meta/recipes-kernel/linux/kernel-devsrc.bb puts 
> everything in the kernel source tree, except the following executables:
> 
>      scripts/recordmcount
>      scripts/basic/fixdep
>      scripts/mod/modpost
> 
> These would be essential for module development.
> 
> In the recipe kernel-devsrc.bb the following line
> 
>      oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean 
> _mrproper_scripts
> 
> removes everything, including the executables mentioned above.
> IMHO it would be enough to run:
> 
>      oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean
> 
> In this case the module development works properly with the resulting SDK.
> Is the 'mrproper' really necessary? IMHO the 'clean' is enough there, 
> because 'mrproper' removes too much.

The executables can't be packaged with the actual kernel source, since
we run into QA errors due to architecture mismatches.

Variants of this issue/concern have been around for several years now,
but since there are workarounds of simply re-creating the scripts
after SDK install, it hasn't been fixed to work out of the box.

So unfortunately, it isn't as simple as just leaving those scripts in
the devsrc package.

A couple of bugs that track work on this are:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=4389
https://bugzilla.yoctoproject.org/show_bug.cgi?id=6630

Bruce

> 
> Regards
> Gyorgy Kovesdi
> 
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: kernel module development problem with SDK
  2017-09-13 13:39 ` Bruce Ashfield
@ 2017-09-14  6:40   ` György Kövesdi
  0 siblings, 0 replies; 3+ messages in thread
From: György Kövesdi @ 2017-09-14  6:40 UTC (permalink / raw)
  To: poky

Hi,

I put them back and there is no problem if they are stripped. However, 
other versions of Poky may lead to QA error.


On 2017-09-13 15:39, Bruce Ashfield wrote:
> On 09/13/2017 09:07 AM, György Kövesdi wrote:
>> Hi,
>>
>> I have poky at git hash 5686f4e1fe5229705b8c7d35895aa03827796d13 and 
>> I build for ARMv7.
>>
>> I wanted to build my kernel module using the SDK generated this way:
>>
>>      bitbake <my-image> -c populate_sdk
>>
>> and the recipe kernel-devsrc is added to my sdk.
>>
>> I found that the recipe meta/recipes-kernel/linux/kernel-devsrc.bb 
>> puts everything in the kernel source tree, except the following 
>> executables:
>>
>>      scripts/recordmcount
>>      scripts/basic/fixdep
>>      scripts/mod/modpost
>>
>> These would be essential for module development.
>>
>> In the recipe kernel-devsrc.bb the following line
>>
>>      oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" 
>> clean _mrproper_scripts
>>
>> removes everything, including the executables mentioned above.
>> IMHO it would be enough to run:
>>
>>      oe_runmake -C $kerneldir CC="${KERNEL_CC}" LD="${KERNEL_LD}" clean
>>
>> In this case the module development works properly with the resulting 
>> SDK.
>> Is the 'mrproper' really necessary? IMHO the 'clean' is enough there, 
>> because 'mrproper' removes too much.
>
> The executables can't be packaged with the actual kernel source, since
> we run into QA errors due to architecture mismatches.
>
> Variants of this issue/concern have been around for several years now,
> but since there are workarounds of simply re-creating the scripts
> after SDK install, it hasn't been fixed to work out of the box.
>
> So unfortunately, it isn't as simple as just leaving those scripts in
> the devsrc package.
>
> A couple of bugs that track work on this are:
>
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=4389
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=6630
>
> Bruce
>
>>
>> Regards
>> Gyorgy Kovesdi
>>
>>
>
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-14  6:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-13 13:07 kernel module development problem with SDK György Kövesdi
2017-09-13 13:39 ` Bruce Ashfield
2017-09-14  6:40   ` György Kövesdi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.