[yocto] Kernel Build Failures with Shared SSTATE

Manjukumar Harthikote Matha MANJUKUM at xilinx.com
Tue Sep 19 14:14:55 PDT 2017


Hi Richard,

> -----Original Message-----
> From: yocto-bounces at yoctoproject.org [mailto:yocto-bounces at yoctoproject.org]
> On Behalf Of Schmitt, Richard
> Sent: Friday, July 14, 2017 8:23 AM
> To: yocto at yoctoproject.org
> Subject: [yocto] Kernel Build Failures with Shared SSTATE
> 
> Hi,
> 
> 
> 
> I had been running into kernel build failures on the morty branch when using a shared
> state.  First I'll describe the error, and then my solution.
> 
> 
> 
> The first build that initializes the sstate cache works fine.  Subsequent clean builds
> will fail.  The failure
> 
> would occur in the do_compile_kernelmodules task.  The error would indicate a
> failure because tmp/work-shared/<machine>/kernel-build-artifacts was missing.
> 
> 
> 
> My analysis concluded that the kernel build was restored from the cache, but it did
> not restore the kernel-build-artifacts needed by the do_compile_kernelmodules task.
> 
> 
> 
> My solution was to include the following in a bbappend file for the kernel:
> 
> 
> 
> SSTATETASKS += "do_shared_workdir"
> 
> 
> 
> do_shared_workdir[sstate-plaindirs] = "${STAGING_KERNEL_BUILDDIR}"
> 
> 
> 
> python do_shared_workdir_setscene () {
> 
>     sstate_setscene(d)
> 
> }
> 
> 
> 
> I assume the correct way to fix this would be to update the
> meta/classes/kernel.bbclass.  It looks like there was some attempt to do something
> with the shared_workdir because there is a do_shared_workdir_setscene routine,
> but right now it just returns a 1.  Is that intentional.  It seems wrong.
> 

Even I am facing the same issue, but seen only few instances of failures. Not able to concretely figure out exact steps to replicate the issue.
Is it better to remove the addtask shared_workdir_setscene ?
If you see do_deploy task in kernel.bbclass, it doesn't handle the setscene task either

Thanks,
Manju




More information about the yocto mailing list