summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2014-02-23 13:32:26 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-06-17 20:28:39 +0200
commit80670bcd047a1448a2108139312d3ae0e52d7e9b (patch)
tree8370748c420fb63b2b5279ed0f11e6adf41247c3 /scripts
parent8e51cf92f376363498c314c1a03b3c4b78f297db (diff)
downloadptxdist-80670bcd047a1448a2108139312d3ae0e52d7e9b.tar.gz
ptxdist-80670bcd047a1448a2108139312d3ae0e52d7e9b.tar.xz
add bootloader spec entry template
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_lib_template.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_lib_template.sh b/scripts/lib/ptxd_lib_template.sh
index 3c0529b95..ee9d1260e 100644
--- a/scripts/lib/ptxd_lib_template.sh
+++ b/scripts/lib/ptxd_lib_template.sh
@@ -434,3 +434,26 @@ ptxd_template_new_image_genimage() {
export -f ptxd_template_new_image_genimage
ptxd_template_help_list[${#ptxd_template_help_list[@]}]="image-genimage"
ptxd_template_help_list[${#ptxd_template_help_list[@]}]="create package for a genimage image"
+
+ptxd_template_new_blspec_entry() {
+ export class="blspec-"
+ ptxd_template_read_name &&
+ ptxd_template_read_author &&
+ ptxd_template_read "title" TITLE "PTXdist - $(ptxd_get_ptxconf PTXCONF_PROJECT_VENDOR)-$(ptxd_get_ptxconf PTXCONF_PROJECT)"
+ ptxd_template_read "version" VERSION "$(ptxd_get_ptxconf PTXCONF_KERNEL_VERSION)"
+ ptxd_template_read "kernel command-line" CMDLINE
+ ptxd_template_read "kernel path" KERNEL "/boot/zImage"
+ ptxd_template_read "devicetree path" DEVICETREE "/boot/oftree"
+ export ENTRY="${package_name}.conf"
+ ptxd_template_write_platform_rules
+ local template_file="$(ptxd_template_file "${template}-conf")"
+ local filename="${PTXDIST_PLATFORMCONFIGDIR}/projectroot/loader/entries/${ENTRY}"
+ if ptxd_get_alternative loader/entries "${ENTRY}"; then
+ echo "using existing config file $(ptxd_template_print_path ${ptxd_reply})"
+ else
+ ptxd_template_filter "${template_file}" "${filename}"
+ fi
+}
+export -f ptxd_template_new_blspec_entry
+ptxd_template_help_list[${#ptxd_template_help_list[@]}]="blspec-entry"
+ptxd_template_help_list[${#ptxd_template_help_list[@]}]="create package for a bootloader spec entry"