diff mbox series

[warrior] kernel.bbclass: fix installation of modules signing certificates

Message ID 20191011081649.18474-1-nicolas.dechesne@linaro.org
State New
Headers show
Series [warrior] kernel.bbclass: fix installation of modules signing certificates | expand

Commit Message

Nicolas Dechesne Oct. 11, 2019, 8:16 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>


If one has provided external key/certificate for modules signing, Kbuild
will skip creating signing_key.pem and will write only signing_key.x509
certificate. Thus we have to check for .x509 file existence rather than
.pem one.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

(cherry picked from commit 2527e731eba43bd36d0ea268aca6b03155376134)
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>

---
 meta/classes/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.20.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Armin Kuster Oct. 12, 2019, 4:57 p.m. UTC | #1
On 10/11/19 1:16 AM, Nicolas Dechesne wrote:
> From: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>

>

> If one has provided external key/certificate for modules signing, Kbuild

> will skip creating signing_key.pem and will write only signing_key.x509

> certificate. Thus we have to check for .x509 file existence rather than

> .pem one.


Is this true for all the kernel versions supported by warrior?

- armin
>

> Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>

> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

> (cherry picked from commit 2527e731eba43bd36d0ea268aca6b03155376134)

> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>

> ---

>  meta/classes/kernel.bbclass | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass

> index 111a0b2eeb..fb1f49327c 100644

> --- a/meta/classes/kernel.bbclass

> +++ b/meta/classes/kernel.bbclass

> @@ -453,7 +453,7 @@ 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

> +	if [ -e certs/signing_key.x509 ]; then

>  		# The signing_key.* files are stored in the certs/ dir in

>  		# newer Linux kernels

>  		mkdir -p $kerneldir/certs


-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Dmitry Baryshkov Oct. 12, 2019, 10:02 p.m. UTC | #2
сб, 12 окт. 2019 г. в 19:57, akuster808 <akuster808@gmail.com>:
>
>
>
> On 10/11/19 1:16 AM, Nicolas Dechesne wrote:
> > From: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
> >
> > If one has provided external key/certificate for modules signing, Kbuild
> > will skip creating signing_key.pem and will write only signing_key.x509
> > certificate. Thus we have to check for .x509 file existence rather than
> > .pem one.
>
> Is this true for all the kernel versions supported by warrior?

Answer to both questions is "yes".

>
> - armin
> >
> > Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin-solenikov@mentor.com>
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > (cherry picked from commit 2527e731eba43bd36d0ea268aca6b03155376134)
> > Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
> > ---
> >  meta/classes/kernel.bbclass | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> > index 111a0b2eeb..fb1f49327c 100644
> > --- a/meta/classes/kernel.bbclass
> > +++ b/meta/classes/kernel.bbclass
> > @@ -453,7 +453,7 @@ 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
> > +     if [ -e certs/signing_key.x509 ]; then
> >               # The signing_key.* files are stored in the certs/ dir in
> >               # newer Linux kernels
> >               mkdir -p $kerneldir/certs
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 111a0b2eeb..fb1f49327c 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -453,7 +453,7 @@  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
+	if [ -e certs/signing_key.x509 ]; then
 		# The signing_key.* files are stored in the certs/ dir in
 		# newer Linux kernels
 		mkdir -p $kerneldir/certs