diff options
Diffstat (limited to 'meta/classes-recipe/kernel-fitimage.bbclass')
-rw-r--r-- | meta/classes-recipe/kernel-fitimage.bbclass | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass index 92e236a0a4..b77747404f 100644 --- a/meta/classes-recipe/kernel-fitimage.bbclass +++ b/meta/classes-recipe/kernel-fitimage.bbclass | |||
@@ -89,6 +89,9 @@ FIT_CONF_PREFIX[doc] = "Prefix to use for FIT configuration node name" | |||
89 | 89 | ||
90 | FIT_SUPPORTED_INITRAMFS_FSTYPES ?= "cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.zst cpio.gz ext2.gz cpio" | 90 | FIT_SUPPORTED_INITRAMFS_FSTYPES ?= "cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.zst cpio.gz ext2.gz cpio" |
91 | 91 | ||
92 | # Allow user to select the default DTB for FIT image when multiple dtb's exists. | ||
93 | FIT_CONF_DEFAULT_DTB ?= "" | ||
94 | |||
92 | # Keys used to sign individually image nodes. | 95 | # Keys used to sign individually image nodes. |
93 | # The keys to sign image nodes must be different from those used to sign | 96 | # The keys to sign image nodes must be different from those used to sign |
94 | # configuration nodes, otherwise the "required" property, from | 97 | # configuration nodes, otherwise the "required" property, from |
@@ -412,6 +415,7 @@ fitimage_emit_section_config() { | |||
412 | bootscr_line="" | 415 | bootscr_line="" |
413 | setup_line="" | 416 | setup_line="" |
414 | default_line="" | 417 | default_line="" |
418 | default_dtb_image="${FIT_CONF_DEFAULT_DTB}" | ||
415 | 419 | ||
416 | dtb_image_sect=$(symlink_points_below $dtb_image "${EXTERNAL_KERNEL_DEVICETREE}") | 420 | dtb_image_sect=$(symlink_points_below $dtb_image "${EXTERNAL_KERNEL_DEVICETREE}") |
417 | if [ -z "$dtb_image_sect" ]; then | 421 | if [ -z "$dtb_image_sect" ]; then |
@@ -462,7 +466,17 @@ fitimage_emit_section_config() { | |||
462 | # default node is selected based on dtb ID if it is present, | 466 | # default node is selected based on dtb ID if it is present, |
463 | # otherwise its selected based on kernel ID | 467 | # otherwise its selected based on kernel ID |
464 | if [ -n "$dtb_image" ]; then | 468 | if [ -n "$dtb_image" ]; then |
465 | default_line="default = \"${FIT_CONF_PREFIX}$dtb_image\";" | 469 | # Select default node as user specified dtb when |
470 | # multiple dtb exists. | ||
471 | if [ -n "$default_dtb_image" ]; then | ||
472 | if [ -s "${EXTERNAL_KERNEL_DEVICETREE}/$default_dtb_image" ]; then | ||
473 | default_line="default = \"${FIT_CONF_PREFIX}$default_dtb_image\";" | ||
474 | else | ||
475 | bbwarn "Couldn't find a valid user specified dtb in ${EXTERNAL_KERNEL_DEVICETREE}/$default_dtb_image" | ||
476 | fi | ||
477 | else | ||
478 | default_line="default = \"${FIT_CONF_PREFIX}$dtb_image\";" | ||
479 | fi | ||
466 | else | 480 | else |
467 | default_line="default = \"${FIT_CONF_PREFIX}$kernel_id\";" | 481 | default_line="default = \"${FIT_CONF_PREFIX}$kernel_id\";" |
468 | fi | 482 | fi |