]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
kernel-fitImage: Strip path component from dtb
authorNinad Palsule <ninad@linux.ibm.com>
Wed, 27 Sep 2023 14:34:22 +0000 (09:34 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 28 Sep 2023 11:37:44 +0000 (12:37 +0100)
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.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/classes-recipe/kernel-fitimage.bbclass

index 13e8947f090380681df47a7cda6c9b34676a3942..7e30a5d47eaac97d34fce984eaeb5a60ef5e6c81 100644 (file)
@@ -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 '/' '_')