public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Adrian Freihofer <adrian.freihofer@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Adrian Freihofer <adrian.freihofer@siemens.com>
Subject: [PATCH 2/6] kernel-fitimage: fix external dtb check
Date: Mon, 15 Jul 2024 16:10:39 +0200	[thread overview]
Message-ID: <20240715141448.2158477-3-adrian.freihofer@gmail.com> (raw)
In-Reply-To: <20240715141448.2158477-1-adrian.freihofer@gmail.com>

From: Adrian Freihofer <adrian.freihofer@siemens.com>

If EXTERNAL_KERNEL_DEVICETREE and dtb_image_sect are empty variables
dtb_path ends up as "/" which is available on most Unix systems but
probably not the dtb_path which is needed here. Checking for a file
makes more sense and also solves the issue with the "/".

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
 meta/classes-recipe/kernel-fitimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass
index ce52297aec3..67c98adb232 100644
--- a/meta/classes-recipe/kernel-fitimage.bbclass
+++ b/meta/classes-recipe/kernel-fitimage.bbclass
@@ -429,7 +429,7 @@ fitimage_emit_section_config() {
 	fi
 
 	dtb_path="${EXTERNAL_KERNEL_DEVICETREE}/${dtb_image_sect}"
-	if [ -e "$dtb_path" ]; then
+	if [ -f "$dtb_path" ] || [ -L "$dtb_path" ]; then
 		compat=$(fdtget -t s "$dtb_path" / compatible | sed 's/ /", "/g')
 		if [ -n "$compat" ]; then
 			compatible_line="compatible = \"$compat\";"
-- 
2.45.2



  parent reply	other threads:[~2024-07-15 14:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-15 14:10 [PATCH v2 0/6] Use the kernel from sstate when building fitImages Adrian Freihofer
2024-07-15 14:10 ` [PATCH 1/6] kernel-fitimage: fix intentation Adrian Freihofer
2024-07-15 14:10 ` Adrian Freihofer [this message]
2024-07-15 14:10 ` [PATCH 3/6] kernel: refactor linux compression Adrian Freihofer
2024-07-15 14:10 ` [PATCH 4/6] kernel-fitimage: refactor fitimage_assemble Adrian Freihofer
2024-07-15 14:10 ` [PATCH 5/6] kernel: refactor fitimage Adrian Freihofer
2024-07-15 14:10 ` [PATCH 6/6] kernel-fitimage: run unbundled fitimage after deploy Adrian Freihofer
2024-07-15 14:22 ` [PATCH v2 0/6] Use the kernel from sstate when building fitImages Adrian Freihofer
2024-07-15 14:32   ` [OE-core] " Martin Jansa
2024-07-18  8:00     ` Adrian Freihofer
2024-07-18  8:39       ` Martin Jansa
2024-07-18 12:37         ` Adrian Freihofer
2024-07-18 13:29           ` Martin Jansa
2024-07-18 10:28       ` Jose Quaresma
2024-07-18 12:44         ` Adrian Freihofer
2024-07-24 15:54 ` Alexandre Belloni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240715141448.2158477-3-adrian.freihofer@gmail.com \
    --to=adrian.freihofer@gmail.com \
    --cc=adrian.freihofer@siemens.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox