]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel-fitimage: sanitize dtb section name (unbreak MIPS)
authorAndré Draszik <adraszik@tycoint.com>
Wed, 20 Sep 2017 09:41:53 +0000 (10:41 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 Sep 2017 13:14:03 +0000 (14:14 +0100)
We can't build fitImages for MIPS any more:
| Error: fit-image.its:21.27-28 syntax error
| FATAL ERROR: Unable to parse input tree
| uboot-mkimage: Can't read arch/mips/boot/fitImage.tmp: Invalid argument

Since commit cd2ed7f80b555add07795cc0cbaee866e6c193a3
("kernel-fitimage: dtb sections named by their filenames
and one config section for each dtb"), commit
1ec405ef5df82884c8997878bbe6c66d924b5127 in yocto, dtb
sections are named by the DTB filename, but the filename
can legally be in a subdirectory below
arch/$arch/boot/dts/, and on MIPS all DTBs are actually
in a subdirectory.

If so, mkimage fails with the above error message.

Unbreak this by replacing the offending character
(directory separator /)

Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/kernel-fitimage.bbclass

index 2630b473168ef029334235e06c546b130d26053d..6f1b7667bc6e47ca4ad6dbf7e299c393de087c23 100644 (file)
@@ -351,6 +351,7 @@ fitimage_assemble() {
                                DTB_PATH="arch/${ARCH}/boot/${DTB}"
                        fi
 
+                       DTB=$(echo "${DTB}" | tr '/' '_')
                        DTBS="${DTBS} ${DTB}"
                        fitimage_emit_section_dtb ${1} ${DTB} ${DTB_PATH}
                done