On Wed, Jul 19, 2023 at 1:32 PM Petr Gotthard <petr.gotth...@advantech.cz> wrote: > > Hello, > the out-of-tree kernel modules built with latest master have broken > "vermagic" and thus cannot be loaded. > > The patch > https://git.yoctoproject.org/poky/commit/?id=bb0f9e87700aa40ec8db880ede3c018c1d055786 > added to meta/classes-recipe/kernel-arch.bbclass: > export LOCALVERSION ?= "${KERNEL_LOCALVERSION}" > so when somebody sets the KERNEL_LOCALVERSION, the kernel is build with this > suffix. So far so good. > > The problem is that the "make-mod-scripts" doesn't know the > KERNEL_LOCALVERSION, so it does not set the LOCALVERSION. > When the LOCALVERSION is not set, one suffix used to build the kernel is > missing, the module "vermagic" doesn't match the kernel and the out-of-tree > modules fail to load. > For example, after building the kernel the > "kernel-build-artifacts/include/generated/utsrelease.h" contains > "6.1.33-g8f7f371be2", however after running "make-mod-scripts" it's only > "6.1.33". >
Hmm. I explicitly tested this scenario to make sure it worked, since you run into the same issue when building modules on-target. make-mod-scripts is running out of the same SCM as the main kernel build, so it should match, and did in my testing (otherwise lttng-modules wouldn't work). Can you send the exact steps, which kernel recipe you are using, etc. That way I can reproduce the problem locally. Bruce > One solution to this would be to store the KERNEL_LOCALVERSION somewhere and > then restore it by the "make-mod-scripts" to make sure the build environment > is initialized properly. I am just not sure where is the right storage for > this. > > > Petr > > > > -- - 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 (#184591): https://lists.openembedded.org/g/openembedded-core/message/184591 Mute This Topic: https://lists.openembedded.org/mt/100240236/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-