Build with stale kernel modules compared to kernel


Craig McQueen
 

I have an imx8mm based system built with Yocto dunfell and linux-fslc-imx 5.4.119 from meta-freescale.

Recently, I had a Yocto build that didn't run properly. It turns out the kernel modules directory /lib/modules/5.4.119+gccebf7b87951 didn't match the version number of the kernel image (uname -a reported Linux tv937913 5.4.119+gdcbcfe59f884 #1 SMP PREEMPT Fri May 14 21:09:23 UTC 2021 aarch64 GNU/Linux).

The manifest file showed the version of all the kernel-module packages was 5.4.119+gccebf7b87951. I found that the kernel modules directory contents were coming from stale RPMs that evidently came from sstate cache. Looking in the build logs, for linux-fslc-imx, the task do_package_write_rpm_setscene was run early, before do_compile and do_compile_kernelmodules. I would have expected a do_package_write_rpm task to run *after* do_compile_kernelmodules, but that didn't happen.

It looks to me as though the sstate cache mechanism has somehow malfunctioned in this build. I've added SSTATE_SKIP_CREATION="1" to a bbappend file for linux-fslc-imx, in the hope that this will avoid such an issue again.

But, it would be good to figure out the root cause and fix it. What could I do to diagnose this issue?

Regards,
Craig McQueen



 
 

 

Craig McQueen
Embedded Systems Engineer

t
e
w
:
:
:
+61 3 9780 4378
craig.mcqueen@...
innerrange.com
 Inner Range • 1 Millennium Court • Knoxfield • Victoria • 3180 • Australia 

 

 

Join {yocto@lists.yoctoproject.org to automatically receive all group messages.