kernel-fitImage: allow overwrite the configuration dtb label
A message that is not in the archive (sent off-list or not yet received): [email protected]
This allows to provide a custom label for each dtb without having to overwrite the whole function.
--- meta/classes-recipe/kernel-fitimage.bbclass | 25 ++++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-)
meta/classes-recipe/kernel-fitimage.bbclass +17 -8
@@ -382,6 +382,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 #
@@ -442,7 +451,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
@@ -480,13 +489,13 @@ 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. + 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
--
2.43.0
Internal
Does the master branch allow this? I can't see a similar commit there, so it would need to be submitted there first.
Since this is a new feature, there would need to be some discussion as to whether this would be appropriate for stable branches.
Steve
Quoted 75 lines · Oliver ROHE via lists.openembedded.org
This allows to provide a custom label for each dtb without having to overwrite the whole function.
Signed-off-by Oliver Rohe <[email protected]>Signed-off-by Mathieu Dubois-Briand <[email protected]>--- meta/classes-recipe/kernel-fitimage.bbclass | 25 ++++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-)meta/classes-recipe/kernel-fitimage.bbclass +17
-9@@ -382,6 +382,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 #@@ -442,7 +451,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@@ -480,13 +489,13 @@ 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. + 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 --2.43.0
Internal
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#216854): https://lists.openembedded.org/g/openembedded-core/message/216854
Mute This Topic: https://lists.openembedded.org/mt/113189715/3620601
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Hi Steve,
Quoted 4 lines
Does the master branch allow this? I can't see a similar commit there, so it would need to be submitted there first.
Since this is a new feature, there would need to be some discussion as to whether this would be appropriate for stable branches.
The patch is already on the next, sorry I am a little bit ahead :) I can ping you again once it makes it into the master. Thx a lot!!
Internal
________________________________________
From: Steve Sakoman <[email protected]>
Sent: Monday, May 19, 2025 5:48 PM
To: Oliver ROHE
Cc: [email protected]
Subject: Re: [OE-core] [scarthgap] kernel-fitImage: allow overwrite the configuration dtb label
Does the master branch allow this? I can't see a similar commit there, so it would need to be submitted there first. Since this is a new feature, there would need to be some discussion as to whether this would be appropriate for stable branches. ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
Please use caution when clicking on links or opening attachments!
ZjQcmQRYFpfptBannerEnd
Does the master branch allow this? I can't see a similar commit there, so it would need to be submitted there first.
Since this is a new feature, there would need to be some discussion as to whether this would be appropriate for stable branches.
Steve
Quoted 75 lines · Oliver ROHE via lists.openembedded.org
This allows to provide a custom label for each dtb without having to overwrite the whole function.
Signed-off-by Oliver Rohe <[email protected]>Signed-off-by Mathieu Dubois-Briand <[email protected]>--- meta/classes-recipe/kernel-fitimage.bbclass | 25 +-+-+-+-+-+-+-+-+-+-+-+-+-+-------- 1 file changed, 17 insertions(+-), 8 deletions(-)meta/classes-recipe/kernel-fitimage.bbclass +1
-1--- a/meta/classes-recipe/kernel-fitimage.bbclass +-+-+- b/meta/classes-recipe/kernel-fitimage.bbclass@@ -382,6 +-382,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 #
@@ -442,7 +-451,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 @@ -480,13 +-489,13 @@ 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" ]; thenmeta/classes-recipe/kernel-fitimage.bbclass +7
-8- # 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. +- 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 --2.43.0
Internal
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#216854): https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/message/216854__;!!B6Ltl4Q!uMGd9cVJYlgmmgM2omZGiLPwbnvFT9Nq_aQ7xbbhAQcFmqgQrRdSYSjGjLGkHPQKZqJtktrwRWw4Gg$
Mute This Topic: https://urldefense.com/v3/__https://lists.openembedded.org/mt/113189715/3620601__;!!B6Ltl4Q!uMGd9cVJYlgmmgM2omZGiLPwbnvFT9Nq_aQ7xbbhAQcFmqgQrRdSYSjGjLGkHPQKZqJtktrMDDl7Ew$
Group Owner: [email protected]
Unsubscribe: https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/unsub__;!!B6Ltl4Q!uMGd9cVJYlgmmgM2omZGiLPwbnvFT9Nq_aQ7xbbhAQcFmqgQrRdSYSjGjLGkHPQKZqJtktqpvnYCZQ$ [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-