From 2dfbf89d67d4e012c0e8729540eda311633c33df Mon Sep 17 00:00:00 2001 From: Mattias Waldo Date: Thu, 1 Sep 2016 16:36:25 +0200 Subject: kernel.bbclass: include signing keys when copying files required for module builds The absence of signing_key.* in $kerneldir made signing of out-of-tree kernel modules fail (silently). Add copying of these files during the shared_workdir task. Signed-off-by: Mattias Waldo Signed-off-by: Richard Purdie --- meta/classes/kernel.bbclass | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 023e308869..d6a0ca8504 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -360,6 +360,14 @@ do_shared_workdir () { cp .config $kerneldir/ mkdir -p $kerneldir/include/config cp include/config/kernel.release $kerneldir/include/config/kernel.release + if [ -e certs/signing_key.pem ]; then + # The signing_key.* files are stored in the certs/ dir in + # newer Linux kernels + mkdir -p $kerneldir/certs + cp certs/signing_key.* $kerneldir/certs/ + elif [ -e signing_key.priv ]; then + cp signing_key.* $kerneldir/ + fi # We can also copy over all the generated files and avoid special cases # like version.h, but we've opted to keep this small until file creep starts -- cgit 1.2.3-korg