Skip to contentSkip to conversation

kernel-fitImage: add machine compatible to config section

PATCH New Denis OSTERLAND-HEIM 1 participant 1 message Jul 31, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-fitImage: add machine compatible to config section

to allow bootloaders to select best machting configuration based on compatible string.

---
 meta/classes-recipe/kernel-fitimage.bbclass | 4 ++++
 1 file changed, 4 insertions(+)
(quoted diff) +0 -0

b/meta/classes-recipe/kernel-fitimage.bbclass
index f1c46a453c..13e8947f09 100644

meta/classes-recipe/kernel-fitimage.bbclass +2 -0
@@ -427,6 +427,9 @@ fitimage_emit_section_config() {
 		dtb_image_sect=$dtb_image
 	fi
 
+	dtb_path="${EXTERNAL_KERNEL_DEVICETREE}/${dtb_image_sect}"
+	compatible_line="compatible = \"$(fdtget "$dtb_path" / compatible |

sed 's/ /", "/g')\";"
+
dtb_image=$(echo $dtb_image | tr '/' '_') dtb_image_sect=$(echo "${dtb_image_sect}" | tr '/' '_')

@@ -487,6 +490,7 @@ fitimage_emit_section_config() {
                 $default_line
                 $conf_node {
                         description = "$default_flag $conf_desc";

+ $compatible_line
$kernel_line
$fdt_line
$ramdisk_line

Signature · 1 line
2.39.3