util: Fixed gem5img.py script (#990)

Made the script more robust to different names.

Co-authored-by: Hossam ElAtali <hossam.elatali@uwaterloo.ca>
This commit is contained in:
Hossam ElAtali
2024-05-16 13:09:27 -04:00
committed by GitHub
parent 321bd07163
commit 97a87a7c84

View File

@@ -194,7 +194,8 @@ def findPartOffset(devFile, fileName, partition):
r"\s*:\s*" # Separator
r"start=\s*(?P<start>\d+),\s*" # Partition start record
r"size=\s*(?P<size>\d+),\s*" # Partition size record
r"type=(?P<type>\d+)" # Partition type record
r"type=(?P<type>.+?),*?" # Partition type record
r".*" # anything else, e.g., name field
r"\s*$" # End of line
)
lines = out.splitlines()