mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] bootm: fit: add option to add DT snipped that contains fit public key
@ 2018-02-09 10:01 Sascha Hauer
  2018-02-09 10:50 ` Marc Kleine-Budde
  0 siblings, 1 reply; 3+ messages in thread
From: Sascha Hauer @ 2018-02-09 10:01 UTC (permalink / raw)
  To: Barebox List

From: Marc Kleine-Budde <mkl@pengutronix.de>

This makes it easier for build systems to include a configurable dts
snippet which holds the public keys for FIT images.

Usage:

Add to your dts:

 #ifdef CONFIG_BOOTM_FITIMAGE_PUBKEY
 #include CONFIG_BOOTM_FITIMAGE_PUBKEY
 #endif

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/Kconfig       | 7 +++++++
 scripts/Makefile.lib | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/common/Kconfig b/common/Kconfig
index 93b1d89274..33e15490e9 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -632,6 +632,13 @@ config BOOTM_FITIMAGE_SIGNATURE
 	  Additionally the barebox device tree needs a /signature node with the
 	  public key with which the image has been signed.
 
+config BOOTM_FITIMAGE_PUBKEY
+	string "Path to dtsi containing pubkey"
+	default "../fit/pubkey.dtsi"
+	depends on BOOTM_FITIMAGE_SIGNATURE
+	help
+	  FIXME
+
 config BOOTM_FORCE_SIGNED_IMAGES
 	bool
 	prompt "Force booting of signed images"
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 932a779d6c..7a1bf07e66 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -157,6 +157,12 @@ dtc_cpp_flags  = -Wp,-MD,$(depfile).pre -nostdinc                        \
 		 -I$(srctree)/dts/src/                                   \
 		 -undef -D__DTS__
 
+ifdef CONFIG_BOOTM_FITIMAGE_PUBKEY
+ifneq ($(CONFIG_BOOTM_FITIMAGE_PUBKEY),"")
+dtc_cpp_flags += -DCONFIG_BOOTM_FITIMAGE_PUBKEY=\"$(CONFIG_BOOTM_FITIMAGE_PUBKEY)\"
+endif
+endif
+
 # Finds the multi-part object the current object will be linked into
 modname-multi = $(sort $(foreach m,$(multi-used),\
 		$(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=))))
-- 
2.15.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bootm: fit: add option to add DT snipped that contains fit public key
  2018-02-09 10:01 [PATCH] bootm: fit: add option to add DT snipped that contains fit public key Sascha Hauer
@ 2018-02-09 10:50 ` Marc Kleine-Budde
  2018-02-13  8:00   ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Kleine-Budde @ 2018-02-09 10:50 UTC (permalink / raw)
  To: Sascha Hauer, Barebox List


[-- Attachment #1.1.1: Type: text/plain, Size: 1461 bytes --]

On 02/09/2018 11:01 AM, Sascha Hauer wrote:
> From: Marc Kleine-Budde <mkl@pengutronix.de>
> 
> This makes it easier for build systems to include a configurable dts
> snippet which holds the public keys for FIT images.
> 
> Usage:
> 
> Add to your dts:
> 
>  #ifdef CONFIG_BOOTM_FITIMAGE_PUBKEY
>  #include CONFIG_BOOTM_FITIMAGE_PUBKEY
>  #endif
> 
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  common/Kconfig       | 7 +++++++
>  scripts/Makefile.lib | 6 ++++++
>  2 files changed, 13 insertions(+)
> 
> diff --git a/common/Kconfig b/common/Kconfig
> index 93b1d89274..33e15490e9 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -632,6 +632,13 @@ config BOOTM_FITIMAGE_SIGNATURE
>  	  Additionally the barebox device tree needs a /signature node with the
>  	  public key with which the image has been signed.
>  
> +config BOOTM_FITIMAGE_PUBKEY
> +	string "Path to dtsi containing pubkey"
> +	default "../fit/pubkey.dtsi"
> +	depends on BOOTM_FITIMAGE_SIGNATURE
> +	help
> +	  FIXME

Set Path to a dts snippet which holds the public keys for FIT images.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bootm: fit: add option to add DT snipped that contains fit public key
  2018-02-09 10:50 ` Marc Kleine-Budde
@ 2018-02-13  8:00   ` Sascha Hauer
  0 siblings, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2018-02-13  8:00 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: Barebox List

On Fri, Feb 09, 2018 at 11:50:34AM +0100, Marc Kleine-Budde wrote:
> On 02/09/2018 11:01 AM, Sascha Hauer wrote:
> > From: Marc Kleine-Budde <mkl@pengutronix.de>
> > 
> > This makes it easier for build systems to include a configurable dts
> > snippet which holds the public keys for FIT images.
> > 
> > Usage:
> > 
> > Add to your dts:
> > 
> >  #ifdef CONFIG_BOOTM_FITIMAGE_PUBKEY
> >  #include CONFIG_BOOTM_FITIMAGE_PUBKEY
> >  #endif
> > 
> > Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  common/Kconfig       | 7 +++++++
> >  scripts/Makefile.lib | 6 ++++++
> >  2 files changed, 13 insertions(+)
> > 
> > diff --git a/common/Kconfig b/common/Kconfig
> > index 93b1d89274..33e15490e9 100644
> > --- a/common/Kconfig
> > +++ b/common/Kconfig
> > @@ -632,6 +632,13 @@ config BOOTM_FITIMAGE_SIGNATURE
> >  	  Additionally the barebox device tree needs a /signature node with the
> >  	  public key with which the image has been signed.
> >  
> > +config BOOTM_FITIMAGE_PUBKEY
> > +	string "Path to dtsi containing pubkey"
> > +	default "../fit/pubkey.dtsi"
> > +	depends on BOOTM_FITIMAGE_SIGNATURE
> > +	help
> > +	  FIXME
> 
> Set Path to a dts snippet which holds the public keys for FIT images.

Added the help text, thanks for writing one.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-13  8:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-09 10:01 [PATCH] bootm: fit: add option to add DT snipped that contains fit public key Sascha Hauer
2018-02-09 10:50 ` Marc Kleine-Budde
2018-02-13  8:00   ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox