From: Jan Kiszka <jan.kiszka@siemens.com>
Date: Thu, 11 Nov 2021 07:14:18 +0000 (+0100)
Subject: binman: Fix extract command for using non-absolute image paths
X-Git-Tag: v2025.01-rc5-pxa1908~1591^2~18^2~16
X-Git-Url: http://git.dujemihanovic.xyz/html/static/git-logo.png?a=commitdiff_plain;h=c700f109a312d0c14b5409765013af4b7335d879;p=u-boot.git

binman: Fix extract command for using non-absolute image paths

Otherwise the updated image will end up in the temporary folder that is
purged after completion.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

diff --git a/tools/binman/control.py b/tools/binman/control.py
index 304fc70f56..7da69ba38d 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -355,6 +355,7 @@ def ReplaceEntries(image_fname, input_fname, indir, entry_paths,
     Returns:
         List of EntryInfo records that were written
     """
+    image_fname = os.path.abspath(image_fname)
     image = Image.FromFile(image_fname)
 
     # Replace an entry from a single file, as a special case