more efficient debug kernel
Hi,
I usually build a debug kernel with debug info included, which makes it run "suboptimal". Distros build the kernel with CONFIG_DEBUG_INFO enables, but strip symbols out of the resulting kernel and kernel modules, and place them in the separate debuginfo packages. This makes the kernel much smaller and also makes it run more efficiently because of caching.
Is this possible with the Yocto kernel tooling as well?
Regards,
Robert
Quoted 5 lines · Robert Berger
Hi,
I usually build a debug kernel with debug info included, which makes it run "suboptimal". Distros build the kernel with
CONFIG_DEBUG_INFOenables, but strip symbols out of the resulting kernel and kernel modules, and place them in the separate debuginfo packages. This makes the kernel much smaller and also makes it run more efficiently because of caching.Is this possible with the Yocto kernel tooling as well?
That isn't something that I've ever done via oe-core or the Yocto kernel tooling.
We can absolutely support different kernel types, and in fact, do have a developer/debug kernel and a production kernel variant. But they are typically built and packaged separately rather than being generated from the same build.
There is also a strip() routine for the kernel, but it only operates on vmlinux (and was used to keep very large images under bootloader size restrictions). I'd see this as something that could definitely be done in a 2nd phase part of a build, since it is just processing already created binaries (maybe someone does have such a thing in a custom layer).
The multiple image builds, kernel module splitting, upgrade paths, multilibs, etc, all make the packaging pretty complex already, but there might be something in this area that could be done.
I had an old bugzilla entry about kernel-dev packaging: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7095,
but it didn't touch on this issue.
That being said, maybe there already is something that the core packaging classes are doing (I just looked at my latest kernel build and didn't see anything) .. and that I'm just missing .. if so, hopefully someone else will enlighten us :D
Bruce
Quoted 4 lines
Regards,
Robert