Fix windows compilation
Path concatenation was wrong. Layout path was received as full path
and was concatenated to script directory path
Fix: do not prepend script directory path in case full path is received.
Issue reproduced on MSYS2
Change-Id: I5f627b5befcc56f4487dbfaaa1e2d9e1dd655103
Signed-off-by: Alexander Zilberkant <alexander.zilberkant@arm.com>
diff --git a/bl2/ext/mcuboot/scripts/assemble.py b/bl2/ext/mcuboot/scripts/assemble.py
index 9c48092..0bb41f1 100644
--- a/bl2/ext/mcuboot/scripts/assemble.py
+++ b/bl2/ext/mcuboot/scripts/assemble.py
@@ -44,8 +44,11 @@
offsets = {}
sizes = {}
- scriptsDir = os.path.dirname(os.path.abspath(__file__))
- configFile = os.path.join(scriptsDir, self.layout_path)
+ if os.path.isabs(self.layout_path):
+ configFile = self.layout_path
+ else:
+ scriptsDir = os.path.dirname(os.path.abspath(__file__))
+ configFile = os.path.join(scriptsDir, self.layout_path)
with open(configFile, 'r') as fd:
for line in fd: