[PATCH 4/5] images: imx: Add targets for signed encrypted images

Marcin Niestroj m.niestroj at grinn-global.com
Mon Sep 3 03:57:14 PDT 2018


Add .esimximg and .esimximg.dek targets for signed and encrypted
images and their corresponding DEKs. Also add rule to generate final
.img.dek files.

As an example, adding encrypted images for imx6ull_evk would look like
this:

  FILE_barebox-nxp-imx6ull-evk-encrypted.img = start_nxp_imx6ull_evk.pblx.esimximg
  image-$(CONFIG_MACH_NXP_IMX6ULL_EVK) += barebox-nxp-imx6ull-evk-encrypted.img

  FILE_barebox-nxp-imx6ull-evk-encrypted.img.dek = start_nxp_imx6ull_evk.pblx.esimximg.dek
  image-$(CONFIG_MACH_NXP_IMX6ULL_EVK) += barebox-nxp-imx6ull-evk-encrypted.img.dek

Signed-off-by: Marcin Niestroj <m.niestroj at grinn-global.com>
---
Changes rfc -> v1:
 * Add Makefile rule for .dek files

 images/Makefile.imx | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/images/Makefile.imx b/images/Makefile.imx
index aefc52af4..156eb6478 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -20,6 +20,14 @@ $(obj)/%.simximg: $(obj)/% FORCE
 $(obj)/%.usimximg: $(obj)/% FORCE
 	$(call if_changed,imx_image,$(CFG_$(patsubst %.usimximg,%.imximg,$(@F))),-s -u)
 
+$(obj)/%.esimximg $(obj)/%.esimximg.dek: $(obj)/% FORCE
+	$(call if_changed,imx_image,$(CFG_$(patsubst %.esimximg,%.imximg,$(@F))),-s -e)
+
+.SECONDEXPANSION:
+$(obj)/%.img.dek: $(obj)/$$(FILE_$$(@F))
+	$(Q)if [ -z $(FILE_$(@F)) ]; then echo "FILE_$(@F) empty!"; false; fi
+	$(call if_changed,shipped)
+
 quiet_cmd_imx_sram_img ?= IMX-SRAM-IMG    $@
       cmd_imx_sram_img ?= cat $(obj)/$(patsubst %.imx-sram-img,%.pblb,$(2)) > $@; \
 		  $(call size_append, $(obj)/barebox.z) >> $@; \
-- 
2.18.0




More information about the barebox mailing list