diff options
-rw-r--r-- | meta/classes/kernel-fitimage.bbclass | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass index 3cd4a45bbe..27e17db951 100644 --- a/meta/classes/kernel-fitimage.bbclass +++ b/meta/classes/kernel-fitimage.bbclass | |||
@@ -67,6 +67,9 @@ FIT_CONF_PREFIX[doc] = "Prefix to use for FIT configuration node name" | |||
67 | 67 | ||
68 | FIT_SUPPORTED_INITRAMFS_FSTYPES ?= "cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.zst cpio.gz ext2.gz cpio" | 68 | FIT_SUPPORTED_INITRAMFS_FSTYPES ?= "cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.zst cpio.gz ext2.gz cpio" |
69 | 69 | ||
70 | # Allow user to select the default DTB for FIT image when multiple dtb's exists. | ||
71 | FIT_CONF_DEFAULT_DTB ?= "" | ||
72 | |||
70 | # Keys used to sign individually image nodes. | 73 | # Keys used to sign individually image nodes. |
71 | # The keys to sign image nodes must be different from those used to sign | 74 | # The keys to sign image nodes must be different from those used to sign |
72 | # configuration nodes, otherwise the "required" property, from | 75 | # configuration nodes, otherwise the "required" property, from |
@@ -369,6 +372,7 @@ fitimage_emit_section_config() { | |||
369 | bootscr_line="" | 372 | bootscr_line="" |
370 | setup_line="" | 373 | setup_line="" |
371 | default_line="" | 374 | default_line="" |
375 | default_dtb_image="${FIT_CONF_DEFAULT_DTB}" | ||
372 | 376 | ||
373 | # conf node name is selected based on dtb ID if it is present, | 377 | # conf node name is selected based on dtb ID if it is present, |
374 | # otherwise its selected based on kernel ID | 378 | # otherwise its selected based on kernel ID |
@@ -411,7 +415,17 @@ fitimage_emit_section_config() { | |||
411 | # default node is selected based on dtb ID if it is present, | 415 | # default node is selected based on dtb ID if it is present, |
412 | # otherwise its selected based on kernel ID | 416 | # otherwise its selected based on kernel ID |
413 | if [ -n "$dtb_image" ]; then | 417 | if [ -n "$dtb_image" ]; then |
414 | default_line="default = \"${FIT_CONF_PREFIX}$dtb_image\";" | 418 | # Select default node as user specified dtb when |
419 | # multiple dtb exists. | ||
420 | if [ -n "$default_dtb_image" ]; then | ||
421 | if [ -s "${EXTERNAL_KERNEL_DEVICETREE}/$default_dtb_image" ]; then | ||
422 | default_line="default = \"${FIT_CONF_PREFIX}$default_dtb_image\";" | ||
423 | else | ||
424 | bbwarn "Couldn't find a valid user specified dtb in ${EXTERNAL_KERNEL_DEVICETREE}/$default_dtb_image" | ||
425 | fi | ||
426 | else | ||
427 | default_line="default = \"${FIT_CONF_PREFIX}$dtb_image\";" | ||
428 | fi | ||
415 | else | 429 | else |
416 | default_line="default = \"${FIT_CONF_PREFIX}$kernel_id\";" | 430 | default_line="default = \"${FIT_CONF_PREFIX}$kernel_id\";" |
417 | fi | 431 | fi |