From 41c15b1baebd0dd3d31a01f09d593d0f0db085b6 Mon Sep 17 00:00:00 2001 From: Ninad Palsule Date: Wed, 27 Sep 2023 09:34:22 -0500 Subject: [PATCH] kernel-fitImage: Strip path component from dtb Machines that have added subdirectires to the KERNEL_DEVICETREE recently, such as arm32 boards that were moved under subdirectories in Linux 6.5, will have that subdirectory in the node name of the FIT. This breaks existing systems that select a configuration in u-boot by it's name. Strip off the directory component from the device tree to preserve compatibility. (From OE-Core rev: 941ba1a132bafa9c9be855fb91fec96d8b06299f) Signed-off-by: Joel Stanley Signed-off-by: Ninad Palsule Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/classes-recipe/kernel-fitimage.bbclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass index 13e8947f09..7e30a5d47e 100644 --- a/meta/classes-recipe/kernel-fitimage.bbclass +++ b/meta/classes-recipe/kernel-fitimage.bbclass @@ -599,6 +599,11 @@ fitimage_assemble() { DTB_PATH="${KERNEL_OUTPUT_DIR}/$DTB" fi + # Strip off the path component from the filename + if "${@'false' if oe.types.boolean(d.getVar('KERNEL_DTBVENDORED')) else 'true'}"; then + DTB=`basename $DTB` + fi + # Set the default dtb image if it exists in the devicetree. if [ ${FIT_CONF_DEFAULT_DTB} = $DTB ];then default_dtb_image=$(echo "$DTB" | tr '/' '_')