From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Sun, 24 Sep 2023 07:44:47 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qkHvE-008zkf-L8 for lore@lore.pengutronix.de; Sun, 24 Sep 2023 07:44:47 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1qkHvD-0006w3-18; Sun, 24 Sep 2023 07:44:47 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qkHuZ-0006YH-Mq; Sun, 24 Sep 2023 07:44:07 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qkHuZ-008ZDs-AR; Sun, 24 Sep 2023 07:44:07 +0200 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1qkHuZ-000VXj-0t; Sun, 24 Sep 2023 07:44:07 +0200 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Sun, 24 Sep 2023 07:44:07 +0200 Message-Id: <20230924054407.121244-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230912165759.3492269-2-rhi@pengutronix.de> References: <20230912165759.3492269-2-rhi@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] templates: add template for custom FIT images X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Roland Hieber Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as c9659e6c318f1291186316c98bfcf1bcd047cdca. Michael [sent from post-receive hook] On Sun, 24 Sep 2023 07:44:07 +0200, Roland Hieber wrote: > Signed-off-by: Roland Hieber > Message-Id: <20230912165759.3492269-2-rhi@pengutronix.de> > Signed-off-by: Michael Olbrich > > diff --git a/rules/templates/template-image-fit-in b/rules/templates/template-image-fit-in > new file mode 100644 > index 000000000000..1a89153fc185 > --- /dev/null > +++ b/rules/templates/template-image-fit-in > @@ -0,0 +1,10 @@ > +## SECTION=image > + > +config IMAGE_@PACKAGE@ > + tristate > + select HOST_U_BOOT_TOOLS > + @select_CODE_SIGNING@select IMAGE_KERNEL > + select IMAGE_ROOT_CPIO > + prompt "Generate images/@package@.fit" > + help > + FIXME > diff --git a/rules/templates/template-image-fit-make b/rules/templates/template-image-fit-make > new file mode 100644 > index 000000000000..cd57d24df76c > --- /dev/null > +++ b/rules/templates/template-image-fit-make > @@ -0,0 +1,34 @@ > +# -*-makefile-*- > +# > +# Copyright (C) @YEAR@ by @AUTHOR@ > +# > +# For further information about the PTXdist project and license conditions > +# see the README file. > +# > + > +# > +# We provide this package > +# > +IMAGE_PACKAGES-$(PTXCONF_IMAGE_@PACKAGE@) += image-@package@ > + > +# > +# Paths and names > +# > +IMAGE_@PACKAGE@ := image-@package@ > +IMAGE_@PACKAGE@_DIR := $(BUILDDIR)/$(IMAGE_@PACKAGE@) > +IMAGE_@PACKAGE@_IMAGE := $(IMAGEDIR)/@package@.fit > +IMAGE_@PACKAGE@_VERSION := ${PTXCONF_PROJECT_VERSION} > +IMAGE_@PACKAGE@_KERNEL = $(IMAGE_KERNEL_IMAGE) > +IMAGE_@PACKAGE@_DTB = # TODO: $(IMAGEDIR)/your-board.dtb > +IMAGE_@PACKAGE@_INITRAMFS = $(IMAGE_ROOT_CPIO_IMAGE) > +@CODE_SIGNING_VARS@ > +# ---------------------------------------------------------------------------- > +# Image > +# ---------------------------------------------------------------------------- > + > +$(IMAGE_@PACKAGE@_IMAGE): $(IMAGE_@PACKAGE@_KERNEL) $(IMAGE_@PACKAGE@_INITRAMFS) $(IMAGE_@PACKAGE@_DTB) > + @$(call targetinfo) > + @$(call world/image-fit, IMAGE_@PACKAGE@) > + @$(call finish) > + > +# vim: syntax=make > diff --git a/scripts/lib/ptxd_lib_template.sh b/scripts/lib/ptxd_lib_template.sh > index 30cc48d6c9b0..f8f188e148ac 100644 > --- a/scripts/lib/ptxd_lib_template.sh > +++ b/scripts/lib/ptxd_lib_template.sh > @@ -598,6 +598,31 @@ export -f ptxd_template_new_image_tgz > ptxd_template_help_list[${#ptxd_template_help_list[@]}]="image-tgz" > ptxd_template_help_list[${#ptxd_template_help_list[@]}]="create package for a tgz image" > > +ptxd_template_new_image_fit() { > + export class="image-" > + ptxd_template_read_name && > + ptxd_template_read_author && > + ptxd_template_read "sign FIT image? (y/N)" SIGN > + case "$SIGN" in > + y*|Y*) > + export select_CODE_SIGNING="select CODE_SIGNING > + " > + export CODE_SIGNING_VARS=" > +IMAGE_@PACKAGE@_SIGN_ROLE := # TODO: role name of the code signing provider, passed to cs_get_uri > +IMAGE_@PACKAGE@_KEY_NAME_HINT := # TODO: key-name-hint property in the signature node of the FIT image > +" > + ;; > + *) > + export select_CODE_SIGNING="" > + export CODE_SIGNING_VARS="" > + ;; > + esac > + ptxd_template_write_platform_rules > +} > +export -f ptxd_template_new_image_fit > +ptxd_template_help_list[${#ptxd_template_help_list[@]}]="image-fit" > +ptxd_template_help_list[${#ptxd_template_help_list[@]}]="create package for a FIT image" > + > ptxd_template_new_image_genimage() { > export class="image-" > ptxd_template_read_name &&