Skip to content

Commit

Permalink
classes/kernel-balena: Avoid re-building kernel modules when not signed
Browse files Browse the repository at this point in the history
Setting the nostamp flag to any value, even if it is an empty string, causes
the kernel modules to be rebuilt, which is contrary to the
documentation: https://lists.openembedded.org/g/bitbake-devel/message/12359

Let's avoid setting it altogether on kernels which are not signed,
to speed up builds.

Change-type: patch
Signed-off-by: Alexandru Costache <[email protected]>
  • Loading branch information
acostach committed Jan 16, 2025
1 parent d752abb commit d090de0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion meta-balena-common/classes/kernel-balena.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,12 @@ do_sign_gpg:append () {

# Parallel builds sharing state cache will mismatch singed kernel and modules
# Avoid using cache for signed kernel modules to avoid this
do_compile_kernelmodules[nostamp] = "${@oe.utils.conditional('SIGN_API','','','1',d)}"
# Also, avoid having the kernel modules rebuilt even if they
# are not signed - see https://lists.openembedded.org/g/bitbake-devel/message/12359
python __anonymous() {
if d.getVar('SIGN_API'):
d.setVarFlag('do_compile_kernelmodules', 'nostamp', '1')
}

do_deploy:prepend () {
SIGNING_ARTIFACTS="${SIGNING_ARTIFACTS_BASE}"
Expand Down

0 comments on commit d090de0

Please sign in to comment.