On Sat, Oct 14, 2023 at 10:14 AM Olivier Dautricourt
<olivierdautrico...@gmail.com> 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 <olivierdautrico...@gmail.com>
> ---
>  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

>  }
>
>  kernel_do_transform_kernel() {
> --
> 2.42.0
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189116): 
https://lists.openembedded.org/g/openembedded-core/message/189116
Mute This Topic: https://lists.openembedded.org/mt/101960387/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to