From: Rouven Czerwinski <r.czerwin...@pengutronix.de>

Similar to the helper for i.MX6, this allows us to build HAB enabled
images by selecting KConfig symbols. So far I have only tested signed
images, so there is no support for usb-signed or encrypted images yet.

Signed-off-by: Rouven Czerwinski <r.czerwin...@pengutronix.de>
---
Changelog:
v2:
- unchanged
- v1-link: 
https://lore.barebox.org/barebox/20231010143314.2031253-1-m.fel...@pengutronix.de/T/#t

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

diff --git a/images/Makefile.imx b/images/Makefile.imx
index 8f6e8740d165..76a0f606fe35 100644
--- a/images/Makefile.imx
+++ b/images/Makefile.imx
@@ -21,6 +21,19 @@ endif
 )
 endef
 
+define build_imx8m_habv4img =
+$(eval
+ifeq ($($(strip $(1))), y)
+       pblb-y += $(strip $(2))
+       CFG_$(strip $(2)).pblb.imximg = $(board)/$(strip $(3)).imxcfg
+       FILE_barebox-$(strip $(4)).img    = $(strip $(2)).pblb.pimximg
+       FILE_barebox-$(strip $(4))-s.img  = $(strip $(2)).pblb.psimximg
+       image-y += barebox-$(strip $(4)).img
+       image-$(CONFIG_HABV4_IMAGE_SIGNED) += barebox-$(strip $(4))-s.img
+endif
+)
+endef
+
 # %.imximg - convert into i.MX image
 # ----------------------------------------------------------------
 
-- 
2.39.2


Reply via email to