summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/kernel-fitimage.bbclass
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-10-26 15:22:18 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-10-28 09:44:52 +0100
commit8219c822a9655a1cf083f5464f60d7d49f453485 (patch)
treee664c260434b085a4e15c3f942936832c13f97b8 /meta/classes-recipe/kernel-fitimage.bbclass
parent75c609f17fac86b90aafdc7900fc60e06dcc1bbf (diff)
downloadpoky-8219c822a9655a1cf083f5464f60d7d49f453485.tar.gz
kernel-fitimage: mangle slashes to underscores as late as possible
This introduces no functional change, but will come in handy in a later commit where a file lookup will have us using the device tree name. If we keep it like it's now, we will lose the information whether an underscore is an original underscore or a mangled slash. (From OE-Core rev: 8bea426ca59d17715a3b32f7e3caf3e4b6db5ce9) Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/kernel-fitimage.bbclass')
-rw-r--r--meta/classes-recipe/kernel-fitimage.bbclass8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass
index befdf2568c..6307e3c50a 100644
--- a/meta/classes-recipe/kernel-fitimage.bbclass
+++ b/meta/classes-recipe/kernel-fitimage.bbclass
@@ -392,6 +392,8 @@ fitimage_emit_section_config() {
392 setup_line="" 392 setup_line=""
393 default_line="" 393 default_line=""
394 394
395 dtb_image=$(echo $dtb_image | tr '/' '_')
396
395 # conf node name is selected based on dtb ID if it is present, 397 # conf node name is selected based on dtb ID if it is present,
396 # otherwise its selected based on kernel ID 398 # otherwise its selected based on kernel ID
397 if [ -n "$dtb_image" ]; then 399 if [ -n "$dtb_image" ]; then
@@ -550,12 +552,11 @@ fitimage_assemble() {
550 DTB_PATH="${KERNEL_OUTPUT_DIR}/$DTB" 552 DTB_PATH="${KERNEL_OUTPUT_DIR}/$DTB"
551 fi 553 fi
552 554
553 DTB=$(echo "$DTB" | tr '/' '_')
554
555 # Skip DTB if we've picked it up previously 555 # Skip DTB if we've picked it up previously
556 echo "$DTBS" | tr ' ' '\n' | grep -xq "$DTB" && continue 556 echo "$DTBS" | tr ' ' '\n' | grep -xq "$DTB" && continue
557 557
558 DTBS="$DTBS $DTB" 558 DTBS="$DTBS $DTB"
559 DTB=$(echo $DTB | tr '/' '_')
559 fitimage_emit_section_dtb $1 $DTB $DTB_PATH 560 fitimage_emit_section_dtb $1 $DTB $DTB_PATH
560 done 561 done
561 fi 562 fi
@@ -563,12 +564,11 @@ fitimage_assemble() {
563 if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ]; then 564 if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ]; then
564 dtbcount=1 565 dtbcount=1
565 for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name '*.dtb' -o -name '*.dtbo' \) -printf '%P\n' | sort); do 566 for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name '*.dtb' -o -name '*.dtbo' \) -printf '%P\n' | sort); do
566 DTB=$(echo "$DTB" | tr '/' '_')
567
568 # Skip DTB if we've picked it up previously 567 # Skip DTB if we've picked it up previously
569 echo "$DTBS" | tr ' ' '\n' | grep -xq "$DTB" && continue 568 echo "$DTBS" | tr ' ' '\n' | grep -xq "$DTB" && continue
570 569
571 DTBS="$DTBS $DTB" 570 DTBS="$DTBS $DTB"
571 DTB=$(echo $DTB | tr '/' '_')
572 fitimage_emit_section_dtb $1 $DTB "${EXTERNAL_KERNEL_DEVICETREE}/$DTB" 572 fitimage_emit_section_dtb $1 $DTB "${EXTERNAL_KERNEL_DEVICETREE}/$DTB"
573 done 573 done
574 fi 574 fi