summaryrefslogtreecommitdiffstats
path: root/images
diff options
context:
space:
mode:
authorMarcin Niestroj <m.niestroj@grinn-global.com>2018-09-03 12:57:14 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-09-04 10:16:47 +0200
commit6f56b955bdc6f072687f56a1c851d419512bc056 (patch)
treeec74eb47222e3eec67455c8b797e42c3f7e19a2c /images
parentc953b05c3a66b72ddf59877168f5efc4c3782c06 (diff)
downloadbarebox-6f56b955bdc6f072687f56a1c851d419512bc056.tar.gz
barebox-6f56b955bdc6f072687f56a1c851d419512bc056.tar.xz
images: imx: Add targets for signed encrypted images
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@grinn-global.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'images')
-rw-r--r--images/Makefile.imx8
1 files changed, 8 insertions, 0 deletions
diff --git a/images/Makefile.imx b/images/Makefile.imx
index aefc52af49..156eb64781 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) >> $@; \