On Sat, Oct 14, 2023 at 10:30:48AM -0400, Bruce Ashfield wrote:
> On Sat, Oct 14, 2023 at 10:14 AM Olivier Dautricourt
> <[email protected]> wrote:
> >
> > Since Commit 67274c083438340ad16c ("scripts/gdb: delay generation of gdb
> > constants.py") in kernel source tree (>=V5.1), scripts_gdb target needs
> > explicit run to build scripts/gdb. (vmlinux-gdb.py script is used by gdb for
> > linux kernel integration).
> >
> > As this step was previously not needed, this suggest newer kernels builds
> > do not bundle it anymore, this change provides the same functionalities
> > for kernels >=V5.1 .
> 
> It also suggests that very few people use the integration :)
> 
> >
> > Signed-off-by: Olivier Dautricourt <[email protected]>
> > ---
> >  meta/classes-recipe/kernel.bbclass | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/meta/classes-recipe/kernel.bbclass 
> > b/meta/classes-recipe/kernel.bbclass
> > index 2ec9ea2091..5206b4f2a7 100644
> > --- a/meta/classes-recipe/kernel.bbclass
> > +++ b/meta/classes-recipe/kernel.bbclass
> > @@ -394,6 +394,9 @@ kernel_do_compile() {
> >         for typeformake in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do
> >                 oe_runmake ${PARALLEL_MAKE} ${typeformake} 
> > ${KERNEL_EXTRA_ARGS} $use_alternate_initrd
> >         done
> > +       if (grep -q -i -e '^CONFIG_GDB_SCRIPTS=y$' .config && grep -q -e 
> > "^PHONY +=.*scripts_gdb" "${S}/Makefile"); then
> > +               oe_runmake ${PARALLEL_MAKE} scripts_gdb
> > +       fi
> 
> We really try to avoid using any explicit checks for CONFIG_* in the kernel
> classes or using them to coordinate functionality. While I don't think that 
> this
> is a significant issue here (since what is being built is small and it
> is isolated),
> it is something that could be coordinated via a distro feature as the main
> "on off" switch. We already have some debug distro features, and I could see
> this being something that could trigger when they are enabled (and for
> kernel-yocto derived kernels, it could also ensure that gdb functionality is
> enabled via a fragment).
> 
> I'd also suggest that this could be placed into a separate task like we do
> for modules. Again, the build here is small, but it is something outside of 
> the
> core kernel build which is the purpose of do_compile in the kernel classes.
> As a task, it also would be easy enough for other users to override if it 
> causes
> them issues.
> 
> Cheers,
> 
> Bruce

Thanks for the quick reply. I understood your points and i will see how to 
better integrate this.

Kind Regards,

Olivier
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189117): 
https://lists.openembedded.org/g/openembedded-core/message/189117
Mute This Topic: https://lists.openembedded.org/mt/101960387/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to