]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel.bbclass: include signing keys when copying files required for module builds
authorMattias Waldo <mattias.waldo@gmail.com>
Thu, 1 Sep 2016 14:36:25 +0000 (16:36 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 3 Sep 2016 22:45:46 +0000 (23:45 +0100)
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 <mattias.waldo@saabgroup.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel.bbclass

index 023e3088694dcfbda67d41eac1beeb28f8f9260e..d6a0ca850481ee84df06013604bb8e2940f7c75a 100644 (file)
@@ -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