From 97a87a7c849b46b1303b7bc7ad5271e4e3ba4fd0 Mon Sep 17 00:00:00 2001 From: Hossam ElAtali <46026321+elatalhm@users.noreply.github.com> Date: Thu, 16 May 2024 13:09:27 -0400 Subject: [PATCH] util: Fixed gem5img.py script (#990) Made the script more robust to different names. Co-authored-by: Hossam ElAtali --- util/gem5img.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/gem5img.py b/util/gem5img.py index 4a8c0916fe..4223316b29 100755 --- a/util/gem5img.py +++ b/util/gem5img.py @@ -194,7 +194,8 @@ def findPartOffset(devFile, fileName, partition): r"\s*:\s*" # Separator r"start=\s*(?P\d+),\s*" # Partition start record r"size=\s*(?P\d+),\s*" # Partition size record - r"type=(?P\d+)" # Partition type record + r"type=(?P.+?),*?" # Partition type record + r".*" # anything else, e.g., name field r"\s*$" # End of line ) lines = out.splitlines()