summaryrefslogtreecommitdiffstats
path: root/scripts/lib
diff options
context:
space:
mode:
authorRoland Hieber <rhi@pengutronix.de>2023-09-12 18:57:58 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2023-09-15 12:49:13 +0200
commitc9659e6c318f1291186316c98bfcf1bcd047cdca (patch)
treeec06b65fa5222b32d3675f534ccd4d340eafecac /scripts/lib
parent7205e52a301ce552aa5a5c1a5e257b1609822b80 (diff)
downloadptxdist-c9659e6c318f1291186316c98bfcf1bcd047cdca.tar.gz
ptxdist-c9659e6c318f1291186316c98bfcf1bcd047cdca.tar.xz
templates: add template for custom FIT images
Signed-off-by: Roland Hieber <rhi@pengutronix.de> Message-Id: <20230912165759.3492269-2-rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/ptxd_lib_template.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_lib_template.sh b/scripts/lib/ptxd_lib_template.sh
index 30cc48d6c..f8f188e14 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 &&