Skip to content

Commit 890bfd9

Browse files
author
Eric Chanudet
committed
layer: use STAGING_KERNEL_BUILDDIR for defconfig
out-of-tree modules will not have .config in ${B}. Check the defconfig in STAGING_KERNEL_BUILDDIR instead. Add a bbnote, failing this test is not fatal if signing was disabled for a kernel that inherited this class. More correctly this class should not be inherited if the build kernel/modules are not intended to support module signing. Signed-off-by: Eric Chanudet <chanudete@ainfosec.com>
1 parent 5f44fce commit 890bfd9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

classes/module-signing.bbclass

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ def get_signing_key(d):
3232
SIGN_FILE = "${STAGING_KERNEL_BUILDDIR}/scripts/sign-file"
3333

3434
fakeroot do_sign_modules() {
35-
if ! grep -q '^CONFIG_MODULE_SIG=y' "${B}/.config"; then
35+
if ! grep -q '^CONFIG_MODULE_SIG=y' "${STAGING_KERNEL_BUILDDIR}/.config"; then
36+
bbnote "Kernel module signing deactivated in kernel configuration ${STAGING_KERNEL_BUILDDIR}/.config."
3637
return
3738
fi
3839
if [ -z "${KERNEL_MODULE_SIG_CERT}" ]; then

0 commit comments

Comments
 (0)