@@ -546,12 +546,21 @@ fitimage_assemble() {
if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ]; then
dtbcount=1
- for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name '*.dtb' -o -name '*.dtbo' \) -printf '%P\n' | sort); do
+ for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" -name '*.dtb' -printf '%P\n' | sort); do
DTB=$(echo "$DTB" | tr '/' '_')
# Skip DTB if we've picked it up previously
echo "$DTBS" | tr ' ' '\n' | grep -xq "$DTB" && continue
+ DTBS="$DTBS $DTB"
+ fitimage_emit_section_dtb $1 $DTB "${EXTERNAL_KERNEL_DEVICETREE}/$DTB"
+ done
+ for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" -name '*.dtbo' -printf '%P\n' | sort); do
+ DTB=$(echo "$DTB" | tr '/' '_')
+
+ # Skip DTBO if we've picked it up previously
+ echo "$DTBS" | tr ' ' '\n' | grep -xq "$DTB" && continue
+
DTBS="$DTBS $DTB"
fitimage_emit_section_dtb $1 $DTB "${EXTERNAL_KERNEL_DEVICETREE}/$DTB"
done
The dtb files must be before the dtbo files, otherwise the overlays may not be applied correctly. From Bruce Ashfield: We can split between dtbs and dtbos, they just need to be sorted for reproducibility reasons. Two loops versus one, would be fine, with not too much duplicated code. Of course, this was only working by luck previously (before the sort), since it has always been gathering dtbs and dtbo's with find, depending on filesystem ordering for the order in the fitimage). Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> --- meta/classes-recipe/kernel-fitimage.bbclass | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)