@@ -344,6 +344,15 @@ symlink_points_below() {
echo "$realpath"
}
+#
+# Simple function to allow overwriting the configuration node label
+#
+# $1 ... DTB image name
+fitimage_emit_section_config_dtb_label() {
+ dtb_img="$1"
+ echo "${FIT_CONF_PREFIX}${dtb_img}"
+}
+
#
# Emit the fitImage ITS configuration section
#
@@ -404,7 +413,7 @@ fitimage_emit_section_config() {
# conf node name is selected based on dtb ID if it is present,
# otherwise its selected based on kernel ID
if [ -n "$dtb_image" ]; then
- conf_node=$conf_node$dtb_image
+ conf_node=$(fitimage_emit_section_config_dtb_label $dtb_image)
else
conf_node=$conf_node$kernel_id
fi
@@ -442,13 +451,14 @@ fitimage_emit_section_config() {
# default node is selected based on dtb ID if it is present,
# otherwise its selected based on kernel ID
if [ -n "$dtb_image" ]; then
- # Select default node as user specified dtb when
- # multiple dtb exists.
- if [ -n "$default_dtb_image" ]; then
- default_line="default = \"${FIT_CONF_PREFIX}$default_dtb_image\";"
- else
- default_line="default = \"${FIT_CONF_PREFIX}$dtb_image\";"
- fi
+ # Select default node as user specified dtb when
+ # multiple dtb exists.
+ if [ -n "$default_dtb_image" ]; then
+ img=$default_dtb_image
+ else
+ img=$dtb_img
+ fi
+ default_line="default = \"$(fitimage_emit_section_config_dtb_label $img)\";"
else
default_line="default = \"${FIT_CONF_PREFIX}$kernel_id\";"
fi
This allows to provide a custom label for each dtb without having to overwrite the whole function. Signed-off-by: Oliver Rohe <oliver.rohe@wago.com> --- meta/classes-recipe/kernel-fitimage.bbclass | 26 ++++++++++++++------- 1 file changed, 18 insertions(+), 8 deletions(-) -- 2.43.0 Internal