summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/classes/kernel-fitimage-legacyhs.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ti-bsp/classes/kernel-fitimage-legacyhs.bbclass')
-rw-r--r--meta-ti-bsp/classes/kernel-fitimage-legacyhs.bbclass23
1 files changed, 16 insertions, 7 deletions
diff --git a/meta-ti-bsp/classes/kernel-fitimage-legacyhs.bbclass b/meta-ti-bsp/classes/kernel-fitimage-legacyhs.bbclass
index 5e1fa56a..61813555 100644
--- a/meta-ti-bsp/classes/kernel-fitimage-legacyhs.bbclass
+++ b/meta-ti-bsp/classes/kernel-fitimage-legacyhs.bbclass
@@ -316,6 +316,7 @@ EOF
316# $4 ... ramdisk ID 316# $4 ... ramdisk ID
317# $5 ... config ID 317# $5 ... config ID
318# $6 ... tee ID/name 318# $6 ... tee ID/name
319# $7 ... default DTB ID
319fitimage_emit_section_config() { 320fitimage_emit_section_config() {
320 321
321 conf_csum=${FITIMAGE_HASH_ALGO} 322 conf_csum=${FITIMAGE_HASH_ALGO}
@@ -370,6 +371,16 @@ fitimage_emit_section_config() {
370 final_conf_desc="${conf_desc}" 371 final_conf_desc="${conf_desc}"
371 fi 372 fi
372 373
374 default_dtb_count=${7}
375 if [ "x${FITIMAGE_CONF_BY_NAME}" = "x1" ] ; then
376 default_conf_name="${FIT_CONF_DEFAULT_DTB}"
377 else
378 default_conf_name="conf-${default_dtb_count}"
379 fi
380 cat << EOF >> ${1}
381 default = "${default_conf_name}";
382EOF
383
373 dtbcount=1 384 dtbcount=1
374 for DTB in ${KERNEL_DEVICETREE}; do 385 for DTB in ${KERNEL_DEVICETREE}; do
375 DTB=$(basename "${DTB}") 386 DTB=$(basename "${DTB}")
@@ -386,12 +397,6 @@ fitimage_emit_section_config() {
386 fdt_line="fdt = \"fdt-${dtbcount}\";" 397 fdt_line="fdt = \"fdt-${dtbcount}\";"
387 fi 398 fi
388 399
389 if [ "x${dtbcount}" = "x1" ]; then
390 cat << EOF >> ${1}
391 default = "${conf_name}";
392EOF
393 fi
394
395# Generate a single configuration section 400# Generate a single configuration section
396 cat << EOF >> ${1} 401 cat << EOF >> ${1}
397 ${conf_name} { 402 ${conf_name} {
@@ -524,6 +529,7 @@ fitimage_assemble() {
524 ramdiskcount=${3} 529 ramdiskcount=${3}
525 setupcount="" 530 setupcount=""
526 teecount=1 531 teecount=1
532 default_dtb_count=1
527 rm -f ${1} arch/${ARCH}/boot/${2} 533 rm -f ${1} arch/${ARCH}/boot/${2}
528 534
529 fitimage_emit_fit_header ${1} 535 fitimage_emit_fit_header ${1}
@@ -544,6 +550,9 @@ fitimage_assemble() {
544 dtbcount=1 550 dtbcount=1
545 dtboaddress="${UBOOT_DTBO_LOADADDRESS}" 551 dtboaddress="${UBOOT_DTBO_LOADADDRESS}"
546 for DTB in ${KERNEL_DEVICETREE}; do 552 for DTB in ${KERNEL_DEVICETREE}; do
553 if [ "${DTB}" = "${FIT_CONF_DEFAULT_DTB}" ]; then
554 default_dtb_count=${dtbcount}
555 fi
547 if echo ${DTB} | grep -q '/dts/'; then 556 if echo ${DTB} | grep -q '/dts/'; then
548 bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used." 557 bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
549 DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'` 558 DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
@@ -660,7 +669,7 @@ fitimage_assemble() {
660 else 669 else
661 teeref="${teecount}" 670 teeref="${teecount}"
662 fi 671 fi
663 fitimage_emit_section_config ${1} "${kernelcount}" "${dtbref}" "${ramdiskcount}" "${setupcount}" "${teeref}" 672 fitimage_emit_section_config ${1} "${kernelcount}" "${dtbref}" "${ramdiskcount}" "${setupcount}" "${teeref}" "${default_dtb_count}"
664 673
665 fitimage_emit_section_maint ${1} sectend 674 fitimage_emit_section_maint ${1} sectend
666 675