Signed-off-by: Roland Hieber <r...@pengutronix.de> --- rules/templates/template-image-fit-in | 8 ++++++ rules/templates/template-image-fit-make | 34 +++++++++++++++++++++++++ scripts/lib/ptxd_lib_template.sh | 25 ++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 rules/templates/template-image-fit-in create mode 100644 rules/templates/template-image-fit-make
diff --git a/rules/templates/template-image-fit-in b/rules/templates/template-image-fit-in new file mode 100644 index 000000000000..ac5606dd0d89 --- /dev/null +++ b/rules/templates/template-image-fit-in @@ -0,0 +1,8 @@ +## SECTION=image + +config IMAGE_@PACKAGE@ + tristate + @select_CODE_SIGNING@# TODO: select kernel and initrd image + 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..265b7e6350c7 --- /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 := +IMAGE_@PACKAGE@_KERNEL = # TODO: $(IMAGEDIR)/linuximage +IMAGE_@PACKAGE@_DTB = # TODO: $(IMAGEDIR)/your-board.dtb +IMAGE_@PACKAGE@_INITRAMFS = # optional: $(IMAGEDIR)/your-initramfs +@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 && -- 2.39.2